Setup your Postman request to make the following call.
POST to Url: https://xxxx.openai.azure.com/openai/deployments/test/chat/completions?api-version=2023-03-15-preview
This url you can get from the Azure portal in the General information section of the OpenAI Azure resource.
Set a header variable named api-key with the OpenAI key which you can get from the Azure portal in the Secrets section of the OpenAI Azure resource (not the Azure OpenAI portal)
Set the body as raw -> json with the following json
{
"messages": [
{
"role": "user",
"content": "how many faces does a cube have?"
}
],
"temperature": 0.7,
"top_p": 0.95,
"frequency_penalty": 0,
"presence_penalty": 0,
"max_tokens": 800,
"stop": null
}
The key value pair named content is where you would ask your question. In this example the question is, "how many faces does a cube have?".
The request response would similar to the following.
{
"id": "chatcmpl-xxxx",
"object": "chat.completion",
"created": 1683143567,
"model": "gpt-35-turbo",
"choices": [
{
"index": 0,
"finish_reason": "stop",
"message": {
"role": "assistant",
"content": "A cube has six faces."
}
}
],
"usage": {
"completion_tokens": 6,
"prompt_tokens": 16,
"total_tokens": 22
}
}
This example is just to get the Postman request working and without securing the endpoint.