FastGPT is a knowledge-based platform built on the LLMs, offers a comprehensive suite of out-of-the-box capabilities such as data processing, RAG retrieval, and visual AI workflow orchestration, letting you easily develop and deploy complex question-answering systems without the need for extensive setup or configuration.
例行检查
你的版本 v4.6.7
问题描述 调用对话接口报错Key is error. You need to use the app key rather than the account key. 复现步骤 `import requests
url = "http://XXXXXXX:3000/api/v1/chat/completions" # 替换为目标URL data = { "model": "gpt-4-turbo-preview", "chatId": "2", "messages": [ { "role": "user", "content": "你叫什么" }, ] } headers = { "Authorization": "Bearer fastgpt-MR6gEYaQY1a9n7O2742K7m890vTN0KYFNOI" } response = requests.post(url, json=data, headers=headers, timeout=600) print(response.text) json_data = response.json()
print(json_data["choices"][0]["message"]["content"])` 预期结果
相关截图