更新 README.md

This commit is contained in:
xyj 2024-01-12 13:05:41 +08:00
parent 3aa9466a66
commit be1321fd40
1 changed files with 38 additions and 36 deletions

View File

@ -1,37 +1,39 @@
# 上传的参数params # ws地址
```text ```ws://doamin/v1/chat```
knowledge_base_name: ceshi # 上传的参数params
score_threshold: 0.6 ```text
top_k:2 knowledge_base_name: ceshi
appid:d597331d score_threshold: 0.6
api_secret:ZDUwNDAxNWI2OWQwZjA2OTQ3ZTJhNGE1 top_k:2
api_key:7f91f70f4384805483d948b9aa1317e6 appid:d597331d
``` api_secret:ZDUwNDAxNWI2OWQwZjA2OTQ3ZTJhNGE1
api_key:7f91f70f4384805483d948b9aa1317e6
# 发送消息格式 ```
与讯飞星火完全一致。https://www.xfyun.cn/doc/spark/Web.html
```text # 发送消息格式
{ 与讯飞星火完全一致。https://www.xfyun.cn/doc/spark/Web.html
"header": { ```text
"app_id": "d597331d", {
"uid": "1234" "header": {
}, "app_id": "d597331d",
"parameter": { "uid": "1234"
"chat": { },
"domain": "general", "parameter": {
"temperature": 0.5, "chat": {
"max_tokens": 2048 "domain": "general",
} "temperature": 0.5,
}, "max_tokens": 2048
"payload": { }
"message": { },
"text": [ "payload": {
{ "message": {
"role": "user", "text": [
"content": "你是谁" {
} "role": "user",
] "content": "你是谁"
} }
} ]
} }
}
}
``` ```