Spaces:
Sleeping
Sleeping
Update server.py
Browse files
server.py
CHANGED
|
@@ -127,27 +127,7 @@ def retrieve_docs(
|
|
| 127 |
top_k (int, opcional): N煤mero m谩ximo de resultados por retriever. Default: 3
|
| 128 |
|
| 129 |
Retorna:
|
| 130 |
-
dict
|
| 131 |
-
"query": str, # Texto buscado
|
| 132 |
-
"results": {
|
| 133 |
-
"retriever_name": {
|
| 134 |
-
"documents": [
|
| 135 |
-
{
|
| 136 |
-
"content": str, # Texto del documento
|
| 137 |
-
"metadata": dict, # Metadatos del documento
|
| 138 |
-
"score": float # Puntaje de relevancia
|
| 139 |
-
}
|
| 140 |
-
],
|
| 141 |
-
"description": str, # Descripci贸n del retriever
|
| 142 |
-
"source": str # Fuente (oms, fda, etc.)
|
| 143 |
-
}
|
| 144 |
-
},
|
| 145 |
-
"top_k": int,
|
| 146 |
-
"warnings": { # Solo si hay errores
|
| 147 |
-
"invalid_retrievers": [str], # Nombres no v谩lidos
|
| 148 |
-
"valid_options": [str] # Retrievers disponibles
|
| 149 |
-
}
|
| 150 |
-
}
|
| 151 |
|
| 152 |
Ejemplo de uso:
|
| 153 |
retrieve_docs(
|
|
|
|
| 127 |
top_k (int, opcional): N煤mero m谩ximo de resultados por retriever. Default: 3
|
| 128 |
|
| 129 |
Retorna:
|
| 130 |
+
dict
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 131 |
|
| 132 |
Ejemplo de uso:
|
| 133 |
retrieve_docs(
|