Update app.py
Browse files
app.py
CHANGED
|
@@ -86,8 +86,20 @@ def run_and_submit_all( profile: gr.OAuthProfile | None):
|
|
| 86 |
# 1. Instantiate Agent ( modify this part to create your agent)
|
| 87 |
try:
|
| 88 |
# agent = BasicAgent()
|
| 89 |
-
|
| 90 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 91 |
|
| 92 |
except Exception as e:
|
| 93 |
print(f"Error instantiating agent: {e}")
|
|
|
|
| 86 |
# 1. Instantiate Agent ( modify this part to create your agent)
|
| 87 |
try:
|
| 88 |
# agent = BasicAgent()
|
| 89 |
+
openai_41mini_model = OpenAIServerModel(
|
| 90 |
+
model_id="gpt-4.1-mini",
|
| 91 |
+
api_base="https://api.openai.com/v1",
|
| 92 |
+
api_key=os.environ["OPENAI_API_KEY"],
|
| 93 |
+
)
|
| 94 |
+
my_small_agent = CodeAgent(
|
| 95 |
+
model=openai_41nano_model,
|
| 96 |
+
tools=[search_web],
|
| 97 |
+
name="web_agent",
|
| 98 |
+
description="Use search engine to find webpages related to a subject and get the page content",
|
| 99 |
+
#additional_authorized_imports=["pandas", "numpy","bs4"],
|
| 100 |
+
verbosity_level=1,
|
| 101 |
+
max_steps=7,
|
| 102 |
+
)
|
| 103 |
|
| 104 |
except Exception as e:
|
| 105 |
print(f"Error instantiating agent: {e}")
|