mirror of
https://github.com/open-webui/open-webui.git
synced 2026-01-03 23:25:21 +00:00
chore: update langchain 1.2.0 (#19991)
* chore: update langchain 1.2.0 * chore: format
This commit is contained in:
parent
2e7c7d635d
commit
37085ed42b
5 changed files with 18 additions and 8 deletions
|
|
@ -12,7 +12,10 @@ import re
|
|||
|
||||
from urllib.parse import quote
|
||||
from huggingface_hub import snapshot_download
|
||||
from langchain.retrievers import ContextualCompressionRetriever, EnsembleRetriever
|
||||
from langchain_classic.retrievers import (
|
||||
ContextualCompressionRetriever,
|
||||
EnsembleRetriever,
|
||||
)
|
||||
from langchain_community.retrievers import BM25Retriever
|
||||
from langchain_core.documents import Document
|
||||
|
||||
|
|
|
|||
|
|
@ -28,8 +28,11 @@ from pydantic import BaseModel
|
|||
import tiktoken
|
||||
|
||||
|
||||
from langchain.text_splitter import RecursiveCharacterTextSplitter, TokenTextSplitter
|
||||
from langchain_text_splitters import MarkdownHeaderTextSplitter
|
||||
from langchain_text_splitters import (
|
||||
RecursiveCharacterTextSplitter,
|
||||
TokenTextSplitter,
|
||||
MarkdownHeaderTextSplitter,
|
||||
)
|
||||
from langchain_core.documents import Document
|
||||
|
||||
from open_webui.models.files import FileModel, FileUpdateForm, Files
|
||||
|
|
|
|||
|
|
@ -191,7 +191,9 @@ class YdocManager:
|
|||
async def remove_user_from_all_documents(self, user_id: str):
|
||||
if self._redis:
|
||||
keys = []
|
||||
async for key in self._redis.scan_iter(match=f"{self._redis_key_prefix}:*", count=100):
|
||||
async for key in self._redis.scan_iter(
|
||||
match=f"{self._redis_key_prefix}:*", count=100
|
||||
):
|
||||
keys.append(key)
|
||||
for key in keys:
|
||||
if key.endswith(":users"):
|
||||
|
|
|
|||
|
|
@ -1318,9 +1318,9 @@ class OAuthManager:
|
|||
client = self.get_client(provider)
|
||||
if client is None:
|
||||
raise HTTPException(404)
|
||||
|
||||
|
||||
kwargs = {}
|
||||
if (auth_manager_config.OAUTH_AUDIENCE):
|
||||
if auth_manager_config.OAUTH_AUDIENCE:
|
||||
kwargs["audience"] = auth_manager_config.OAUTH_AUDIENCE
|
||||
|
||||
return await client.authorize_redirect(request, redirect_uri, **kwargs)
|
||||
|
|
|
|||
|
|
@ -45,8 +45,10 @@ anthropic
|
|||
google-genai==1.56.0
|
||||
google-generativeai==0.8.6
|
||||
|
||||
langchain==0.3.27
|
||||
langchain-community==0.3.29
|
||||
langchain==1.2.0
|
||||
langchain-community==0.4.1
|
||||
langchain-classic==1.0.0
|
||||
langchain-text-splitters==1.1.0
|
||||
|
||||
fake-useragent==2.2.0
|
||||
chromadb==1.3.7
|
||||
|
|
|
|||
Loading…
Reference in a new issue