mirror of
https://github.com/open-webui/open-webui
synced 2024-11-16 05:24:02 +00:00
refac
This commit is contained in:
parent
7078af635c
commit
7b330d1490
@ -474,7 +474,6 @@ from typing import Optional, Sequence
|
|||||||
|
|
||||||
from langchain_core.callbacks import Callbacks
|
from langchain_core.callbacks import Callbacks
|
||||||
from langchain_core.documents import BaseDocumentCompressor, Document
|
from langchain_core.documents import BaseDocumentCompressor, Document
|
||||||
from langchain_core.pydantic_v1 import Extra
|
|
||||||
|
|
||||||
|
|
||||||
class RerankCompressor(BaseDocumentCompressor):
|
class RerankCompressor(BaseDocumentCompressor):
|
||||||
@ -484,7 +483,7 @@ class RerankCompressor(BaseDocumentCompressor):
|
|||||||
r_score: float
|
r_score: float
|
||||||
|
|
||||||
class Config:
|
class Config:
|
||||||
extra = Extra.forbid
|
extra = "forbid"
|
||||||
arbitrary_types_allowed = True
|
arbitrary_types_allowed = True
|
||||||
|
|
||||||
def compress_documents(
|
def compress_documents(
|
||||||
|
Loading…
Reference in New Issue
Block a user