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

Error 400 when using "azure openai embeddings" instead of "openai embeddings"[BUG] #195

Closed
dmanresa-saes opened this issue May 26, 2023 · 4 comments
Labels
bug Something isn't working

Comments

@dmanresa-saes
Copy link

dmanresa-saes commented May 26, 2023

Hello,

I am experiencing an issue when using "azure openai embeddings" in my project. When I use "openai embeddings", everything works fine, but when switching to "azure openai embeddings", I receive the following error:

error: request failed with status code 400

To Reproduce
Steps to reproduce the behavior:

  1. Use "openai embeddings" in the project (works correctly).
  2. Switch to "azure openai embeddings".
  3. Run the project.
  4. Observe the mentioned error.

Screenshots
image
Setup

  • OS: Windows 10
  • Browser: all

Additional context
node v18.15.0

@dmanresa-saes
Copy link
Author

dmanresa-saes commented May 26, 2023

I can also see in the console:

response: {
status: 400,
statusText: 'model_error',
headers: {
'content-length': '346',
'content-type': 'application/json',
'access-control-allow-origin': '*',
'strict-transport-security': 'max-age=31536000; includeSubDomains; preload',
'openai-processing-ms': '44.0331',
'x-content-type-options': 'nosniff',
'x-request-id': 'aa255825-12b9-4418-8360-42019c443819',
'ms-azureml-model-error-reason': 'model_error',
'ms-azureml-model-error-statuscode': '400',
'x-ms-client-request-id': 'fd12f8f1-a6fe-4a2b-ab8b-a13eac030be6',
'apim-request-id': 'fd12f8f1-a6fe-4a2b-ab8b-a13eac030be6',
'x-ms-region': 'West Europe',
date: 'Fri, 26 May 2023 17:56:08 GMT',
connection: 'close'

@chungyau97
Copy link
Contributor

@dmanresa-saes
I have done the changes requested. #215
Could you help try out this branch bugfix/AzureOpenAIEmbeddingError to check whether the same error occur again?

@HenryHengZJ
Copy link
Contributor

#215 merged now, @dmanresa-saes if you can pull from latest again and see if the issue is resolved

@dmanresa-saes
Copy link
Author

Works perfectly!

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

No branches or pull requests

3 participants