Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -17,7 +17,13 @@ class BasicAgent:
|
|
| 17 |
print("BasicAgent initialized.")
|
| 18 |
# Initialize the model
|
| 19 |
#model = HfApiModel()
|
| 20 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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
|