Skip to content

Commit 326120b

Browse files
committed
feat(api): add loader_metadata to ADBDataAPI response
This commit enhances the ADBDataAPI by including the loader_metadata field in the response structure for both the async template and data API. This addition allows for better tracking and management of loader-specific metadata associated with matches. Additionally, the example knowledgebase configuration has been updated to reflect a new ADB knowledge base name and modified query execution. Co-developed-by: Aone Copilot <noreply@alibaba-inc.com> Signed-off-by: Sodawyx <sodawyx@126.com>
1 parent 5aedc34 commit 326120b

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

agentrun/knowledgebase/api/__data_async_template.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -467,6 +467,11 @@ def _parse_query_content_response(
467467
"metadata": (
468468
match.metadata if hasattr(match, "metadata") else None
469469
),
470+
"loader_metadata": (
471+
match.loader_metadata
472+
if hasattr(match, "loader_metadata")
473+
else None
474+
),
470475
"rerank_score": (
471476
match.rerank_score
472477
if hasattr(match, "rerank_score")

agentrun/knowledgebase/api/data.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -677,6 +677,11 @@ def _parse_query_content_response(
677677
"metadata": (
678678
match.metadata if hasattr(match, "metadata") else None
679679
),
680+
"loader_metadata": (
681+
match.loader_metadata
682+
if hasattr(match, "loader_metadata")
683+
else None
684+
),
680685
"rerank_score": (
681686
match.rerank_score
682687
if hasattr(match, "rerank_score")

0 commit comments

Comments
 (0)