karthink / gptel

A simple LLM client for Emacs
GNU General Public License v3.0
1.04k stars 111 forks source link

Support Claude 3 #229

Closed AndreaOrru closed 3 months ago

AndreaOrru commented 4 months ago

API is now accessible. Claude 3 Opus is claimed to be the best performing model right now.

karthink commented 4 months ago

Done, please test.

gregoryg commented 3 months ago

@karthink this appears to work, although I'm having terrible issues with the Anthropic servers. I got a good response on several of my tries using gptel, though - which is all that's needed for proof!

(gptel-make-anthropic "Anthropic" :stream nil :key 'gptel-api-key)

The error I get on many requests is a 529 Server Error, with a message of "Overloaded" which appears to be a usage problem on the Anthropic side according to https://docs.together.ai/docs/error-codes

karthink commented 3 months ago

Thanks. It would be good to test streaming responses as well. It's working here but I'll wait for some confirmation before closing this issue.

BTW you probably want :key gptel-api-key instead of :key 'gptel-api-key. I guard against the latter in the code but the former is the intended usage of :key.

gregoryg commented 3 months ago

Streaming works! I have it off by default because my ordinary use is in Org Mode buffers with a custom markdown-to-org function.

I changed my :key slots to fit your suggestion - thank you!

karthink commented 3 months ago

Great, I'll close this issue then.

@gregoryg As an aside, I really enjoyed your videos on system prompts and gptel! I borrowed a few of your prompts. Inspired by your videos, I also made it easier to add custom openai-API backends (you don't need to specify the :header manually in gptel-make-openai anymore) and added previews/annotations to the directive selection menu:

2024-03-05-112731_899x231_scrot