MariaFilipkowska commited on
Commit
9d0474a
·
verified ·
1 Parent(s): 5d46b4b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -59,11 +59,11 @@ def get_ref_content(path: str) -> str | object:
59
  file = f.read()
60
  return file
61
 
62
- def search_web(topic: str) -> str:
63
  """Retrieves information about the topic."""
64
- results = DuckDuckGoSearchRun().invoke(topic)
65
  if results:
66
- return "\n\n".join([doc.text for doc in results[:5]])
67
  else:
68
  return "No matching content found."
69
 
 
59
  file = f.read()
60
  return file
61
 
62
+ def search_web(query: str) -> str:
63
  """Retrieves information about the topic."""
64
+ results = DuckDuckGoSearchRun().invoke(query)
65
  if results:
66
+ return "\n\n".join([doc.text for doc in results[:1]])
67
  else:
68
  return "No matching content found."
69