Skip to content

BadRequestError: Unsupported data type when using AzureOpenAIEmbeddings #27301

Answered by deepak-hl
elianna-wang asked this question in Q&A
Discussion options

You must be logged in to vote

@elianna-wang , try this
embedding = AzureOpenAIEmbeddings(
openai_api_version="2024-04-01-preview",
openai_api_type="azure",
openai_api_key=os.getenv("AZURE_OPENAI_API_KEY"),
azure_endpoint=os.getenv("AZURE_OPENAI_ENDPOINT"),
deployment=os.getenv("DEPLOYMENT_NAME"),
model="text-embedding-ada-002",
validate_base_url=True,
)

Replies: 4 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by elianna-wang
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants