智谱AI POST调用

智谱AI POST

官方文档地址:http://open.bigmodel.cn/dev/api/normal-model/glm-4?eqid=95fa1e03000d121900000006650512ee

POST例子:

提交地址:https://open.bigmodel.cn/api/paas/v4/chat/completions

协议头:
Authorization: Bearer 你的APIkey
Content-Type: application/json

提交内容:

{
"model": "glm-4",
"temperature": 1.0,
"top-p": 1.0,
"max_tokens": 4095,
"messages": [
{"role": "user","content": "你是谁"}
]
}