sarath2803 commited on
Commit
fa2116a
·
verified ·
1 Parent(s): f4877c1

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -3
app.py CHANGED
@@ -4,12 +4,11 @@ import requests
4
  import inspect
5
  import pandas as pd
6
  #mode requirement
7
- from smolagents import DuckDuckGoSearchTool,load_tool, tool
8
  from typing import TypedDict, List, Dict, Any, Optional
9
  from langgraph.graph import StateGraph, END
10
  from langchain_openai import ChatOpenAI
11
  from langchain_core.messages import HumanMessage
12
- from langchain.agents import initialize_agent
13
 
14
  # (Keep Constants as is)
15
  # --- Constants ---
@@ -142,7 +141,7 @@ class BasicAgent:
142
  If you are given a task to create an image,you can use the image_generation_tool.
143
  """
144
  llm = ChatOpenAI(model="gpt-4o", temperature=0)
145
- self.agent= initialize_agent(
146
  tools = [add, subtract, multiply, divide, web_search, image_generation_tool],
147
  llm=llm,
148
  )
 
4
  import inspect
5
  import pandas as pd
6
  #mode requirement
7
+ from smolagents import DuckDuckGoSearchTool,load_tool, tool,CodeAgent
8
  from typing import TypedDict, List, Dict, Any, Optional
9
  from langgraph.graph import StateGraph, END
10
  from langchain_openai import ChatOpenAI
11
  from langchain_core.messages import HumanMessage
 
12
 
13
  # (Keep Constants as is)
14
  # --- Constants ---
 
141
  If you are given a task to create an image,you can use the image_generation_tool.
142
  """
143
  llm = ChatOpenAI(model="gpt-4o", temperature=0)
144
+ self.agent= CodeAgent(
145
  tools = [add, subtract, multiply, divide, web_search, image_generation_tool],
146
  llm=llm,
147
  )