@navba-MSFT
I have tried using the REST API as follows:
curl -i -X POST {}/openai/deployments/{}/extensions/chat/completions?api-version=2023-06-01-preview
-H "Content-Type: application/json" \
-H "api-key: key" \
-d \
'
{
"temperature": 0,
"max_tokens": 1000,
"top_p": 1.0,
"dataSources": [
{
"type": "AzureCognitiveSearch",
"parameters": {
"endpoint": "endpoint",
"key": "key",
"indexName": "index",
"inScope": false
}
}
],
"messages": [
{
"role": "system",
"content":"Please answer using retrieved documents and combine with your internal knowledge to answer the question. Please feel free to add facts on top of information extracted from retrieved documents. Please do not forget to cite the retrieved documents for information you extract from documents. Think step by step about which information needs to be added or is missing from retrieved documents"
},
{
"role": "user",
"content": "명상은 얼마나 자주 하는게 좋은가요?"
}
]
}
'
I have received the following response:
{
"id": "",
"model": "gpt-35-turbo",
"created": ,
"object": "chat.completion",
"choices": [
{
"index": 0,
"messages": [
{
"index": 0,
"role": "tool",
"content": "{\"citations\": [], \"intent\": \"[\\\"How often should I meditate?\\\", \\\"What is the ideal frequency for meditation?\\\"]\"}",
"end_turn": false
},
{
"index": 1,
"role": "assistant",
"content": "I'm sorry, I can't provide a response to that question as it is out of the scope of the provided documents. If you have any other questions related to the content of the documents, feel free to ask!",
"end_turn": true
}
]
}
],
"usage": {
"prompt_tokens": 2587,
"completion_tokens": 62,
"total_tokens": 2649
},
"system_fingerprint": "fp"
}
The intent is being recognized perfectly, however I don't seem to receive any information chunks related to the question. I'm wondering if I should specify the language configuration in the request? I have added the system message as per your instruction as well.