MCPcopy Index your code
hub / github.com/TaskingAI/TaskingAI / ui_fetch_retrievals

Function ui_fetch_retrievals

backend/app/services/retrieval/retrieval.py:86–96  ·  view source on GitHub ↗
(retrievals: List[Dict])

Source from the content-addressed store, hash-verified

84
85
86async def ui_fetch_retrievals(retrievals: List[Dict]) -> List[Dict]:
87 from app.operators import collection_ops
88
89 for retrieval in retrievals:
90 if retrieval["type"] == RetrievalType.COLLECTION:
91 collection = await collection_ops.get(collection_id=retrieval["id"])
92 if collection:
93 retrieval["name"] = collection.name
94 else:
95 raise ValueError(f"Unsupported retrieval type {retrieval['type']}")
96 return retrievals

Callers 2

api_ui_get_assistantFunction · 0.90
api_ui_list_assistantsFunction · 0.90

Calls 1

getMethod · 0.45

Tested by

no test coverage detected