Go to file
xyj be1321fd40 更新 README.md 2024-01-12 13:05:41 +08:00
configs first 2024-01-12 10:26:57 +08:00
document_loaders first 2024-01-12 10:26:57 +08:00
knowledge_base update env 2024-01-12 11:47:21 +08:00
nltk_data first 2024-01-12 10:26:57 +08:00
server update env 2024-01-12 11:47:21 +08:00
text_splitter first 2024-01-12 10:26:57 +08:00
.gitignore update env 2024-01-12 11:47:49 +08:00
README.md 更新 README.md 2024-01-12 13:05:41 +08:00
ai.py first 2024-01-12 10:26:57 +08:00
init_database.py first 2024-01-12 10:26:57 +08:00
knownledge_api.py first 2024-01-12 10:26:57 +08:00
requirements.txt 更新 requirements.txt 2024-01-12 13:05:18 +08:00

README.md

ws地址

ws://doamin/v1/chat

上传的参数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": "你是谁"
                }
            ]
        }
    }
}