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

Anthropic Claude command line usage #663

Open
apaz-cli opened this issue Nov 4, 2024 · 1 comment
Open

Anthropic Claude command line usage #663

apaz-cli opened this issue Nov 4, 2024 · 1 comment
Labels
bug Something isn't working documentation Improvements or additions to documentation

Comments

@apaz-cli
Copy link

apaz-cli commented Nov 4, 2024

Trying to use Claude to index a folder from the command line.

pqa \
  --llm "anthropic/litellm-claude-3-5-sonnet-20241022" \
  --summary_llm "anthropic/litellm-claude-3-5-sonnet-20241022" \
  index .

But although my API key is set, I get:

litellm.exceptions.NotFoundError: litellm.NotFoundError: AnthropicException - Client error '404 Not Found' for url 'https://api.anthropic.com/v1/messages'

I did a lot of code reading to figure out the prefixes I needed, an example would probably help the docs. Is there another setting that I need to use to switch API versions?

Copy link

dosubot bot commented Nov 4, 2024

Hey @apaz-cli! 👋 I'm here to help you with bugs, questions, and becoming a contributor. I'm Dosu, a bot designed to assist you while waiting for a human maintainer.

The 404 Not Found error suggests that the API endpoint or the model identifier might be incorrect. Here are a few things to check:

  1. Model Identifier: Ensure that the model identifier "anthropic/litellm-claude-3-5-sonnet-20241022" is correct and supported by the API. The model identifier should match the expected format and version available in the API.

  2. API Endpoint: The endpoint https://api.anthropic.com/v1/messages is correct for the Anthropic Claude model [1]. Double-check that there are no typos or incorrect configurations in your setup.

  3. API Key: Make sure that the ANTHROPIC_API_KEY environment variable is correctly set and has the necessary permissions [2].

  4. Headers and Parameters: Verify that all required headers and parameters are included in your request. The necessary headers include accept, content-type, anthropic-version, and others as specified [3][4].

If these aspects are correctly configured and the issue persists, it might be worth checking if there are any updates or changes in the API documentation regarding model versions or endpoint usage.

To continue talking to Dosu, mention @dosu.

@dosubot dosubot bot added bug Something isn't working documentation Improvements or additions to documentation labels Nov 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

1 participant