Spaces:
Runtime error
Runtime error
Update LG_agent.py
Browse files- LG_agent.py +9 -4
LG_agent.py
CHANGED
|
@@ -12,13 +12,18 @@ chat = ChatOpenAI(
|
|
| 12 |
model="gpt-3.5-turbo",
|
| 13 |
openai_api_key=os.getenv("OPENAI_API_KEY"),
|
| 14 |
temperature=0,
|
| 15 |
-
|
| 16 |
-
"
|
| 17 |
-
|
| 18 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 19 |
)
|
| 20 |
|
| 21 |
chat_with_tools = chat.bind_tools(all_tools)
|
|
|
|
| 22 |
|
| 23 |
# 2. Define the agent state
|
| 24 |
class AgentState(TypedDict):
|
|
|
|
| 12 |
model="gpt-3.5-turbo",
|
| 13 |
openai_api_key=os.getenv("OPENAI_API_KEY"),
|
| 14 |
temperature=0,
|
| 15 |
+
model_kwargs={
|
| 16 |
+
"system_message": (
|
| 17 |
+
"You are a step-by-step reasoning assistant. "
|
| 18 |
+
"Always think out loud, use available tools when appropriate, and aim for factual, complete answers."
|
| 19 |
+
)
|
| 20 |
+
}
|
| 21 |
+
),
|
| 22 |
+
temperature=0,
|
| 23 |
)
|
| 24 |
|
| 25 |
chat_with_tools = chat.bind_tools(all_tools)
|
| 26 |
+
)
|
| 27 |
|
| 28 |
# 2. Define the agent state
|
| 29 |
class AgentState(TypedDict):
|