liamgh commited on
Commit
7d7e359
·
verified ·
1 Parent(s): b12d24c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -13,7 +13,7 @@ def get_books_for_subject(subject:str, published_in:str)-> str:
13
  """A tool that fetches books for a given keyword.
14
  Args:
15
  subject: A string representing the subject (e.g. 'love', 'cars', 'Girls Aloud')
16
- published_in: A date range for the publication of the book. This is optional. (e.g. "1500-1600", "1980-1989", "")
17
  """
18
  r = requests.get("https://openlibrary.org/subjects/%s.json?pubished_in=%s" % (quote(subject), quote(published_in)))
19
  return r.json()
@@ -56,7 +56,7 @@ with open("prompts.yaml", 'r') as stream:
56
 
57
  agent = CodeAgent(
58
  model=model,
59
- tools=[final_answer, get_books_for_subject], ## add your tools here (don't remove final answer)
60
  max_steps=6,
61
  verbosity_level=1,
62
  grammar=None,
 
13
  """A tool that fetches books for a given keyword.
14
  Args:
15
  subject: A string representing the subject (e.g. 'love', 'cars', 'Girls Aloud')
16
+ published_in: A date range for the publication of the book (e.g. "1500-1600", "1980-1989", "")
17
  """
18
  r = requests.get("https://openlibrary.org/subjects/%s.json?pubished_in=%s" % (quote(subject), quote(published_in)))
19
  return r.json()
 
56
 
57
  agent = CodeAgent(
58
  model=model,
59
+ tools=[final_answer], ## add your tools here (don't remove final answer)
60
  max_steps=6,
61
  verbosity_level=1,
62
  grammar=None,