dpayne / CodeGPT.nvim

CodeGPT is a plugin for neovim that provides commands to interact with ChatGPT.
GNU General Public License v3.0
764 stars 50 forks source link

Add anthropic provider #54

Closed nmnduy closed 5 months ago

nmnduy commented 6 months ago
kaihendry commented 6 months ago

Was playing with this by setting vim.g["codegpt_llm_api_provider"] = "anthropic" (is there an easier toggle?), though I hit

Error: 404 {"type":"error","error":{"type":"not_found_error","message":"model: gpt-3.5-turbo"}}

nmnduy commented 6 months ago

Was playing with this by setting vim.g["codegpt_llm_api_provider"] = "anthropic" (is there an easier toggle?), though I hit

Error: 404 {"type":"error","error":{"type":"not_found_error","message":"model: gpt-3.5-turbo"}}

gpt-3.5-turbo is not an anthropic model.

You need set config to another model that Anthropic provides. Also, an Anthropic API key is required.

dpayne commented 5 months ago

I do not use Anthropic but I am sure others will appreciate it, thank you!

dpayne commented 5 months ago

some slight changes were made, I renamed the config to just "codegpt_api_provider" as well as adding a fallback for the old config.