YI Zhongyue commited on
Commit ·
317cd88
1
Parent(s): 7f72cbd
refactor
Browse files- test_agent.py +2 -8
test_agent.py
CHANGED
|
@@ -1,9 +1,3 @@
|
|
| 1 |
-
#!/usr/bin/env python3
|
| 2 |
-
|
| 3 |
-
"""
|
| 4 |
-
Simple test script to verify that our agents work correctly with final_answer()
|
| 5 |
-
"""
|
| 6 |
-
|
| 7 |
import os
|
| 8 |
import pathlib
|
| 9 |
|
|
@@ -22,7 +16,7 @@ if not OPENAI_API_KEY:
|
|
| 22 |
|
| 23 |
# Create model
|
| 24 |
model = OpenAIServerModel(
|
| 25 |
-
model_id="gpt-4o-mini",
|
| 26 |
api_key=OPENAI_API_KEY,
|
| 27 |
)
|
| 28 |
|
|
@@ -34,7 +28,7 @@ def test_simple_calculation():
|
|
| 34 |
model=model,
|
| 35 |
prompt_templates=calc_agent_prompt,
|
| 36 |
additional_authorized_imports=["pandas", "numpy"],
|
| 37 |
-
tools=[]
|
| 38 |
)
|
| 39 |
|
| 40 |
question = "What is the result of 5 + 3 + 1294.678?"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
import os
|
| 2 |
import pathlib
|
| 3 |
|
|
|
|
| 16 |
|
| 17 |
# Create model
|
| 18 |
model = OpenAIServerModel(
|
| 19 |
+
model_id="gpt-4o-mini",
|
| 20 |
api_key=OPENAI_API_KEY,
|
| 21 |
)
|
| 22 |
|
|
|
|
| 28 |
model=model,
|
| 29 |
prompt_templates=calc_agent_prompt,
|
| 30 |
additional_authorized_imports=["pandas", "numpy"],
|
| 31 |
+
tools=[]
|
| 32 |
)
|
| 33 |
|
| 34 |
question = "What is the result of 5 + 3 + 1294.678?"
|