Any interest in support Claude?
justengland opened this issue · 9 comments
Seems like there are some new models like claude and llama3.1 that are pretty exciting, is there any interest in supporting them?
Absolutely. Have been busy these last few months. Would love to add support for other APIs.
Seems like the client/client.go is the file currently used to interface with the open ai api. Seems like to support multiple api's an abstract factory or some sort of light abstraction is needed, as I look at the api's they seem similar but not identical. I dont mind lending a hand if we could agree on a path forward.
I think that makes sense. Would love your help on this. Let me find some time to play around with the perplexity API which seems super similar as well.
I started putting together some perplexity documentation: https://github.com/kardolus/chatgpt-cli/blob/main/docs/perplexity_api.md
Before proceeding I will add a --debug
flag that prints raw request data and responses. I think that will come in handy when talking to different APIs. I am not super happy with the name chatgpt-cli
if we are going to support perplexity and claud. But that's a bridge we don't have to cross right now.
I just cut 1.6.3 with the new debug option.
I am super stoked. Actually got it to work with perplexity! See the latest README
on the main branch. I still have to cut a release though. I needed to omit presence and frequency penalties in case they were 0. So I had to implement my own marshaller.
I will try playing with Claude later on.
The anthropic API is incompatible with the ChatGPT API: https://github.com/kardolus/chatgpt-cli/blob/main/docs/anthropic_api.md
So yeah, we would have to write anthropic specific code. Kind of a bummer. The code as is works with perplexity, chatgpt and azure openai service.
Supporting this new API would require an interface for the client. We would have to pick the right implementation during runtime based on configuration. Definetely doable, but it would have been nice if it just worked :).
I may do this in a fork.
Now also supporting Llama :)
I will be releasing an aichat
(still thinking of a good name) somewhere in the upcoming months that will also be supporting Claude