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

Authentication Error #1

Open
hisunnymay opened this issue May 20, 2024 · 0 comments
Open

Authentication Error #1

hisunnymay opened this issue May 20, 2024 · 0 comments

Comments

@hisunnymay
Copy link

Hello,

I encountered an error when trying to run the provided code snippet.

# Define signature
signature = 'sentence -> sentiment'
classify = dspy.Predict(signature)

# Run
sentence = "it's a charming and often affecting journey."
classify(sentence=sentence).sentiment

The error message received was:

AuthenticationError: Error code: 401 - {'error': {'message': 'Missing Authentication header or invalid API key', 'code': 401}}

I have verified that the API key used is correct, as it was successfully employed for calling the chat completions API. However, it is unclear where the authentication header is set. The error message indicates a potential issue with a missing Authentication header.

Thank you for your attention to this matter. If you require further clarification, please do not hesitate to let me know.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant