Last active
October 14, 2023 12:36
-
-
Save huanlin/6903e2139d805ee643a059a6a2a5840e to your computer and use it in GitHub Desktop.
OpenAI API request example
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@API_KEY = 0bc0xxxxxxxxxxxx7971 | |
@RESOURCE_NAME = my-demo-ai-app | |
@DEPLOYMENT_ID = turbo-michael-35 | |
### OpenAI Test | |
POST https://{{RESOURCE_NAME}}.openai.azure.com/openai/deployments/{{DEPLOYMENT_ID}}/chat/completions?api-version=2023-05-15 | |
api-key: {{API_KEY}} | |
{ | |
"messages": [ | |
{ "role": "system", "content": "Please answer with Chinese."}, | |
{ "role": "user", "content": "Tell me a joke about dogs."} | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment