-
-
Notifications
You must be signed in to change notification settings - Fork 115
Description
I tried to get claude to run but I ran into issues. It seems some of the requests went through.
Error 19:01:44 notify.error Gp.nvim Gp.nvim: anthropic response is empty:
'{"type":"error","error":{"type":"invalid_request_error","message":"messages: Unexpected role \"system\". The Messages API accepts a top-level system
parameter, not \"system\" as an input message role."}}\n'
Error 19:01:44 notify.error Gp.nvim Gp.nvim: anthropic response is empty:
'{"type":"error","error":{"type":"invalid_request_error","message":"messages.1: all messages must have non-empty content except for the optional final assistant message"}}\n'
I explored the issue a bit further.
it seems either the test isn't being passed in or the response is empty, I also managed to overload it. What else is interesting is that it seems like every once in a while a request will go through in the chat window. the requests always go through on rewrite or 'implement'.
I can get Claude to run it with gpImplement or gpRewrite, but it is not in the chat window.
Somebody, please let me know what further details I can provide to get this issue resolved.
I am running macOS Sonoma
version NVIM v0.10.0
version Build type: Release
version LuaJIT 2.1.1716656478
On Iterm2, terminal emulator.
providers = {
openai = {
endpoint = "https://api.openai.com/v1/chat/completions",
secret = { 'cat', '~/.openAi_api_key'}
},
anthropic = {
endpoint = "https://api.anthropic.com/v1/messages",
secret = os.getenv("ANTHROPIC_API_KEY"),
},
},
....
{
provider = "anthropic",
name = "Clancy🤓",
chat = true,
command = false,
-- string with model name or table with model name and parameters
model = { model = "claude-3-5-sonnet-20240620" },
system_prompt = require("gp.defaults").chat_system_prompt,
},