[PR #8315] [CLOSED] example: update langchain-python-rag-websummary, resolve deprecated class problem #74979

Closed
opened 2026-05-05 07:19:30 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ollama/ollama/pull/8315
Author: @Talen-520
Created: 1/6/2025
Status: Closed

Base: mainHead: example-bugfix


📝 Commits (1)

  • c4a3eff refactor: update import for Ollama and modify requirements for langchain-ollama

📊 Changes

2 files changed (+5 additions, -3 deletions)

View changed files

📝 examples/langchain-python-rag-websummary/main.py (+2 -2)
📝 examples/langchain-python-rag-websummary/requirements.txt (+3 -1)

📄 Description

Issue
When running the original code, the following deprecation warning is encountered:

LangChainDeprecationWarning: The class Ollama was deprecated in LangChain 0.3.1 and will be removed in 1.0.0.

Changes Made

  • Replaced the deprecated Ollama class with the updated implementation, it work with most recent LangChain version.
  • Added BeautifulSoup4 to the project dependencies to support WebBaseLoader.

🔄 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/ollama/ollama/pull/8315 **Author:** [@Talen-520](https://github.com/Talen-520) **Created:** 1/6/2025 **Status:** ❌ Closed **Base:** `main` ← **Head:** `example-bugfix` --- ### 📝 Commits (1) - [`c4a3eff`](https://github.com/ollama/ollama/commit/c4a3effea6f63a2c5d2764e4aa14b1ca6aa27fe6) refactor: update import for Ollama and modify requirements for langchain-ollama ### 📊 Changes **2 files changed** (+5 additions, -3 deletions) <details> <summary>View changed files</summary> 📝 `examples/langchain-python-rag-websummary/main.py` (+2 -2) 📝 `examples/langchain-python-rag-websummary/requirements.txt` (+3 -1) </details> ### 📄 Description **Issue** When running the original code, the following deprecation warning is encountered: ```bash LangChainDeprecationWarning: The class Ollama was deprecated in LangChain 0.3.1 and will be removed in 1.0.0. ``` **Changes Made** - Replaced the deprecated Ollama class with the updated implementation, it work with most recent LangChain version. - Added BeautifulSoup4 to the project dependencies to support WebBaseLoader. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-05-05 07:19:30 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#74979