[PR #188] [MERGED] Update examples to use pydantic v1 for safety #412

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

📋 Pull Request Information

Original PR: https://github.com/langchain-ai/langserve/pull/188
Author: @eyurtsev
Created: 11/7/2023
Status: Merged
Merged: 11/8/2023
Merged by: @eyurtsev

Base: mainHead: eugene/use_langchain_pydantic_v1


📝 Commits (2)

📊 Changes

4 files changed (+4 additions, -4 deletions)

View changed files

📝 examples/agent/server.py (+1 -1)
📝 examples/conversational_retrieval_chain/server.py (+1 -1)
📝 examples/file_processing/server.py (+1 -1)
📝 examples/widgets/server.py (+1 -1)

📄 Description

This PR updates all exmaples to use langchain pydantic v1 namespace when using pydantic.

The reason is that most of langchain objects are still using on pydantic v1 and
code should not mix v1 and v2.


🔄 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/188 **Author:** [@eyurtsev](https://github.com/eyurtsev) **Created:** 11/7/2023 **Status:** ✅ Merged **Merged:** 11/8/2023 **Merged by:** [@eyurtsev](https://github.com/eyurtsev) **Base:** `main` ← **Head:** `eugene/use_langchain_pydantic_v1` --- ### 📝 Commits (2) - [`96185a0`](https://github.com/langchain-ai/langserve/commit/96185a02cde9ee8ca6b694e45bcfe895a3fe3caf) x - [`0dfc764`](https://github.com/langchain-ai/langserve/commit/0dfc764fc7302397c5e470db830e42c423cbe756) x ### 📊 Changes **4 files changed** (+4 additions, -4 deletions) <details> <summary>View changed files</summary> 📝 `examples/agent/server.py` (+1 -1) 📝 `examples/conversational_retrieval_chain/server.py` (+1 -1) 📝 `examples/file_processing/server.py` (+1 -1) 📝 `examples/widgets/server.py` (+1 -1) </details> ### 📄 Description This PR updates all exmaples to use langchain pydantic v1 namespace when using pydantic. The reason is that most of langchain objects are still using on pydantic v1 and code should not mix v1 and v2. --- <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:28 -05:00
yindo closed this issue 2026-02-16 00:20:28 -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#412