I need help with connecting Azure Cognitive Search to OpenAI’s gpt-4o-128k model for vector searching. When I make API calls, I keep getting an error about the vector field type.
My API call goes to:
https:///openai/deployments/gpt-4o-128k/chat/completions?api-version=2024-10-21
Here’s my request payload:
{
"model": "gpt-4o-128k",
"messages": [
{
"role": "user",
"content": "how do I start a business?"
},
{
"role": "system",
"content": "You are a helpful support agent who provides detailed and caring assistance to users. Focus on understanding what they need and give them useful answers"
}
],
"data_sources": [
{
"type": "azure_search",
"parameters": {
"index_name": "company_index",
"query_type": "vector",
"embedding_dependency": {
"type": "deployment_name",
"deployment_name": "text-embedding-ada-002"
},
"fields_mapping": {
"content_fields": [
"document_text",
"combined_data"
],
"vector_fields": [
"document_text",
"combined_data"
]
}
}
}
]
}
The error I get back:
{
"error": {
"requestid": "a15bc892-7d4f-3e88-92af",
"code": 400,
"message": "An error occurred when calling Azure Cognitive Search: Azure Search: Please assign a proper column/field for vector search. It should be of type Collection(Edm.Single)"
}
}
Any ideas what I’m doing wrong here?