Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Unable to Use Claude-3-5-haiku-20241022 Model - Invalid Request Error #4643

Closed
1 task done
andressade opened this issue Nov 5, 2024 · 7 comments
Closed
1 task done
Labels
bug Something isn't working

Comments

@andressade
Copy link

What happened?

When attempting to use the Claude-3-5-haiku-20241022 model for general conversation, the operation fails after 3 attempts with a 400 error

Steps to Reproduce

Selected Claude-3-5-haiku-20241022 model
Attempted to have a normal conversation
Received error message

What browsers are you seeing the problem on?

Chrome

Relevant log output

error.log:


{"level":"error","message":"[handleAbortError] AI response error; aborting request: Operation failed after 3 attempts: 400 {\"type\":\"error\",\"error\":{\"type\":\"invalid_request_error\",\"message\":\"prompt: Input should be a valid string\"}}","stack":"Error: Operation failed after 3 attempts: 400 {\"type\":\"error\",\"error\":{\"type\":\"invalid_request_error\",\"message\":\"prompt: Input should be a valid string\"}}\n    at AnthropicClient.processResponse (/app/api/app/clients/AnthropicClient.js:815:19)\n    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)\n    at async AnthropicClient.sendCompletion (/app/api/app/clients/AnthropicClient.js:828:5)\n    at async AnthropicClient.sendMessage (/app/api/app/clients/BaseClient.js:572:24)\n    at async AskController (/app/api/server/controllers/AskController.js:125:20)\n    at async /app/api/server/routes/ask/anthropic.js:23:5"}


debug.log:


2024-11-05T20:11:26.303Z debug: [AnthropicClient]
{
  model: "claude-3-5-haiku-20241022",
  stream: true,
  // 3 stop_sequence(s)
  stop_sequences: ["||>","\n\nHuman:","<|diff_marker|>"],
  temperature: undefined,
    metadata.user_id: "abcxyz",
  top_p: undefined,
  top_k: undefined,
  // 1 prompt(s)
  prompt: [{"content":"test message","author":"\n\nHuman:"}],
  max_tokens_to_sample: 4096,
}
2024-11-05T20:11:26.305Z debug: Making request to https://api.anthropic.com/v1/complete
2024-11-05T20:11:26.511Z warn: User: abcxyz | Anthropic Request 1 failed: 400 {"type":"error","error":{"type":"invalid_request_error","message":"prompt: Input shou... [truncated]

Screenshots

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct
@andressade andressade added the bug Something isn't working label Nov 5, 2024
@danny-avila
Copy link
Owner

Already resolved on the latest build: #4629

@andressade
Copy link
Author

problem still exist on 0c2a583

@danny-avila
Copy link
Owner

image

@andressade
Copy link
Author

image

And I've restarted it 10 times... but still nothing :(

@danny-avila
Copy link
Owner

@andressade
Copy link
Author

I finally tracked down the problem. I was using Docker and had hoped that after a "git pull" and docker-compose restart, the latest version would be in use. However, in docker-compose, the *.js files weren't mapped to the host; instead, the JavaScript files were being read from the container image. I didn't realize this right away.
I updated the Docker image, and the new model started working immediately :)

@jaim12005
Copy link

I'm starting complete fresh (images/container/latest git) and still getting the same. Any idea? On Windows using Docker.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants