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

Azure endpoints broken since version 8.2.0 #349

Closed
sibbl opened this issue Aug 19, 2024 · 3 comments · Fixed by #350 or RageAgainstThePixel/com.openai.unity#279
Closed

Azure endpoints broken since version 8.2.0 #349

sibbl opened this issue Aug 19, 2024 · 3 comments · Fixed by #350 or RageAgainstThePixel/com.openai.unity#279
Assignees
Labels
bug Something isn't working

Comments

@sibbl
Copy link
Contributor

sibbl commented Aug 19, 2024

When performing a chat completion, a "404 not found" exception is thrown.

This is because since version 8.2.0 the URL https://{resourceName}.openai.azure.com/openai/chatdeployments/{deploymentId}//completions?api-version={apiVersion} is generated in here:

if (client.OpenAIClientSettings.IsAzureOpenAI && IsAzureDeployment == true)
{
route = $"{Root}deployments/{client.OpenAIClientSettings.DeploymentId}/{endpoint}";
}
else
{
route = $"{Root}{endpoint}";
}

It should be

if (client.OpenAIClientSettings.IsAzureOpenAI && IsAzureDeployment == true)
{
    route = $"deployments/{client.OpenAIClientSettings.DeploymentId}/{Root}{endpoint}";
}
else
{
    route = $"{Root}{endpoint}";
}

instead.

@sibbl sibbl added the bug Something isn't working label Aug 19, 2024
@StephenHodgson StephenHodgson linked a pull request Aug 19, 2024 that will close this issue
@StephenHodgson
Copy link
Member

StephenHodgson commented Aug 19, 2024

Sorry about that!

I didn't have a way to test this. Definitely a typo

@sibbl
Copy link
Contributor Author

sibbl commented Aug 19, 2024

Thanks for the very quick completion of the PR!

Unfortunately I didn't have the time yet to bump the version, but was happy to see that the release was already published.

Can confirm that it's working now.

@StephenHodgson
Copy link
Member

I'll add some more unit tests for this as well in 8.2.2

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