You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm uncertain whether this is a bug or a feature request.
In this pull request (https://github.com/aallam/openai-kotlin/pull/102/files), it is stated that the library now supports custom deployments, including Azure. But we are currently unable to directly fetch data from Azure using this library due to a difference in the URL format.
According to the reference documentation (https://learn.microsoft.com/en-us/azure/cognitive-services/openai/reference), the correct URL format for retrieving embeddings from Azure is as follows: https://{your-resource-name}.openai.azure.com/openai/deployments/{deployment-id}/embeddings?api-version={api-version}.
My suggestion is to consider relocating the URL path v1 to a configuration file, similar to the OpenAIHost, to allow users to easily modify it and ensure compatibility with Azure deployments.
Steps to Reproduce
Import the library to a project
Use Azure OpenAI deployment
Check the error message
HttpClient: RESPONSE: 404 Resource Not Found
METHOD: HttpMethod(value=POST)
FROM: https://{your-resource-name}.openai.azure.com/openai/deployments/{deployment-id}/v1/embeddings
Environment
openai-kotlin version: 3.2.4
Kotlin version: 1.8.10
OS: MacOS ventrua
The text was updated successfully, but these errors were encountered:
Description
I'm uncertain whether this is a bug or a feature request.
In this pull request (https://github.com/aallam/openai-kotlin/pull/102/files), it is stated that the library now supports custom deployments, including Azure. But we are currently unable to directly fetch data from Azure using this library due to a difference in the URL format.
According to the reference documentation (https://learn.microsoft.com/en-us/azure/cognitive-services/openai/reference), the correct URL format for retrieving embeddings from Azure is as follows:
https://{your-resource-name}.openai.azure.com/openai/deployments/{deployment-id}/embeddings?api-version={api-version}
.Unfortunately, there is a hardcoded URL (
v1/
) in the code file that hinders the use of Azure services (https://github.com/aallam/openai-kotlin/blob/main/openai-client/src/commonMain/kotlin/com.aallam.openai.client/internal/api/EmbeddingsApi.kt#L31).My suggestion is to consider relocating the URL path
v1
to a configuration file, similar to the OpenAIHost, to allow users to easily modify it and ensure compatibility with Azure deployments.Steps to Reproduce
Environment
The text was updated successfully, but these errors were encountered: