leonsimon23 commited on
Commit
0e59895
·
verified ·
1 Parent(s): 96f5518

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -2
app.py CHANGED
@@ -6,7 +6,6 @@ API_BASE_URL = "http://key.aistory.uk/v1/chat/completions" # 替换为你自己
6
  API_KEY = "sk-HfD4NYIN6bq2DkSfIiUcciRvo9MkgMdFCsahP9NWEOUPHe8H" # 替换为你自己的 API 密钥
7
 
8
 
9
-
10
  # 定义 AI 响应函数,调用第三方 API
11
  def ai_response(message, chat_history):
12
  # 定义系统提示词
@@ -20,7 +19,7 @@ def ai_response(message, chat_history):
20
 
21
  # 构建请求体
22
  payload = {
23
- "model": "chat-model", # 替换为适当的模型名称
24
  "messages": conversation,
25
  "max_tokens": 150
26
  }
 
6
  API_KEY = "sk-HfD4NYIN6bq2DkSfIiUcciRvo9MkgMdFCsahP9NWEOUPHe8H" # 替换为你自己的 API 密钥
7
 
8
 
 
9
  # 定义 AI 响应函数,调用第三方 API
10
  def ai_response(message, chat_history):
11
  # 定义系统提示词
 
19
 
20
  # 构建请求体
21
  payload = {
22
+ "model": "gpt-4o", # 使用 gpt-4o 模型(如果此模型为该 API 支持的模型)
23
  "messages": conversation,
24
  "max_tokens": 150
25
  }