naman1102 commited on
Commit
3563dd6
·
1 Parent(s): 51b14d9
Files changed (3) hide show
  1. app.py +2 -0
  2. requirements.txt +2 -1
  3. tools.py +1 -0
app.py CHANGED
@@ -125,6 +125,8 @@ def finalize_node(state: AgentState) -> AgentState:
125
  "Do NOT include any explanation, markdown, or any extra whitespace outside the JSON object. "
126
  "If the answer is multiple words, put them in a comma-separated string, e.g. \"red,green,blue\". "
127
  "If the answer is a number, it must be digits only—e.g. \"725.00\".\n"
 
 
128
  )
129
 
130
  # Debug print
 
125
  "Do NOT include any explanation, markdown, or any extra whitespace outside the JSON object. "
126
  "If the answer is multiple words, put them in a comma-separated string, e.g. \"red,green,blue\". "
127
  "If the answer is a number, it must be digits only—e.g. \"725.00\".\n"
128
+ "If the answer is a list of items, put them in a comma-separated string, e.g. \"item1,item2,item3\". "
129
+ "If the user prompt asks you to do something, then do it "
130
  )
131
 
132
  # Debug print
requirements.txt CHANGED
@@ -9,4 +9,5 @@ pandas
9
  langchain_openai
10
  langchain_community
11
  openai
12
- duckduckgo-search
 
 
9
  langchain_openai
10
  langchain_community
11
  openai
12
+ duckduckgo-search
13
+ regex
tools.py CHANGED
@@ -7,6 +7,7 @@ from PIL import Image
7
  import pytesseract
8
  from state import AgentState
9
  from langchain.schema import HumanMessage
 
10
  def web_search_tool(state: AgentState) -> AgentState:
11
  """
12
  Expects: state["web_search_query"] is a non‐empty string.
 
7
  import pytesseract
8
  from state import AgentState
9
  from langchain.schema import HumanMessage
10
+ import regex as re
11
  def web_search_tool(state: AgentState) -> AgentState:
12
  """
13
  Expects: state["web_search_query"] is a non‐empty string.