Spaces:
Running
Running
Daniel Amendoeira
commited on
Update agent.py
Browse files
agent.py
CHANGED
@@ -15,6 +15,7 @@ from prompt import system_prompt
|
|
15 |
|
16 |
# gpt-4.1-nano (cheaper for debugging) with temperature 0 for less randomness
|
17 |
# for benchmarking use 04-mini (better reasoning) or gpt-4.1-mini
|
|
|
18 |
llm = ChatOpenAI(
|
19 |
model="gpt-4.1-nano",
|
20 |
api_key=os.getenv("OPENAI_API_KEY"),
|
@@ -95,7 +96,7 @@ builder.add_edge("environment", "llm_call") # after running the tools go back t
|
|
95 |
|
96 |
gaia_agent = builder.compile() # converts my builder into a runnable agent by using gaia_agent.invoke()
|
97 |
|
98 |
-
#
|
99 |
class LangGraphAgent:
|
100 |
def __init__(self):
|
101 |
print("LangGraphAgent initialized.")
|
|
|
15 |
|
16 |
# gpt-4.1-nano (cheaper for debugging) with temperature 0 for less randomness
|
17 |
# for benchmarking use 04-mini (better reasoning) or gpt-4.1-mini
|
18 |
+
|
19 |
llm = ChatOpenAI(
|
20 |
model="gpt-4.1-nano",
|
21 |
api_key=os.getenv("OPENAI_API_KEY"),
|
|
|
96 |
|
97 |
gaia_agent = builder.compile() # converts my builder into a runnable agent by using gaia_agent.invoke()
|
98 |
|
99 |
+
# Wrapper class to initialize and call the LangGraph agent with a user question
|
100 |
class LangGraphAgent:
|
101 |
def __init__(self):
|
102 |
print("LangGraphAgent initialized.")
|