mirror of
https://github.com/hwchase17/langchain.git
synced 2025-09-23 11:30:37 +00:00
chore(core): enable ruff docstring-code-format (#32834)
See https://docs.astral.sh/ruff/settings/#format_docstring-code-format --------- Co-authored-by: Mason Daugherty <mason@langchain.dev>
This commit is contained in:
committed by
GitHub
parent
e3b6c9bb66
commit
5840dad40b
@@ -82,7 +82,7 @@ class Blob(BaseMedia):
|
||||
blob = Blob.from_data(
|
||||
data="Hello, world!",
|
||||
mime_type="text/plain",
|
||||
metadata={"source": "https://example.com"}
|
||||
metadata={"source": "https://example.com"},
|
||||
)
|
||||
|
||||
Example: Load the blob from a file
|
||||
@@ -263,8 +263,7 @@ class Document(BaseMedia):
|
||||
from langchain_core.documents import Document
|
||||
|
||||
document = Document(
|
||||
page_content="Hello, world!",
|
||||
metadata={"source": "https://example.com"}
|
||||
page_content="Hello, world!", metadata={"source": "https://example.com"}
|
||||
)
|
||||
|
||||
"""
|
||||
|
@@ -38,7 +38,9 @@ class BaseDocumentTransformer(ABC):
|
||||
self.embeddings, stateful_documents
|
||||
)
|
||||
included_idxs = _filter_similar_embeddings(
|
||||
embedded_documents, self.similarity_fn, self.similarity_threshold
|
||||
embedded_documents,
|
||||
self.similarity_fn,
|
||||
self.similarity_threshold,
|
||||
)
|
||||
return [stateful_documents[i] for i in sorted(included_idxs)]
|
||||
|
||||
@@ -47,7 +49,7 @@ class BaseDocumentTransformer(ABC):
|
||||
) -> Sequence[Document]:
|
||||
raise NotImplementedError
|
||||
|
||||
""" # noqa: E501
|
||||
"""
|
||||
|
||||
@abstractmethod
|
||||
def transform_documents(
|
||||
|
Reference in New Issue
Block a user