yooke commited on
Commit
8f41e23
·
verified ·
1 Parent(s): e26ad9d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -1
app.py CHANGED
@@ -17,7 +17,13 @@ class BasicAgent:
17
  print("BasicAgent initialized.")
18
  # Initialize the model
19
  #model = HfApiModel()
20
- model = OpenAIServerModel(model_id="deepseek-chat")
 
 
 
 
 
 
21
  # Initialize the search tool
22
  search_tool = DuckDuckGoSearchTool()
23
  # Initialize Agent
 
17
  print("BasicAgent initialized.")
18
  # Initialize the model
19
  #model = HfApiModel()
20
+ if not DEEPSEEK_API_KEY: # 添加一个检查,确保密钥已设置
21
+ raise ValueError("DEEPSEEK_API_KEY environment variable not set. Please set it before running.")
22
+
23
+ model = OpenAIServerModel(
24
+ model_id="deepseek-chat",
25
+ api_key=DEEPSEEK_API_KEY
26
+ )
27
  # Initialize the search tool
28
  search_tool = DuckDuckGoSearchTool()
29
  # Initialize Agent