Update app.py
Browse files
app.py
CHANGED
@@ -4,7 +4,7 @@ import requests
|
|
4 |
import inspect
|
5 |
import pandas as pd
|
6 |
from langchain_tavily import TavilySearch
|
7 |
-
from langchain_sandbox import PyodideSandboxTool
|
8 |
|
9 |
# (Keep Constants as is)
|
10 |
# --- Constants ---
|
@@ -17,7 +17,7 @@ websearch_tool = TavilySearch(
|
|
17 |
topic="general",
|
18 |
)
|
19 |
|
20 |
-
code_interpreter_tool = PyodideSandboxTool(allow_net=True)
|
21 |
|
22 |
# --- Basic Agent Definition ---
|
23 |
# ----- THIS IS WERE YOU CAN BUILD WHAT YOU WANT ------
|
@@ -27,8 +27,8 @@ class BasicAgent:
|
|
27 |
self.llm = init_chat_model(model="openai:gpt-4.1")
|
28 |
self.agent = create_react_agent(
|
29 |
model=self.llm,
|
30 |
-
tools=[websearch_tool
|
31 |
-
prompt="You are a helpful assistant. You can use
|
32 |
)
|
33 |
print("BasicAgent initialized.")
|
34 |
except Exception as e:
|
|
|
4 |
import inspect
|
5 |
import pandas as pd
|
6 |
from langchain_tavily import TavilySearch
|
7 |
+
# from langchain_sandbox import PyodideSandboxTool
|
8 |
|
9 |
# (Keep Constants as is)
|
10 |
# --- Constants ---
|
|
|
17 |
topic="general",
|
18 |
)
|
19 |
|
20 |
+
# code_interpreter_tool = PyodideSandboxTool(allow_net=True)
|
21 |
|
22 |
# --- Basic Agent Definition ---
|
23 |
# ----- THIS IS WERE YOU CAN BUILD WHAT YOU WANT ------
|
|
|
27 |
self.llm = init_chat_model(model="openai:gpt-4.1")
|
28 |
self.agent = create_react_agent(
|
29 |
model=self.llm,
|
30 |
+
tools=[websearch_tool],
|
31 |
+
prompt="You are a helpful assistant. You can use websearch tool to answer some questions."
|
32 |
)
|
33 |
print("BasicAgent initialized.")
|
34 |
except Exception as e:
|