The agent engineering platform.
Python agentsaiai-agentsanthropicchatgptdeepagentsenterpriseframeworkgeminigenerative-ailangchainlanggraphllmmultiagentopen-sourceopenaipydanticpythonragtypescript
Fix a few typos and wrapped f-strings (#128)
Eugene Yurtsev2910f50a3cc9
diff --git a/langchain/docstore/wikipedia.py b/langchain/docstore/wikipedia.pyindex dd84e7deb9..2325ffd960 100644--- a/langchain/docstore/wikipedia.py+++ b/langchain/docstore/wikipedia.py@@ -32,11 +32,7 @@ class Wikipedia(Docstore):page_content = wikipedia.page(search).contentresult: Union[str, Document] = Document(page_content=page_content)except wikipedia.PageError:- result = (- f"Could not find [{search}]. " f"Similar: {wikipedia.search(search)}"- )+ result = f"Could not find [{search}]. Similar: {wikipedia.search(search)}"except wikipedia.DisambiguationError:- result = (- f"Could not find [{search}]. " f"Similar: {wikipedia.search(search)}"- )+ result = f"Could not find [{search}]. Similar: {wikipedia.search(search)}"return resultdiff --git a/langchain/vectorstores/elastic_vector_search.py b/langchain/vectorstores/elastic_vector_search.pyindex b96faa46d8..d8aed5f67d 100644--- a/langchain/vectorstores/elastic_vector_search.py+++ b/langchain/vectorstores/elastic_vector_search.py@@ -55,7 +55,7 @@ class ElasticVectorSearch(VectorStore):import elasticsearchexcept ImportError:raise ValueError(- "Could not import elasticsearch python packge. "+ "Could not import elasticsearch python package. ""Please install it with `pip install elasticearch`.")self.embedding_function = embedding_function@@ -64,7 +64,7 @@ class ElasticVectorSearch(VectorStore):es_client = elasticsearch.Elasticsearch(elasticsearch_url) # noqaexcept ValueError as e:raise ValueError(- "Your elasticsearch client string is misformatted. " f"Got error: {e} "+ f"Your elasticsearch client string is misformatted. Got error: {e} ")self.client = es_client@@ -91,7 +91,7 @@ class ElasticVectorSearch(VectorStore):) -> "ElasticVectorSearch":"""Construct ElasticVectorSearch wrapper from raw documents.- This is a user friendly interface that:+ This is a user-friendly interface that:1. Embeds documents.2. Creates a new index for the embeddings in the Elasticsearch instance.3. Adds the documents to the newly created Elasticsearch index.@@ -125,7 +125,7 @@ class ElasticVectorSearch(VectorStore):from elasticsearch.helpers import bulkexcept ImportError:raise ValueError(- "Could not import elasticsearch python packge. "+ "Could not import elasticsearch python package. ""Please install it with `pip install elasticearch`.")try: