Update app.py
Browse files
app.py
CHANGED
|
@@ -21,7 +21,7 @@ You are an intelligent agent designed to answer questions using the tools at you
|
|
| 21 |
You will receive a question from the user, and you can choose to either answer it directly or use the provided tools to gather more information before answering.
|
| 22 |
Always try to provide the most accurate and complete answer possible. If you use a tool, make sure to incorporate the information you get from it into your final answer.
|
| 23 |
Plan your approach before answering and don't hesitate to use the tools if they can help you provide a better answer.
|
| 24 |
-
Your final must include only the answer to the user's question, without any additional commentary or explanation.
|
| 25 |
"""
|
| 26 |
|
| 27 |
# --- Basic Agent Definition ---
|
|
@@ -34,7 +34,7 @@ class AgentState(TypedDict):
|
|
| 34 |
class BasicAgent:
|
| 35 |
def __init__(self):
|
| 36 |
self.llm = ChatOpenAI(
|
| 37 |
-
model="
|
| 38 |
base_url="https://openrouter.ai/api/v1",
|
| 39 |
api_key=os.environ.get("OPENROUTER_API_KEY")
|
| 40 |
)
|
|
@@ -54,9 +54,6 @@ class BasicAgent:
|
|
| 54 |
)
|
| 55 |
builder.add_edge("tools", "assistant")
|
| 56 |
self.agent = builder.compile()
|
| 57 |
-
|
| 58 |
-
|
| 59 |
-
|
| 60 |
print("BasicAgent initialized.")
|
| 61 |
def assistant(self, state: AgentState) -> dict:
|
| 62 |
return {
|
|
|
|
| 21 |
You will receive a question from the user, and you can choose to either answer it directly or use the provided tools to gather more information before answering.
|
| 22 |
Always try to provide the most accurate and complete answer possible. If you use a tool, make sure to incorporate the information you get from it into your final answer.
|
| 23 |
Plan your approach before answering and don't hesitate to use the tools if they can help you provide a better answer.
|
| 24 |
+
Your final answer must include only the answer to the user's question, without any additional commentary or explanation.
|
| 25 |
"""
|
| 26 |
|
| 27 |
# --- Basic Agent Definition ---
|
|
|
|
| 34 |
class BasicAgent:
|
| 35 |
def __init__(self):
|
| 36 |
self.llm = ChatOpenAI(
|
| 37 |
+
model="stepfun/step-3.5-flash:free",
|
| 38 |
base_url="https://openrouter.ai/api/v1",
|
| 39 |
api_key=os.environ.get("OPENROUTER_API_KEY")
|
| 40 |
)
|
|
|
|
| 54 |
)
|
| 55 |
builder.add_edge("tools", "assistant")
|
| 56 |
self.agent = builder.compile()
|
|
|
|
|
|
|
|
|
|
| 57 |
print("BasicAgent initialized.")
|
| 58 |
def assistant(self, state: AgentState) -> dict:
|
| 59 |
return {
|