From 3a6bbd28919df5485f59726508274c1ff7d8f272 Mon Sep 17 00:00:00 2001 From: Dmitry Paramonov Date: Thu, 23 May 2024 15:12:44 +0300 Subject: [PATCH] fix: Fix doc listing query --- agents-api/agents_api/models/docs/list_docs.py | 5 ++--- agents-api/agents_api/routers/agents/routers.py | 1 + 2 files changed, 3 insertions(+), 3 deletions(-) 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() ]