-
-
Notifications
You must be signed in to change notification settings - Fork 736
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
Unable to consume AI Provider using Bearer Token as authentication method. #4421
Comments
Interesting! Could you please give us more info regarding the AI section in Codeceptjs conf? That'll help us understand more the context. |
maybe this help @DavidAcero
it worked with my test
|
Hi @kobenguyent , I tried to use your suggestion on both ways but I'm getting different error messages:
But the error I was getting is the following:
Then I switch the library to "openai" but getting a different error:
The new error to be received is the following:
|
all right, I hope this would resolve the issue now. Firstly, creating a function to get bearer token
Then calling it on your setup
And you're good to go
|
@kobenguyent , sorry for the delay, I tried to follow the provided advices, however I'm still getting stuck with the same error, token is retrieved successfully, however at the moment I try to use AI it is requiring me an API-KEY |
hey @DavidAcero I could replicate the same issue, cause I forgot to remove the May you try another approach?
Don't forget to set those env vars
I could not get the response due to the azure setup as I don't have much knowledge on this. But you could try, I think the setup from your end would be done. |
@kobenguyent , thanks a lot, it seems I'm able to send the request to Azure OpenAI. However apparently the model used does not support completion. Do you happen to know which operation CodeceptJS is using on the AI task, or, even better, which azure open ai models are supported on CodeceptJS? For now I think the Bearer Token is successfully being consume. |
@DavidAcero the model is defined by model deployments on azure open ai. I guess you could find it out and pass the correct model there. Technically, codeceptjs won't control which model is used yet explicitly defined by users. |
What are you trying to achieve?
Consume AI provider through Bearer token as authentication method instead of API_KEY.
What do you get instead?
Details
The text was updated successfully, but these errors were encountered: