You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Running bash under MacOS and using Anthropic I get the error
"all messages must have non-empty content except for the optional final assistant message"
after the first use of ctrl-X A.
It could be a usage error by me...
Here is a log file:
{
"model": "claude-3-sonnet-20240229",
"max_tokens": 256,
"system": "You are an assistant who provides executable commands for the bash command-line interface. You only provide the requested command on a single line, without any explanations, hints or other adornments. Stop providing output after the providing the requested command. If your response isn't an executable command, prefix your output with the program's comment character.",
"messages": [
{"role": "user", "content": "List files in current directory"},
{"role": "assistant", "content": "ls"},
{"role": "user", "content": "How many JavaScript files in the current directory contain the word bar?"},
{"role": "assistant", "content": "grep -lw bar *.js | wc -l"},
{"role": "user", "content": "xyzzy"},
{"role": "assistant", "content": "# Sorry I can't help."},
{"role": "user", "content": "Before my final prompt to which I expect a reply, I am also supplying you as context with one or more previously issued commands, to which you simply reply OK"},
{"role": "assistant", "content": "OK"},
{"role": "user", "content": "exit"},
{"role": "assistant", "content": "OK"},
{"role": "user", "content": "hello"},
{"role": "assistant", "content": "OK"},
{"role": "user", "content": "exit"},
{"role": "assistant", "content": "OK"},
{"role": "user", "content": "list all files"}
]
}
{"id":"msg_0145uVDCZc1xf4HyvQyvvE2S","type":"message","role":"assistant","content":[{"type":"text","text":"ls"}],"model":"claude-3-sonnet-20240229","stop_reason":"end_turn","stop_sequence":null,"usage":{"input_tokens":202,"output_tokens":4}}{
"model": "claude-3-sonnet-20240229",
"max_tokens": 256,
"system": "You are an assistant who provides executable commands for the bash command-line interface. You only provide the requested command on a single line, without any explanations, hints or other adornments. Stop providing output after the providing the requested command. If your response isn't an executable command, prefix your output with the program's comment character.",
"messages": [
{"role": "user", "content": "List files in current directory"},
{"role": "assistant", "content": "ls"},
{"role": "user", "content": "How many JavaScript files in the current directory contain the word bar?"},
{"role": "assistant", "content": "grep -lw bar *.js | wc -l"},
{"role": "user", "content": "xyzzy"},
{"role": "assistant", "content": "# Sorry I can't help."},
{"role": "user", "content": "Before my final prompt to which I expect a reply, I am also supplying you as context with one or more previously issued commands, to which you simply reply OK"},
{"role": "assistant", "content": "OK"},
{"role": "user", "content": "exit"},
{"role": "assistant", "content": "OK"},
{"role": "user", "content": ""},
{"role": "assistant", "content": "OK"},
{"role": "user", "content": "ls"},
{"role": "assistant", "content": "OK"},
{"role": "user", "content": "list all files including subdirectories"}
]
}
{"type":"error","error":{"type":"invalid_request_error","message":"messages: all messages must have non-empty content except for the optional final assistant message"}}
The text was updated successfully, but these errors were encountered:
Running bash under MacOS and using Anthropic I get the error
"all messages must have non-empty content except for the optional final assistant message"
after the first use of ctrl-X A.
It could be a usage error by me...
Here is a log file:
The text was updated successfully, but these errors were encountered: