manu commited on
Commit
603af32
·
verified ·
1 Parent(s): 6118bc2

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -154,7 +154,7 @@ def index_from_url(url: str) -> tuple[str, str]:
154
  # -----------------------------
155
  # Search (MCP tool-friendly)
156
  # -----------------------------
157
- def search(query: str, k: int):
158
  """
159
  Search within a PDF document for the most relevant pages to answer a query and synthetizes a short grounded answer using only those pages.
160
 
@@ -165,7 +165,7 @@ def search(query: str, k: int):
165
  type: object
166
  properties:
167
  query: {type: string, description: "User query in natural language."}
168
- k: {type: integer, minimum: 1, maximum: 10, description: "Number of top pages to retrieve."}
169
  required: ["query"]
170
 
171
  Args:
 
154
  # -----------------------------
155
  # Search (MCP tool-friendly)
156
  # -----------------------------
157
+ def search(query: str, k: int = 5):
158
  """
159
  Search within a PDF document for the most relevant pages to answer a query and synthetizes a short grounded answer using only those pages.
160
 
 
165
  type: object
166
  properties:
167
  query: {type: string, description: "User query in natural language."}
168
+ k: {type: integer, minimum: 1, maximum: 20, default: 5. description: "Number of top pages to retrieve."}
169
  required: ["query"]
170
 
171
  Args: