cowrycode commited on
Commit
42ed707
·
verified ·
1 Parent(s): b53dcea

Update agent.py

Browse files
Files changed (1) hide show
  1. agent.py +3 -6
agent.py CHANGED
@@ -6,13 +6,12 @@ from youtube_tool import youtube_transcript_tool, youtube_transcript_snippet_too
6
  from multiple_tools import round_to_two_decimals_tool, text_inverter_tool, google_web_search_tool, wikipedia_search_tool
7
 
8
 
9
- async def smart_agent(question : str, api_key : str) -> str:
10
  llm = HuggingFaceInferenceAPI(
11
  model_name="deepseek-ai/DeepSeek-R1-0528",
12
  token=api_key,
13
  provider="auto",
14
- max_iterations=10,
15
- max_execution_time=60
16
  )
17
 
18
  # Create Alfred, our gala agent, with the guest info tool
@@ -20,6 +19,4 @@ async def smart_agent(question : str, api_key : str) -> str:
20
  [wikipedia_search_tool, youtube_transcript_tool, youtube_transcript_snippet_tool, round_to_two_decimals_tool, text_inverter_tool, google_web_search_tool],
21
  llm=llm,
22
  )
23
- # Example query Alfred might receive during the gala
24
- response = await llamaindex_agent.run(question)
25
- return response
 
6
  from multiple_tools import round_to_two_decimals_tool, text_inverter_tool, google_web_search_tool, wikipedia_search_tool
7
 
8
 
9
+ async def smart_agent(api_key : str) -> AgentWorkflow:
10
  llm = HuggingFaceInferenceAPI(
11
  model_name="deepseek-ai/DeepSeek-R1-0528",
12
  token=api_key,
13
  provider="auto",
14
+ max_iterations=10
 
15
  )
16
 
17
  # Create Alfred, our gala agent, with the guest info tool
 
19
  [wikipedia_search_tool, youtube_transcript_tool, youtube_transcript_snippet_tool, round_to_two_decimals_tool, text_inverter_tool, google_web_search_tool],
20
  llm=llm,
21
  )
22
+ return llamaindex_agent