Update agent.py
Browse files
agent.py
CHANGED
@@ -1,4 +1,4 @@
|
|
1 |
-
from llama_index.llms.
|
2 |
from llama_index.tools.wikipedia.base import WikipediaToolSpec
|
3 |
from llama_index.core.llms import ChatMessage
|
4 |
from llama_index.core.agent import ReActAgent
|
@@ -69,10 +69,10 @@ class JoroBasicAgent:
|
|
69 |
Below is the current conversation consisting of interleaving human and assistant messages.
|
70 |
"""
|
71 |
react_system_prompt = PromptTemplate(system_prompt)
|
72 |
-
#llm =
|
73 |
-
|
74 |
-
model="meta-llama/Llama-4-Maverick-17B-128E-Instruct-FP8",api_key=os.getenv("DEEPINFRA_API_KEY"))
|
75 |
|
|
|
76 |
agent = ReActAgent.from_tools(
|
77 |
llm=llm,
|
78 |
tools=WikipediaToolSpec().to_tool_list() + TavilyToolSpec(api_key=os.getenv('TAVILY_API_KEY')).to_tool_list(),
|
|
|
1 |
+
from llama_index.llms.openai import OpenAI
|
2 |
from llama_index.tools.wikipedia.base import WikipediaToolSpec
|
3 |
from llama_index.core.llms import ChatMessage
|
4 |
from llama_index.core.agent import ReActAgent
|
|
|
69 |
Below is the current conversation consisting of interleaving human and assistant messages.
|
70 |
"""
|
71 |
react_system_prompt = PromptTemplate(system_prompt)
|
72 |
+
#llm = DeepInfraLLM(
|
73 |
+
# model="meta-llama/Llama-4-Maverick-17B-128E-Instruct-FP8",api_key=os.getenv("DEEPINFRA_API_KEY"))
|
|
|
74 |
|
75 |
+
llm = OpenAI(model='gpt-4o')
|
76 |
agent = ReActAgent.from_tools(
|
77 |
llm=llm,
|
78 |
tools=WikipediaToolSpec().to_tool_list() + TavilyToolSpec(api_key=os.getenv('TAVILY_API_KEY')).to_tool_list(),
|