Spaces:
Sleeping
Sleeping
Update server.py
Browse files
server.py
CHANGED
|
@@ -85,12 +85,12 @@ for source, rel_path in SOURCES.items():
|
|
| 85 |
print(f"Error cargando índice en {root}: {str(e)}")
|
| 86 |
continue
|
| 87 |
|
| 88 |
-
# Recurso dinámico para búsqueda
|
| 89 |
@mcp.resource(
|
| 90 |
uri="retriever://documentos",
|
| 91 |
name="DocumentRetriever",
|
| 92 |
description="Retrieve documents from different regulations using semantic search.",
|
| 93 |
-
mime_type="application/json"
|
|
|
|
| 94 |
)
|
| 95 |
def retrieve_docs(query: str, fuente: str = 'oms', top_k: int = 3) -> dict:
|
| 96 |
"""
|
|
|
|
| 85 |
print(f"Error cargando índice en {root}: {str(e)}")
|
| 86 |
continue
|
| 87 |
|
|
|
|
| 88 |
@mcp.resource(
|
| 89 |
uri="retriever://documentos",
|
| 90 |
name="DocumentRetriever",
|
| 91 |
description="Retrieve documents from different regulations using semantic search.",
|
| 92 |
+
mime_type="application/json",
|
| 93 |
+
query_params=["query", "fuente", "top_k"] # <- Agregar esta línea
|
| 94 |
)
|
| 95 |
def retrieve_docs(query: str, fuente: str = 'oms', top_k: int = 3) -> dict:
|
| 96 |
"""
|