azure openai
This commit is contained in:
20
pkg/azureopenai/azureopenai.go
Normal file
20
pkg/azureopenai/azureopenai.go
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
/*
|
||||||
|
https://learn.microsoft.com/zh-cn/azure/cognitive-services/openai/chatgpt-quickstart
|
||||||
|
|
||||||
|
curl $AZURE_OPENAI_ENDPOINT/openai/deployments/gpt-35-turbo/chat/completions?api-version=2023-03-15-preview \
|
||||||
|
-H "Content-Type: application/json" \
|
||||||
|
-H "api-key: $AZURE_OPENAI_KEY" \
|
||||||
|
-d '{
|
||||||
|
"model": "gpt-3.5-turbo",
|
||||||
|
"messages": [{"role": "user", "content": "你好"}]
|
||||||
|
}'
|
||||||
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
package azureopenai
|
||||||
|
|
||||||
|
var (
|
||||||
|
ENDPOINT string
|
||||||
|
API_KEY string
|
||||||
|
DEPLOYMENT_NAME string
|
||||||
|
)
|
||||||
Reference in New Issue
Block a user