Open TiansuYu opened 4 months ago
Hello @TiansuYu, the providers supported out-of-the box are OpenAI and Azure. However, it should require only a small code modification to add other providers, given that the the API are the same (with just a different base endpoint)...
I add this suggestion to my "to to list when I find time/motivation" :)
In the meantime, you can try to set the environment variable OPENAI_BASE_ENDPOINT to the base endpoint of Anthropic/Mistral. Also set your API key provided by one of those suppliers. If the API is exactly the same as OpenAI, in theory, it should work. Let me know if it is the case...
I will experiment around it. Open a PR if my time permits. 😄
Draft PR https://github.com/marcolardera/chatgpt-cli/pull/71 Seems API KEY loading is not working as intended, needs some further work on this.
Some general comments on how to refactor this repo:
Model.prompt
, resolve to different Model implementations based on supplier.
I am thinking about trying out models from Anthropic and MistralAI on this tool as well. Given how similar the model APIs are between these companies. Could this be easily achieved on this tool?