[PR #89] [CLOSED] Not able to serialize object id from mongodb #339

Closed
opened 2026-02-16 00:20:12 -05:00 by yindo · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/langchain-ai/langserve/pull/89
Author: @harris
Created: 10/23/2023
Status: Closed

Base: mainHead: fix-mongoid-not-serializable


📝 Commits (1)

  • 7c0c148 fix: When serializing a message, convert ObjectId to string

📊 Changes

1 file changed (+3 additions, -0 deletions)

View changed files

📝 langserve/serialization.py (+3 -0)

📄 Description

Encountered this issue when using the stream endpoint only. The invoke endpoint seems to work without this change. An alternative is to not detecting the Object Id and treat everything like a plain string.

I could offer the mongodb chain in PM if needed. ty


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/langchain-ai/langserve/pull/89 **Author:** [@harris](https://github.com/harris) **Created:** 10/23/2023 **Status:** ❌ Closed **Base:** `main` ← **Head:** `fix-mongoid-not-serializable` --- ### 📝 Commits (1) - [`7c0c148`](https://github.com/langchain-ai/langserve/commit/7c0c1488e1fe9657d2f73a7932db91797a23e5bd) fix: When serializing a message, convert ObjectId to string ### 📊 Changes **1 file changed** (+3 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `langserve/serialization.py` (+3 -0) </details> ### 📄 Description Encountered this issue when using the stream endpoint only. The invoke endpoint seems to work without this change. An alternative is to not detecting the Object Id and treat everything like a plain string. I could offer the mongodb chain in PM if needed. ty --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
yindo added the pull-request label 2026-02-16 00:20:12 -05:00
yindo closed this issue 2026-02-16 00:20:12 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langchain-ai/langserve#339