jackMort / ChatGPT.nvim

ChatGPT Neovim Plugin: Effortless Natural Language Generation with OpenAI's ChatGPT API
Apache License 2.0
3.56k stars 307 forks source link

[Feature request]: Offer an API with configurable arguments #434

Open HPRIOR opened 2 months ago

HPRIOR commented 2 months ago

It would be nice to have a lua API exposed to the user which could be called with various arguments, such as the model type. This would allow for greater control and interoperability with other plugins. as well as opening the door for more flexibility if other LLMs are introduced.

For my particular use case, I am using a telescope extension which provides a picker over various chat gpt functions, such as chat and interactive modes. I would like to be able to declare options in the extension, like: chat-cheap, or chat-expensive that offer an easy way to switch between gpt3 and gpt4 models.

Another useful feature of the proposed API would be the ability to specify visual selections.

Ideally this would be available for most the functionality provided by the plugin: ChatGPT, ChatGPTEditWithInstruction, ChatGPTRun