Spaces:
Build error
Build error
Commit ·
d617788
1
Parent(s): 0c13494
Fix output format
Browse filesSigned-off-by: Aivin V. Solatorio <avsolatorio@gmail.com>
98 unmodified lines9910010110210310410513 unmodified lines11912012112212312412598 unmodified linesreturn {"indicators": [SearchOutput(**out)for out in get_top_k(query=query, top_k=top_k, fields=["idno", "name"])],"note": "IMPORTANT: Let the user know that the search is not exhaustive. The search is based on the semantic similarity of the query to the indicator definitions. It may not be optimal and the LLM may use this as shortlist and pick the most relevant from the list (if any).",13 unmodified linesindicator_ids = [indicator_ids]return [DetailedOutput(**out)for out in df.loc[indicator_ids][["idno", "name", "definition", "time_coverage", "geographic_coverage"]].to_dict("records")98 unmodified lines9910010110210310410513 unmodified lines11912012112212312412598 unmodified linesreturn {"indicators": [SearchOutput(**out).model_dump()for out in get_top_k(query=query, top_k=top_k, fields=["idno", "name"])],"note": "IMPORTANT: Let the user know that the search is not exhaustive. The search is based on the semantic similarity of the query to the indicator definitions. It may not be optimal and the LLM may use this as shortlist and pick the most relevant from the list (if any).",13 unmodified linesindicator_ids = [indicator_ids]return [DetailedOutput(**out).model_dump()for out in df.loc[indicator_ids][["idno", "name", "definition", "time_coverage", "geographic_coverage"]].to_dict("records")
services.py+2-2