alisamak commited on
Commit
5404812
·
verified ·
1 Parent(s): 2873be8

Update LG_agent.py

Browse files
Files changed (1) hide show
  1. LG_agent.py +14 -0
LG_agent.py CHANGED
@@ -16,7 +16,21 @@ chat = ChatOpenAI(
16
  model="gpt-3.5-turbo",
17
  openai_api_key=OPENAI_API_KEY,
18
  temperature=0,
 
 
 
 
 
 
 
 
 
 
 
 
 
19
  )
 
20
  chat_with_tools = chat.bind_tools(all_tools)
21
 
22
  # 2. Define the agent state
 
16
  model="gpt-3.5-turbo",
17
  openai_api_key=OPENAI_API_KEY,
18
  temperature=0,
19
+ model_kwargs={
20
+ "messages": [
21
+ {
22
+ "role": "system",
23
+ "content": (
24
+ "You are a step-by-step reasoning assistant. "
25
+ "Always think out loud, use available tools when appropriate, and aim for factual, complete answers. "
26
+ "If you use a tool like search_wikipedia and get a long text response that might contain numbers, "
27
+ "use extract_number_from_text immediately after to summarize the relevant count or value."
28
+ )
29
+ }
30
+ ]
31
+ }
32
  )
33
+
34
  chat_with_tools = chat.bind_tools(all_tools)
35
 
36
  # 2. Define the agent state