Spaces:
Runtime error
Runtime error
Commit ·
0ebde44
1
Parent(s): 421b582
Prompt update
Browse files- .gitignore +3 -1
- __pycache__/agent_tools.cpython-310.pyc +0 -0
- agent_tools.py +2 -2
- app.py +1 -1
- requirements.txt +10 -9
.gitignore
CHANGED
|
@@ -4,4 +4,6 @@ agent_tool_tester.py
|
|
| 4 |
app copy.py
|
| 5 |
scratchpad.ipynb
|
| 6 |
**/*.jpg
|
| 7 |
-
**/*.png
|
|
|
|
|
|
|
|
|
| 4 |
app copy.py
|
| 5 |
scratchpad.ipynb
|
| 6 |
**/*.jpg
|
| 7 |
+
**/*.png
|
| 8 |
+
AI_Agents_Final_Assignment_Template.code-workspace
|
| 9 |
+
__pycache__/agent_tools.cpython-310.pyc
|
__pycache__/agent_tools.cpython-310.pyc
CHANGED
|
Binary files a/__pycache__/agent_tools.cpython-310.pyc and b/__pycache__/agent_tools.cpython-310.pyc differ
|
|
|
agent_tools.py
CHANGED
|
@@ -171,10 +171,10 @@ model = AzureOpenAIServerModel(
|
|
| 171 |
azure_endpoint=os.environ.get("AZURE_OPENAI_ENDPOINT"),
|
| 172 |
api_key=os.environ.get("AZURE_OPENAI_API_KEY"),
|
| 173 |
api_version=os.environ.get("OPENAI_API_VERSION"),
|
| 174 |
-
temperature=1.5,
|
| 175 |
max_tokens=4096
|
| 176 |
)
|
| 177 |
|
| 178 |
-
planning_steps =
|
| 179 |
|
| 180 |
agent = CodeAgent(model=model, tools=tools, additional_authorized_imports=additionals, planning_interval=planning_steps)
|
|
|
|
| 171 |
azure_endpoint=os.environ.get("AZURE_OPENAI_ENDPOINT"),
|
| 172 |
api_key=os.environ.get("AZURE_OPENAI_API_KEY"),
|
| 173 |
api_version=os.environ.get("OPENAI_API_VERSION"),
|
| 174 |
+
#temperature=1.5,
|
| 175 |
max_tokens=4096
|
| 176 |
)
|
| 177 |
|
| 178 |
+
planning_steps = 2
|
| 179 |
|
| 180 |
agent = CodeAgent(model=model, tools=tools, additional_authorized_imports=additionals, planning_interval=planning_steps)
|
app.py
CHANGED
|
@@ -17,7 +17,7 @@ class BasicAgent:
|
|
| 17 |
print("BasicAgent initialized.")
|
| 18 |
def __call__(self, question: str) -> str:
|
| 19 |
print(f"Agent received question (first 50 chars): {question[:50]}...")
|
| 20 |
-
fixed_answer = self.agent.run(question + "\n\nThe final answer for chess or bird questions is N/A.")
|
| 21 |
print(f"Agent returning fixed answer: {fixed_answer}")
|
| 22 |
return fixed_answer
|
| 23 |
|
|
|
|
| 17 |
print("BasicAgent initialized.")
|
| 18 |
def __call__(self, question: str) -> str:
|
| 19 |
print(f"Agent received question (first 50 chars): {question[:50]}...")
|
| 20 |
+
fixed_answer = self.agent.run(question + "\n\nThe final answer for chess or bird questions is N/A. It is vitally important that every response includes a properly formatted code snippet.")
|
| 21 |
print(f"Agent returning fixed answer: {fixed_answer}")
|
| 22 |
return fixed_answer
|
| 23 |
|
requirements.txt
CHANGED
|
@@ -41,19 +41,20 @@ ffmpy==0.5.0
|
|
| 41 |
filelock==3.18.0
|
| 42 |
fqdn==1.5.1
|
| 43 |
frozenlist==1.6.0
|
| 44 |
-
fsspec==
|
| 45 |
google-auth==2.40.2
|
| 46 |
-
google-genai==1.
|
| 47 |
gradio==5.31.0
|
| 48 |
gradio-client==1.10.1
|
| 49 |
greenlet==3.2.2
|
| 50 |
groovy==0.1.2
|
| 51 |
h11==0.16.0
|
| 52 |
hf-xet==1.1.2
|
|
|
|
| 53 |
httpcore==1.0.9
|
| 54 |
httpx==0.28.1
|
| 55 |
httpx-sse==0.4.0
|
| 56 |
-
huggingface-hub==0.32.
|
| 57 |
idna==3.10
|
| 58 |
ipykernel==6.29.5
|
| 59 |
ipython==8.36.0
|
|
@@ -92,7 +93,7 @@ markupsafe==3.0.2
|
|
| 92 |
marshmallow==3.26.1
|
| 93 |
matplotlib-inline==0.1.7
|
| 94 |
mdurl==0.1.2
|
| 95 |
-
mistralai==1.
|
| 96 |
mistune==3.1.3
|
| 97 |
mpmath==1.3.0
|
| 98 |
multidict==6.4.4
|
|
@@ -104,7 +105,7 @@ nest-asyncio==1.6.0
|
|
| 104 |
networkx==3.4.2
|
| 105 |
notebook==7.4.3
|
| 106 |
notebook-shim==0.2.4
|
| 107 |
-
numpy==
|
| 108 |
nvidia-cublas-cu12==12.6.4.1
|
| 109 |
nvidia-cuda-cupti-cu12==12.6.80
|
| 110 |
nvidia-cuda-nvrtc-cu12==12.6.77
|
|
@@ -119,7 +120,7 @@ nvidia-cusparselt-cu12==0.6.3
|
|
| 119 |
nvidia-nccl-cu12==2.26.2
|
| 120 |
nvidia-nvjitlink-cu12==12.6.85
|
| 121 |
nvidia-nvtx-cu12==12.6.77
|
| 122 |
-
openai==1.82.
|
| 123 |
openpyxl==3.1.5
|
| 124 |
orjson==3.10.18
|
| 125 |
overrides==7.7.0
|
|
@@ -164,7 +165,7 @@ rfc3986-validator==0.1.1
|
|
| 164 |
rich==14.0.0
|
| 165 |
rpds-py==0.25.1
|
| 166 |
rsa==4.9.1
|
| 167 |
-
ruff==0.11.
|
| 168 |
safehttpx==0.1.6
|
| 169 |
safetensors==0.5.3
|
| 170 |
semantic-version==2.10.0
|
|
@@ -172,7 +173,7 @@ send2trash==1.8.3
|
|
| 172 |
setuptools==80.9.0
|
| 173 |
shellingham==1.5.4
|
| 174 |
six==1.17.0
|
| 175 |
-
smolagents==1.
|
| 176 |
sniffio==1.3.1
|
| 177 |
soundfile==0.13.1
|
| 178 |
soupsieve==2.7
|
|
@@ -193,7 +194,7 @@ tqdm==4.67.1
|
|
| 193 |
traitlets==5.14.3
|
| 194 |
transformers==4.52.3
|
| 195 |
triton==3.3.0
|
| 196 |
-
typer==0.
|
| 197 |
types-python-dateutil==2.9.0.20250516
|
| 198 |
typing-extensions==4.13.2
|
| 199 |
typing-inspect==0.9.0
|
|
|
|
| 41 |
filelock==3.18.0
|
| 42 |
fqdn==1.5.1
|
| 43 |
frozenlist==1.6.0
|
| 44 |
+
fsspec==2025.5.1
|
| 45 |
google-auth==2.40.2
|
| 46 |
+
google-genai==1.17.0
|
| 47 |
gradio==5.31.0
|
| 48 |
gradio-client==1.10.1
|
| 49 |
greenlet==3.2.2
|
| 50 |
groovy==0.1.2
|
| 51 |
h11==0.16.0
|
| 52 |
hf-xet==1.1.2
|
| 53 |
+
html5lib==1.1
|
| 54 |
httpcore==1.0.9
|
| 55 |
httpx==0.28.1
|
| 56 |
httpx-sse==0.4.0
|
| 57 |
+
huggingface-hub==0.32.2
|
| 58 |
idna==3.10
|
| 59 |
ipykernel==6.29.5
|
| 60 |
ipython==8.36.0
|
|
|
|
| 93 |
marshmallow==3.26.1
|
| 94 |
matplotlib-inline==0.1.7
|
| 95 |
mdurl==0.1.2
|
| 96 |
+
mistralai==1.8.1
|
| 97 |
mistune==3.1.3
|
| 98 |
mpmath==1.3.0
|
| 99 |
multidict==6.4.4
|
|
|
|
| 105 |
networkx==3.4.2
|
| 106 |
notebook==7.4.3
|
| 107 |
notebook-shim==0.2.4
|
| 108 |
+
numpy==2.2.6
|
| 109 |
nvidia-cublas-cu12==12.6.4.1
|
| 110 |
nvidia-cuda-cupti-cu12==12.6.80
|
| 111 |
nvidia-cuda-nvrtc-cu12==12.6.77
|
|
|
|
| 120 |
nvidia-nccl-cu12==2.26.2
|
| 121 |
nvidia-nvjitlink-cu12==12.6.85
|
| 122 |
nvidia-nvtx-cu12==12.6.77
|
| 123 |
+
openai==1.82.1
|
| 124 |
openpyxl==3.1.5
|
| 125 |
orjson==3.10.18
|
| 126 |
overrides==7.7.0
|
|
|
|
| 165 |
rich==14.0.0
|
| 166 |
rpds-py==0.25.1
|
| 167 |
rsa==4.9.1
|
| 168 |
+
ruff==0.11.12
|
| 169 |
safehttpx==0.1.6
|
| 170 |
safetensors==0.5.3
|
| 171 |
semantic-version==2.10.0
|
|
|
|
| 173 |
setuptools==80.9.0
|
| 174 |
shellingham==1.5.4
|
| 175 |
six==1.17.0
|
| 176 |
+
smolagents==1.17.0
|
| 177 |
sniffio==1.3.1
|
| 178 |
soundfile==0.13.1
|
| 179 |
soupsieve==2.7
|
|
|
|
| 194 |
traitlets==5.14.3
|
| 195 |
transformers==4.52.3
|
| 196 |
triton==3.3.0
|
| 197 |
+
typer==0.16.0
|
| 198 |
types-python-dateutil==2.9.0.20250516
|
| 199 |
typing-extensions==4.13.2
|
| 200 |
typing-inspect==0.9.0
|