langchain[patch]: example_selector import fix (#20676)

Cleaned up updated imports
This commit is contained in:
Leonid Ganeline 2024-04-19 18:42:18 -07:00 committed by GitHub
parent d6470aab60
commit 06d18c106d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 6 additions and 5 deletions

View File

@ -27,6 +27,9 @@ from multiple components. Prompt classes and functions make constructing
ChatPromptValue ChatPromptValue
""" # noqa: E501 """ # noqa: E501
from langchain_community.example_selectors.ngram_overlap import (
NGramOverlapExampleSelector,
)
from langchain_core.example_selectors import ( from langchain_core.example_selectors import (
LengthBasedExampleSelector, LengthBasedExampleSelector,
MaxMarginalRelevanceExampleSelector, MaxMarginalRelevanceExampleSelector,
@ -50,7 +53,6 @@ from langchain_core.prompts import (
load_prompt, load_prompt,
) )
from langchain.prompts.example_selector import NGramOverlapExampleSelector
from langchain.prompts.prompt import Prompt from langchain.prompts.prompt import Prompt
__all__ = [ __all__ = [

View File

@ -1,4 +1,7 @@
"""Logic for selecting examples to include in prompts.""" """Logic for selecting examples to include in prompts."""
from langchain_community.example_selectors.ngram_overlap import (
NGramOverlapExampleSelector,
)
from langchain_core.example_selectors.length_based import ( from langchain_core.example_selectors.length_based import (
LengthBasedExampleSelector, LengthBasedExampleSelector,
) )
@ -7,10 +10,6 @@ from langchain_core.example_selectors.semantic_similarity import (
SemanticSimilarityExampleSelector, SemanticSimilarityExampleSelector,
) )
from langchain.prompts.example_selector.ngram_overlap import (
NGramOverlapExampleSelector,
)
__all__ = [ __all__ = [
"LengthBasedExampleSelector", "LengthBasedExampleSelector",
"MaxMarginalRelevanceExampleSelector", "MaxMarginalRelevanceExampleSelector",