karthink / gptel

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

gptel-anthropic: Add upgraded Claude 3.5 Sonnet model #436

Closed benthamite closed 1 month ago

benthamite commented 1 month ago
karthink commented 1 month ago

Cheers @benthamite!

algal commented 1 month ago

Yay! I came here wondering about this and like magic it appeared within minutes of me looking.

benthamite commented 1 month ago

@karthink, upon reflection, I wonder if we should simply replace claude-3-5-sonnet-20240620 with claude-3-5-sonnet-20241022 rather than adding the latter as a new model.

unuseless commented 1 month ago

Thanks for the fast update. I prefer that a user can choose which model to use, so I think it's better to have a choice for each model, and not replace claude-3-5-sonnet-20240620 with claude-3-5-sonnet-2024102. Is it also possible to specify your own model, like adding a model spec like:

 (claude-3-5-sonnet-20240620           ;Full spec
   :description  \"Balance of intelligence and speed\"
   :capabilities (media tool json)
   :mime-types
   (\"image/jpeg\" \"image/png\" \"image/gif\" \"image/webp\")))

into your .emacs?

karthink commented 1 month ago

@benthamite I think it's better to have both instead of replacing it, there are reasons to want to continue to use the old model. We might actually also want to add claude-3-5-sonnet-latest and mention in the metadata that it's the same as claude-3-5-sonnet-20241022 right now. This way someone who always wants the latest model can set it to -latest.

karthink commented 1 month ago

@unuseless

Is it also possible to specify your own model, like adding a model spec like

EDIT: Probably best to just redefine the Anthropic backend:

(gptel-make-anthropic "Claude"
  :key "key"
  :stream t
  :models
  '((claude-3-5-sonnet-20240620
     :description  \"Balance of intelligence and speed\"
     :capabilities (media tool json)
     :mime-types
     (\"image/jpeg\" \"image/png\" \"image/gif\" \"image/webp\"))))

You can include whatever models you need in the list of models here.