Rest API doesn't seem to work:
https://[Endpoint]/openai/deployments/[modelDeployment]/extensions/chat/completions?api-version=2023-06-01-preview
Method: POST
Headers:
Content-Type:application/json
api-key:[MYKEY]
chatgpt_url:[Endpoint]
chatgpt_key:[MYKEY]
Body:
{
"dataSources": [
{
"type": "AzureCognitiveSearch",
"parameters": {
"endpoint": "[COGNITIVESEARCHENDPOINT]",
"key": "[COGNITIVESEARCHKEY]",
"indexName": "[COGNITIVESEARCHINDEXNAME]"
}
}
],
"messages": [
{
"role": "user",
"content": "what are the 10 traps to avoid in data catalog project"
}
],
"temperature": 0.5,
"top_p": 0.95,
"frequency_penalty": 0,
"presence_penalty": 0,
"max_tokens": 800,
"stop": null
}
Response:
{
"error": {
"code": "InternalServerError",
"message": "Backend returned unexpected response. Please contact Microsoft for help."
}
}
Note: works fine from the playground, and the Cognitive Search responds to GET: https://[COGNITIVESEARCHENDPOINT]/indexes/[COGNITIVESEARCHINDEXNAME]?api-version=2021-04-30-Preview