MCPcopy Create free account
hub / github.com/dataease/SQLBot / get_one

Function get_one

backend/apps/system/api/assistant.py:263–268  ·  view source on GitHub ↗
(session: SessionDep, id: int = Path(description="ID"))

Source from the content-addressed store, hash-verified

261
262@router.get("/{id}", response_model=AssistantModel, summary=f"{PLACEHOLDER_PREFIX}assistant_query_api", description=f"{PLACEHOLDER_PREFIX}assistant_query_api")
263async def get_one(session: SessionDep, id: int = Path(description="ID")):
264 db_model = await get_assistant_info(session=session, assistant_id=id)
265 if not db_model:
266 raise ValueError(f"AssistantModel with id {id} not found")
267 db_model = AssistantModel.model_validate(db_model)
268 return db_model
269
270
271@router.delete("/{id}", summary=f"{PLACEHOLDER_PREFIX}assistant_del_api", description=f"{PLACEHOLDER_PREFIX}assistant_del_api")

Callers

nothing calls this directly

Calls 1

get_assistant_infoFunction · 0.90

Tested by

no test coverage detected