junaid17 commited on
Commit
f4a7ce5
·
verified ·
1 Parent(s): 8a0d556

Update tools.py

Browse files
Files changed (1) hide show
  1. tools.py +1 -3
tools.py CHANGED
@@ -83,7 +83,7 @@ def get_retriever():
83
 
84
  def create_rag_tool():
85
 
86
- @tool(return_direct=True)
87
  def rag_search(query: str) -> str:
88
  """
89
  Retrieve and summarize information from uploaded documents.
@@ -117,8 +117,6 @@ Rules:
117
  CONTENT:
118
  {context}
119
  """
120
-
121
- response = llm.invoke(summary_prompt)
122
  return response.content.strip()
123
 
124
  return rag_search
 
83
 
84
  def create_rag_tool():
85
 
86
+ @tool()
87
  def rag_search(query: str) -> str:
88
  """
89
  Retrieve and summarize information from uploaded documents.
 
117
  CONTENT:
118
  {context}
119
  """
 
 
120
  return response.content.strip()
121
 
122
  return rag_search