curl –request POST \
–url https://api.openai-hk.com/v1/chat/completions \
–header ‘Authorization: Bearer hk-替换为你的key’ \
-H “Content-Type: application/json” \
–data ‘{
“max_tokens”: 1200,
“model”: “gpt-3.5-turbo”,
“temperature”: 0.8,
“top_p”: 1,
“presence_penalty”: 1,
“messages”: [
{
“role”: “system”,
“content”: “You are ChatGPT, a large language model trained by OpenAI. Answer as concisely as possible.”
},
{
“role”: “user”,
“content”: “你是chatGPT多少?”
}
]
}’