test_ai/README.md

729 B

上传的参数params

knowledge_base_name: ceshi
score_threshold: 0.6
top_k:2
appid:d597331d
api_secret:ZDUwNDAxNWI2OWQwZjA2OTQ3ZTJhNGE1
api_key:7f91f70f4384805483d948b9aa1317e6

发送消息格式

与讯飞星火完全一致。https://www.xfyun.cn/doc/spark/Web.html

{
    "header": {
        "app_id": "d597331d",
        "uid": "1234"
    },
    "parameter": {
        "chat": {
            "domain": "general",
            "temperature": 0.5,
            "max_tokens": 2048
        }
    },
    "payload": {
        "message": {
            "text": [
                {
                    "role": "user",
                    "content": "你是谁"
                }
            ]
        }
    }
}