diff --git a/agents-api/agents_api/models/docs/list_docs.py b/agents-api/agents_api/models/docs/list_docs.py index 3e150532a..b8e4e1648 100644 --- a/agents-api/agents_api/models/docs/list_docs.py +++ b/agents-api/agents_api/models/docs/list_docs.py @@ -69,14 +69,13 @@ def list_docs_snippets_by_owner_query( created_at, metadata, }}, - {metadata_filter_str} - *information_snippets {{ doc_id, snippet_idx, title, snippet, - }} + }}, + {metadata_filter_str} }}""" return (query, {"owner_id": owner_id}) diff --git a/agents-api/agents_api/routers/agents/routers.py b/agents-api/agents_api/routers/agents/routers.py index 7de634549..d79a7b60e 100644 --- a/agents-api/agents_api/routers/agents/routers.py +++ b/agents-api/agents_api/routers/agents/routers.py @@ -368,6 +368,7 @@ async def list_docs( id=row["doc_id"], title=row["title"], content=row["snippet"], + metadata=row.get("metadata") ) for _, row in resp.iterrows() ]