Skip to content

Fix JSON serialization of Document results in LangChain VectorSearchR…#398

Open
annzhang-db wants to merge 4 commits intomainfrom
fix/vector-search-retriever-json-serialization
Open

Fix JSON serialization of Document results in LangChain VectorSearchR…#398
annzhang-db wants to merge 4 commits intomainfrom
fix/vector-search-retriever-json-serialization

Conversation

@annzhang-db
Copy link
Copy Markdown
Contributor

…etrieverTool

Previously, _run() called json.dumps() on List[Document] objects, which are not JSON-serializable, causing a silent fallback to str(results) — a Python repr string rather than valid JSON. Now each Document is converted to {"page_content": ..., "metadata": ...} before serialization.

Co-authored-by: Isaac

…etrieverTool

Previously, _run() called json.dumps() on List[Document] objects, which
are not JSON-serializable, causing a silent fallback to str(results) — a
Python repr string rather than valid JSON. Now each Document is converted
to {"page_content": ..., "metadata": ...} before serialization.

Co-authored-by: Isaac
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant