Spaces:
Sleeping
Sleeping
Update tools.py
Browse files
tools.py
CHANGED
|
@@ -83,7 +83,7 @@ def get_retriever():
|
|
| 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,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
|