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 failure with prompty for serverless AI models #148

Open
ciccioIelo opened this issue Dec 13, 2024 · 0 comments
Open

Authentication failure with prompty for serverless AI models #148

ciccioIelo opened this issue Dec 13, 2024 · 0 comments

Comments

@ciccioIelo
Copy link

When using the prompty extension with a serverless AI model (custom endpoint), an authentication error occurs with the following message:
{
"statusCode": 401,
"message": "Auth token validation failed. Please provide a valid key or a valid AAD token"
}
The issue does not occur when using GitHub-provided AI model endpoints.
By looking at the prompty output(verbose) I noticed that the api_key used in the API request does not match the one explicitly specified in the .prompty configuration file.
I temporarily resolved the issue by modifying the executor.py file of the prompty library. I added the following lines:
Image
However, this fix only works when running a Python script with prompty.execute. Running the .prompty file directly still results in the same authentication error.

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