langchain 0.2.5__py3-none-any.whl → 0.2.7__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (197) hide show
  1. langchain/__init__.py +1 -0
  2. langchain/_api/module_import.py +2 -2
  3. langchain/agents/__init__.py +5 -4
  4. langchain/agents/agent.py +272 -50
  5. langchain/agents/agent_iterator.py +20 -0
  6. langchain/agents/agent_toolkits/__init__.py +1 -0
  7. langchain/agents/agent_toolkits/file_management/__init__.py +1 -0
  8. langchain/agents/agent_toolkits/playwright/__init__.py +1 -0
  9. langchain/agents/agent_toolkits/vectorstore/base.py +1 -0
  10. langchain/agents/agent_toolkits/vectorstore/toolkit.py +1 -0
  11. langchain/agents/agent_types.py +1 -0
  12. langchain/agents/chat/base.py +37 -1
  13. langchain/agents/chat/output_parser.py +14 -0
  14. langchain/agents/conversational/base.py +38 -6
  15. langchain/agents/conversational/output_parser.py +10 -0
  16. langchain/agents/conversational_chat/base.py +42 -3
  17. langchain/agents/format_scratchpad/__init__.py +1 -0
  18. langchain/agents/format_scratchpad/log.py +12 -1
  19. langchain/agents/format_scratchpad/log_to_messages.py +10 -1
  20. langchain/agents/format_scratchpad/openai_functions.py +10 -5
  21. langchain/agents/format_scratchpad/tools.py +11 -7
  22. langchain/agents/initialize.py +15 -7
  23. langchain/agents/json_chat/base.py +9 -3
  24. langchain/agents/loading.py +7 -0
  25. langchain/agents/mrkl/base.py +39 -10
  26. langchain/agents/mrkl/output_parser.py +12 -0
  27. langchain/agents/openai_assistant/base.py +37 -14
  28. langchain/agents/openai_functions_agent/agent_token_buffer_memory.py +32 -4
  29. langchain/agents/openai_functions_agent/base.py +61 -10
  30. langchain/agents/openai_functions_multi_agent/base.py +22 -7
  31. langchain/agents/openai_tools/base.py +3 -0
  32. langchain/agents/output_parsers/__init__.py +1 -0
  33. langchain/agents/react/base.py +1 -0
  34. langchain/agents/self_ask_with_search/base.py +1 -0
  35. langchain/agents/structured_chat/output_parser.py +3 -3
  36. langchain/agents/tool_calling_agent/base.py +13 -3
  37. langchain/agents/tools.py +3 -0
  38. langchain/agents/utils.py +9 -1
  39. langchain/base_language.py +1 -0
  40. langchain/callbacks/__init__.py +1 -0
  41. langchain/callbacks/base.py +1 -0
  42. langchain/callbacks/streaming_stdout.py +1 -0
  43. langchain/callbacks/streaming_stdout_final_only.py +1 -0
  44. langchain/callbacks/tracers/evaluation.py +1 -0
  45. langchain/chains/api/base.py +5 -2
  46. langchain/chains/base.py +1 -1
  47. langchain/chains/combine_documents/base.py +59 -0
  48. langchain/chains/combine_documents/map_reduce.py +4 -2
  49. langchain/chains/combine_documents/map_rerank.py +5 -3
  50. langchain/chains/combine_documents/refine.py +4 -2
  51. langchain/chains/combine_documents/stuff.py +1 -0
  52. langchain/chains/constitutional_ai/base.py +1 -0
  53. langchain/chains/constitutional_ai/models.py +1 -0
  54. langchain/chains/constitutional_ai/principles.py +1 -0
  55. langchain/chains/conversation/base.py +81 -1
  56. langchain/chains/conversational_retrieval/base.py +2 -1
  57. langchain/chains/elasticsearch_database/base.py +2 -1
  58. langchain/chains/hyde/base.py +1 -0
  59. langchain/chains/llm.py +4 -2
  60. langchain/chains/llm_checker/base.py +4 -3
  61. langchain/chains/llm_math/base.py +1 -0
  62. langchain/chains/loading.py +2 -1
  63. langchain/chains/mapreduce.py +1 -0
  64. langchain/chains/moderation.py +1 -1
  65. langchain/chains/natbot/base.py +1 -0
  66. langchain/chains/openai_functions/base.py +1 -0
  67. langchain/chains/openai_functions/extraction.py +6 -6
  68. langchain/chains/openai_tools/extraction.py +3 -3
  69. langchain/chains/qa_generation/base.py +47 -1
  70. langchain/chains/qa_with_sources/__init__.py +1 -0
  71. langchain/chains/qa_with_sources/loading.py +1 -0
  72. langchain/chains/qa_with_sources/vector_db.py +1 -1
  73. langchain/chains/query_constructor/base.py +1 -0
  74. langchain/chains/query_constructor/ir.py +1 -0
  75. langchain/chains/question_answering/chain.py +1 -0
  76. langchain/chains/retrieval_qa/base.py +3 -2
  77. langchain/chains/router/base.py +1 -0
  78. langchain/chains/router/llm_router.py +2 -1
  79. langchain/chains/router/multi_prompt.py +1 -0
  80. langchain/chains/router/multi_retrieval_qa.py +1 -0
  81. langchain/chains/sequential.py +2 -1
  82. langchain/chains/structured_output/base.py +12 -12
  83. langchain/chains/summarize/chain.py +1 -0
  84. langchain/chains/transform.py +4 -3
  85. langchain/chat_models/__init__.py +1 -0
  86. langchain/chat_models/base.py +2 -2
  87. langchain/docstore/__init__.py +1 -0
  88. langchain/document_loaders/__init__.py +1 -0
  89. langchain/document_transformers/__init__.py +1 -0
  90. langchain/embeddings/__init__.py +0 -1
  91. langchain/evaluation/__init__.py +2 -1
  92. langchain/evaluation/agents/__init__.py +1 -0
  93. langchain/evaluation/agents/trajectory_eval_prompt.py +1 -0
  94. langchain/evaluation/comparison/__init__.py +1 -0
  95. langchain/evaluation/comparison/eval_chain.py +1 -0
  96. langchain/evaluation/comparison/prompt.py +1 -0
  97. langchain/evaluation/embedding_distance/__init__.py +1 -0
  98. langchain/evaluation/embedding_distance/base.py +1 -0
  99. langchain/evaluation/loading.py +1 -0
  100. langchain/evaluation/parsing/base.py +1 -0
  101. langchain/evaluation/qa/__init__.py +1 -0
  102. langchain/evaluation/qa/eval_chain.py +1 -0
  103. langchain/evaluation/qa/generate_chain.py +1 -0
  104. langchain/evaluation/schema.py +1 -0
  105. langchain/evaluation/scoring/__init__.py +1 -0
  106. langchain/evaluation/scoring/eval_chain.py +1 -0
  107. langchain/evaluation/scoring/prompt.py +1 -0
  108. langchain/evaluation/string_distance/__init__.py +1 -0
  109. langchain/example_generator.py +1 -0
  110. langchain/formatting.py +1 -0
  111. langchain/globals/__init__.py +1 -0
  112. langchain/graphs/__init__.py +1 -0
  113. langchain/indexes/__init__.py +1 -0
  114. langchain/indexes/_sql_record_manager.py +9 -5
  115. langchain/indexes/graph.py +1 -0
  116. langchain/indexes/prompts/__init__.py +1 -0
  117. langchain/input.py +1 -0
  118. langchain/llms/__init__.py +1 -0
  119. langchain/load/__init__.py +1 -0
  120. langchain/memory/__init__.py +5 -0
  121. langchain/memory/vectorstore_token_buffer_memory.py +184 -0
  122. langchain/output_parsers/__init__.py +1 -0
  123. langchain/output_parsers/combining.py +1 -1
  124. langchain/output_parsers/enum.py +7 -3
  125. langchain/output_parsers/fix.py +57 -16
  126. langchain/output_parsers/pandas_dataframe.py +1 -1
  127. langchain/output_parsers/regex.py +1 -1
  128. langchain/output_parsers/regex_dict.py +1 -1
  129. langchain/output_parsers/retry.py +76 -29
  130. langchain/output_parsers/structured.py +3 -3
  131. langchain/output_parsers/yaml.py +4 -0
  132. langchain/prompts/__init__.py +1 -0
  133. langchain/prompts/example_selector/__init__.py +1 -0
  134. langchain/python.py +1 -0
  135. langchain/requests.py +1 -0
  136. langchain/retrievers/__init__.py +1 -0
  137. langchain/retrievers/document_compressors/chain_extract.py +1 -0
  138. langchain/retrievers/document_compressors/chain_filter.py +1 -0
  139. langchain/retrievers/ensemble.py +18 -3
  140. langchain/retrievers/multi_query.py +2 -1
  141. langchain/retrievers/re_phraser.py +2 -1
  142. langchain/retrievers/self_query/base.py +9 -8
  143. langchain/schema/__init__.py +1 -0
  144. langchain/schema/runnable/__init__.py +1 -0
  145. langchain/serpapi.py +1 -0
  146. langchain/smith/__init__.py +6 -5
  147. langchain/smith/evaluation/__init__.py +0 -1
  148. langchain/smith/evaluation/string_run_evaluator.py +1 -0
  149. langchain/sql_database.py +1 -0
  150. langchain/storage/__init__.py +1 -0
  151. langchain/storage/_lc_store.py +1 -0
  152. langchain/storage/in_memory.py +1 -0
  153. langchain/text_splitter.py +1 -0
  154. langchain/tools/__init__.py +1 -0
  155. langchain/tools/amadeus/__init__.py +1 -0
  156. langchain/tools/azure_cognitive_services/__init__.py +1 -0
  157. langchain/tools/bing_search/__init__.py +1 -0
  158. langchain/tools/dataforseo_api_search/__init__.py +1 -0
  159. langchain/tools/ddg_search/__init__.py +1 -0
  160. langchain/tools/edenai/__init__.py +1 -0
  161. langchain/tools/eleven_labs/__init__.py +1 -0
  162. langchain/tools/file_management/__init__.py +1 -0
  163. langchain/tools/github/__init__.py +1 -1
  164. langchain/tools/gitlab/__init__.py +1 -1
  165. langchain/tools/gmail/__init__.py +1 -0
  166. langchain/tools/golden_query/__init__.py +1 -0
  167. langchain/tools/google_cloud/__init__.py +1 -0
  168. langchain/tools/google_finance/__init__.py +1 -0
  169. langchain/tools/google_jobs/__init__.py +1 -0
  170. langchain/tools/google_lens/__init__.py +1 -0
  171. langchain/tools/google_places/__init__.py +1 -0
  172. langchain/tools/google_scholar/__init__.py +1 -0
  173. langchain/tools/google_search/__init__.py +1 -0
  174. langchain/tools/google_trends/__init__.py +1 -0
  175. langchain/tools/human/__init__.py +1 -0
  176. langchain/tools/memorize/__init__.py +1 -0
  177. langchain/tools/metaphor_search/__init__.py +1 -0
  178. langchain/tools/multion/__init__.py +1 -0
  179. langchain/tools/office365/__init__.py +1 -0
  180. langchain/tools/openapi/utils/openapi_utils.py +1 -0
  181. langchain/tools/openweathermap/__init__.py +1 -0
  182. langchain/tools/playwright/__init__.py +1 -0
  183. langchain/tools/shell/__init__.py +1 -0
  184. langchain/tools/slack/__init__.py +1 -0
  185. langchain/tools/sql_database/prompt.py +1 -0
  186. langchain/tools/steamship_image_generation/__init__.py +1 -0
  187. langchain/tools/tavily_search/__init__.py +1 -0
  188. langchain/tools/wolfram_alpha/__init__.py +1 -0
  189. langchain/tools/zapier/__init__.py +1 -0
  190. langchain/utilities/__init__.py +1 -0
  191. langchain/utilities/python.py +1 -0
  192. langchain/vectorstores/__init__.py +1 -0
  193. {langchain-0.2.5.dist-info → langchain-0.2.7.dist-info}/METADATA +3 -4
  194. {langchain-0.2.5.dist-info → langchain-0.2.7.dist-info}/RECORD +197 -196
  195. {langchain-0.2.5.dist-info → langchain-0.2.7.dist-info}/LICENSE +0 -0
  196. {langchain-0.2.5.dist-info → langchain-0.2.7.dist-info}/WHEEL +0 -0
  197. {langchain-0.2.5.dist-info → langchain-0.2.7.dist-info}/entry_points.txt +0 -0
@@ -2,6 +2,7 @@
2
2
  Ensemble retriever that ensemble the results of
3
3
  multiple retrievers by using weighted Reciprocal Rank Fusion
4
4
  """
5
+
5
6
  import asyncio
6
7
  from collections import defaultdict
7
8
  from collections.abc import Hashable
@@ -66,11 +67,14 @@ class EnsembleRetriever(BaseRetriever):
66
67
  c: A constant added to the rank, controlling the balance between the importance
67
68
  of high-ranked items and the consideration given to lower-ranked items.
68
69
  Default is 60.
70
+ id_key: The key in the document's metadata used to determine unique documents.
71
+ If not specified, page_content is used.
69
72
  """
70
73
 
71
74
  retrievers: List[RetrieverLike]
72
75
  weights: List[float]
73
76
  c: int = 60
77
+ id_key: Optional[str] = None
74
78
 
75
79
  @property
76
80
  def config_specs(self) -> List[ConfigurableFieldSpec]:
@@ -305,13 +309,24 @@ class EnsembleRetriever(BaseRetriever):
305
309
  rrf_score: Dict[str, float] = defaultdict(float)
306
310
  for doc_list, weight in zip(doc_lists, self.weights):
307
311
  for rank, doc in enumerate(doc_list, start=1):
308
- rrf_score[doc.page_content] += weight / (rank + self.c)
312
+ rrf_score[
313
+ doc.page_content
314
+ if self.id_key is None
315
+ else doc.metadata[self.id_key]
316
+ ] += weight / (rank + self.c)
309
317
 
310
318
  # Docs are deduplicated by their contents then sorted by their scores
311
319
  all_docs = chain.from_iterable(doc_lists)
312
320
  sorted_docs = sorted(
313
- unique_by_key(all_docs, lambda doc: doc.page_content),
321
+ unique_by_key(
322
+ all_docs,
323
+ lambda doc: doc.page_content
324
+ if self.id_key is None
325
+ else doc.metadata[self.id_key],
326
+ ),
314
327
  reverse=True,
315
- key=lambda doc: rrf_score[doc.page_content],
328
+ key=lambda doc: rrf_score[
329
+ doc.page_content if self.id_key is None else doc.metadata[self.id_key]
330
+ ],
316
331
  )
317
332
  return sorted_docs
@@ -9,6 +9,7 @@ from langchain_core.callbacks import (
9
9
  from langchain_core.documents import Document
10
10
  from langchain_core.language_models import BaseLanguageModel
11
11
  from langchain_core.output_parsers import BaseOutputParser
12
+ from langchain_core.prompts import BasePromptTemplate
12
13
  from langchain_core.prompts.prompt import PromptTemplate
13
14
  from langchain_core.retrievers import BaseRetriever
14
15
  from langchain_core.runnables import Runnable
@@ -62,7 +63,7 @@ class MultiQueryRetriever(BaseRetriever):
62
63
  cls,
63
64
  retriever: BaseRetriever,
64
65
  llm: BaseLanguageModel,
65
- prompt: PromptTemplate = DEFAULT_QUERY_PROMPT,
66
+ prompt: BasePromptTemplate = DEFAULT_QUERY_PROMPT,
66
67
  parser_key: Optional[str] = None,
67
68
  include_original: bool = False,
68
69
  ) -> "MultiQueryRetriever":
@@ -7,6 +7,7 @@ from langchain_core.callbacks import (
7
7
  )
8
8
  from langchain_core.documents import Document
9
9
  from langchain_core.language_models import BaseLLM
10
+ from langchain_core.prompts import BasePromptTemplate
10
11
  from langchain_core.prompts.prompt import PromptTemplate
11
12
  from langchain_core.retrievers import BaseRetriever
12
13
 
@@ -36,7 +37,7 @@ class RePhraseQueryRetriever(BaseRetriever):
36
37
  cls,
37
38
  retriever: BaseRetriever,
38
39
  llm: BaseLLM,
39
- prompt: PromptTemplate = DEFAULT_QUERY_PROMPT,
40
+ prompt: BasePromptTemplate = DEFAULT_QUERY_PROMPT,
40
41
  ) -> "RePhraseQueryRetriever":
41
42
  """Initialize from llm using default template.
42
43
 
@@ -169,12 +169,13 @@ def _get_builtin_translator(vectorstore: VectorStore) -> Visitor:
169
169
  return ChromaTranslator()
170
170
 
171
171
  try:
172
- from langchain_postgres import PGVector
172
+ from langchain_postgres import PGVector # type: ignore[no-redef]
173
+ from langchain_postgres import PGVectorTranslator as NewPGVectorTranslator
173
174
  except ImportError:
174
175
  pass
175
176
  else:
176
177
  if isinstance(vectorstore, PGVector):
177
- return PGVectorTranslator()
178
+ return NewPGVectorTranslator()
178
179
 
179
180
  raise ValueError(
180
181
  f"Self query retriever with Vector Store type {vectorstore.__class__}"
@@ -309,16 +310,16 @@ class SelfQueryRetriever(BaseRetriever):
309
310
  "allowed_comparators" not in chain_kwargs
310
311
  and structured_query_translator.allowed_comparators is not None
311
312
  ):
312
- chain_kwargs[
313
- "allowed_comparators"
314
- ] = structured_query_translator.allowed_comparators
313
+ chain_kwargs["allowed_comparators"] = (
314
+ structured_query_translator.allowed_comparators
315
+ )
315
316
  if (
316
317
  "allowed_operators" not in chain_kwargs
317
318
  and structured_query_translator.allowed_operators is not None
318
319
  ):
319
- chain_kwargs[
320
- "allowed_operators"
321
- ] = structured_query_translator.allowed_operators
320
+ chain_kwargs["allowed_operators"] = (
321
+ structured_query_translator.allowed_operators
322
+ )
322
323
  query_constructor = load_query_constructor_runnable(
323
324
  llm,
324
325
  document_contents,
@@ -1,4 +1,5 @@
1
1
  """**Schemas** are the LangChain Base Classes and Interfaces."""
2
+
2
3
  from langchain_core.agents import AgentAction, AgentFinish
3
4
  from langchain_core.caches import BaseCache
4
5
  from langchain_core.chat_history import BaseChatMessageHistory
@@ -14,6 +14,7 @@ creating more responsive UX.
14
14
 
15
15
  This module contains schema and implementation of LangChain Runnables primitives.
16
16
  """
17
+
17
18
  from langchain_core.runnables.base import (
18
19
  Runnable,
19
20
  RunnableBinding,
langchain/serpapi.py CHANGED
@@ -1,4 +1,5 @@
1
1
  """For backwards compatibility."""
2
+
2
3
  from typing import TYPE_CHECKING, Any
3
4
 
4
5
  from langchain._api import create_importer
@@ -54,19 +54,19 @@ or LangSmith's `RunEvaluator` classes.
54
54
  from langchain.evaluation import StringEvaluator
55
55
 
56
56
  class MyStringEvaluator(StringEvaluator):
57
-
57
+
58
58
  @property
59
59
  def requires_input(self) -> bool:
60
60
  return False
61
-
61
+
62
62
  @property
63
63
  def requires_reference(self) -> bool:
64
64
  return True
65
-
65
+
66
66
  @property
67
67
  def evaluation_name(self) -> str:
68
68
  return "exact_match"
69
-
69
+
70
70
  def _evaluate_strings(self, prediction, reference=None, input=None, **kwargs) -> dict:
71
71
  return {"score": prediction == reference}
72
72
 
@@ -80,7 +80,7 @@ or LangSmith's `RunEvaluator` classes.
80
80
  "<my_dataset_name>",
81
81
  construct_chain,
82
82
  evaluation=evaluation_config,
83
- )
83
+ )
84
84
 
85
85
  **Primary Functions**
86
86
 
@@ -88,6 +88,7 @@ or LangSmith's `RunEvaluator` classes.
88
88
  - :func:`run_on_dataset <langchain.smith.evaluation.runner_utils.run_on_dataset>`: Function to evaluate a chain, agent, or other LangChain component over a dataset.
89
89
  - :class:`RunEvalConfig <langchain.smith.evaluation.config.RunEvalConfig>`: Class representing the configuration for running evaluation. You can select evaluators by :class:`EvaluatorType <langchain.evaluation.schema.EvaluatorType>` or config, or you can pass in `custom_evaluators`
90
90
  """ # noqa: E501
91
+
91
92
  from langchain.smith.evaluation import (
92
93
  RunEvalConfig,
93
94
  arun_on_dataset,
@@ -51,7 +51,6 @@ For more information on the LangSmith API, see the `LangSmith API documentation
51
51
 
52
52
  """ # noqa: E501
53
53
 
54
-
55
54
  from langchain.smith.evaluation.config import RunEvalConfig
56
55
  from langchain.smith.evaluation.runner_utils import (
57
56
  InputFormatError,
@@ -1,4 +1,5 @@
1
1
  """Run evaluator wrapper for string evaluators."""
2
+
2
3
  from __future__ import annotations
3
4
 
4
5
  from abc import abstractmethod
langchain/sql_database.py CHANGED
@@ -1,4 +1,5 @@
1
1
  """Keep here for backwards compatibility."""
2
+
2
3
  from typing import TYPE_CHECKING, Any
3
4
 
4
5
  from langchain._api import create_importer
@@ -5,6 +5,7 @@ to a simple key-value interface.
5
5
 
6
6
  The primary goal of these storages is to support implementation of caching.
7
7
  """
8
+
8
9
  from typing import TYPE_CHECKING, Any
9
10
 
10
11
  from langchain_core.stores import (
@@ -1,4 +1,5 @@
1
1
  """Create a key-value store for any langchain serializable object."""
2
+
2
3
  from typing import Callable, Optional
3
4
 
4
5
  from langchain_core.documents import Document
@@ -3,6 +3,7 @@
3
3
  This is a simple implementation of the BaseStore using a dictionary that is useful
4
4
  primarily for unit testing purposes.
5
5
  """
6
+
6
7
  from langchain_core.stores import InMemoryBaseStore, InMemoryByteStore, InMemoryStore
7
8
 
8
9
  __all__ = [
@@ -1,4 +1,5 @@
1
1
  """Kept for backwards compatibility."""
2
+
2
3
  from langchain_text_splitters import (
3
4
  Language,
4
5
  RecursiveCharacterTextSplitter,
@@ -16,6 +16,7 @@ tool for the job.
16
16
 
17
17
  CallbackManagerForToolRun, AsyncCallbackManagerForToolRun
18
18
  """
19
+
19
20
  import warnings
20
21
  from typing import Any
21
22
 
@@ -1,4 +1,5 @@
1
1
  """Amadeus tools."""
2
+
2
3
  from typing import TYPE_CHECKING, Any
3
4
 
4
5
  from langchain._api import create_importer
@@ -1,4 +1,5 @@
1
1
  """Azure Cognitive Services Tools."""
2
+
2
3
  from typing import TYPE_CHECKING, Any
3
4
 
4
5
  from langchain._api import create_importer
@@ -1,4 +1,5 @@
1
1
  """Bing Search API toolkit."""
2
+
2
3
  from typing import TYPE_CHECKING, Any
3
4
 
4
5
  from langchain._api import create_importer
@@ -1,4 +1,5 @@
1
1
  """DataForSeo API Toolkit."""
2
+
2
3
  from typing import TYPE_CHECKING, Any
3
4
 
4
5
  from langchain._api import create_importer
@@ -1,4 +1,5 @@
1
1
  """DuckDuckGo Search API toolkit."""
2
+
2
3
  from typing import TYPE_CHECKING, Any
3
4
 
4
5
  from langchain._api import create_importer
@@ -1,4 +1,5 @@
1
1
  """Edenai Tools."""
2
+
2
3
  from typing import TYPE_CHECKING, Any
3
4
 
4
5
  from langchain._api import create_importer
@@ -1,4 +1,5 @@
1
1
  """Eleven Labs Services Tools."""
2
+
2
3
  from typing import TYPE_CHECKING, Any
3
4
 
4
5
  from langchain._api import create_importer
@@ -1,4 +1,5 @@
1
1
  """File Management Tools."""
2
+
2
3
  from typing import TYPE_CHECKING, Any
3
4
 
4
5
  from langchain._api import create_importer
@@ -1 +1 @@
1
- """ GitHub Tool """
1
+ """GitHub Tool"""
@@ -1 +1 @@
1
- """ GitLab Tool """
1
+ """GitLab Tool"""
@@ -1,4 +1,5 @@
1
1
  """Gmail tools."""
2
+
2
3
  from typing import TYPE_CHECKING, Any
3
4
 
4
5
  from langchain._api import create_importer
@@ -1,4 +1,5 @@
1
1
  """Golden API toolkit."""
2
+
2
3
  from typing import TYPE_CHECKING, Any
3
4
 
4
5
  from langchain._api import create_importer
@@ -1,4 +1,5 @@
1
1
  """Google Cloud Tools."""
2
+
2
3
  from typing import TYPE_CHECKING, Any
3
4
 
4
5
  from langchain._api import create_importer
@@ -1,4 +1,5 @@
1
1
  """Google Finance API Toolkit."""
2
+
2
3
  from typing import TYPE_CHECKING, Any
3
4
 
4
5
  from langchain._api import create_importer
@@ -1,4 +1,5 @@
1
1
  """Google Jobs API Toolkit."""
2
+
2
3
  from typing import TYPE_CHECKING, Any
3
4
 
4
5
  from langchain._api import create_importer
@@ -1,4 +1,5 @@
1
1
  """Google Lens API Toolkit."""
2
+
2
3
  from typing import TYPE_CHECKING, Any
3
4
 
4
5
  from langchain._api import create_importer
@@ -1,4 +1,5 @@
1
1
  """Google Places API Toolkit."""
2
+
2
3
  from typing import TYPE_CHECKING, Any
3
4
 
4
5
  from langchain._api import create_importer
@@ -1,4 +1,5 @@
1
1
  """Google Scholar API Toolkit."""
2
+
2
3
  from typing import TYPE_CHECKING, Any
3
4
 
4
5
  from langchain._api import create_importer
@@ -1,4 +1,5 @@
1
1
  """Google Search API Toolkit."""
2
+
2
3
  from typing import TYPE_CHECKING, Any
3
4
 
4
5
  from langchain._api import create_importer
@@ -1,4 +1,5 @@
1
1
  """Google Trends API Toolkit."""
2
+
2
3
  from typing import TYPE_CHECKING, Any
3
4
 
4
5
  from langchain._api import create_importer
@@ -1,4 +1,5 @@
1
1
  """Tool for asking for human input."""
2
+
2
3
  from typing import TYPE_CHECKING, Any
3
4
 
4
5
  from langchain._api import create_importer
@@ -1,4 +1,5 @@
1
1
  """Unsupervised learning based memorization."""
2
+
2
3
  from typing import TYPE_CHECKING, Any
3
4
 
4
5
  from langchain._api import create_importer
@@ -1,4 +1,5 @@
1
1
  """Metaphor Search API toolkit."""
2
+
2
3
  from typing import TYPE_CHECKING, Any
3
4
 
4
5
  from langchain._api import create_importer
@@ -1,4 +1,5 @@
1
1
  """MutliOn Client API tools."""
2
+
2
3
  from typing import TYPE_CHECKING, Any
3
4
 
4
5
  from langchain._api import create_importer
@@ -1,4 +1,5 @@
1
1
  """O365 tools."""
2
+
2
3
  from typing import TYPE_CHECKING, Any
3
4
 
4
5
  from langchain._api import create_importer
@@ -1,4 +1,5 @@
1
1
  """Utility functions for parsing an OpenAPI spec. Kept for backwards compat."""
2
+
2
3
  from typing import TYPE_CHECKING, Any
3
4
 
4
5
  from langchain._api import create_importer
@@ -1,4 +1,5 @@
1
1
  """OpenWeatherMap API toolkit."""
2
+
2
3
  from typing import TYPE_CHECKING, Any
3
4
 
4
5
  from langchain._api import create_importer
@@ -1,4 +1,5 @@
1
1
  """Browser tools and toolkit."""
2
+
2
3
  from typing import TYPE_CHECKING, Any
3
4
 
4
5
  from langchain._api import create_importer
@@ -1,4 +1,5 @@
1
1
  """Shell tool."""
2
+
2
3
  from typing import TYPE_CHECKING, Any
3
4
 
4
5
  from langchain._api import create_importer
@@ -1,4 +1,5 @@
1
1
  """Slack tools."""
2
+
2
3
  from typing import TYPE_CHECKING, Any
3
4
 
4
5
  from langchain._api import create_importer
@@ -1,4 +1,5 @@
1
1
  """For backwards compatibility."""
2
+
2
3
  from typing import TYPE_CHECKING, Any
3
4
 
4
5
  from langchain._api import create_importer
@@ -1,4 +1,5 @@
1
1
  """Tool to generate an image."""
2
+
2
3
  from typing import TYPE_CHECKING, Any
3
4
 
4
5
  from langchain._api import create_importer
@@ -1,4 +1,5 @@
1
1
  """Tavily Search API toolkit."""
2
+
2
3
  from typing import TYPE_CHECKING, Any
3
4
 
4
5
  from langchain._api import create_importer
@@ -1,4 +1,5 @@
1
1
  """Wolfram Alpha API toolkit."""
2
+
2
3
  from typing import TYPE_CHECKING, Any
3
4
 
4
5
  from langchain._api import create_importer
@@ -1,4 +1,5 @@
1
1
  """Zapier Tool."""
2
+
2
3
  from typing import TYPE_CHECKING, Any
3
4
 
4
5
  from langchain._api import create_importer
@@ -3,6 +3,7 @@
3
3
  Other LangChain classes use **Utilities** to interact with third-part systems
4
4
  and packages.
5
5
  """
6
+
6
7
  from typing import TYPE_CHECKING, Any
7
8
 
8
9
  from langchain._api import create_importer
@@ -1,4 +1,5 @@
1
1
  """For backwards compatibility."""
2
+
2
3
  from typing import Any
3
4
 
4
5
  from langchain._api import create_importer
@@ -18,6 +18,7 @@ and retrieve the data that are 'most similar' to the embedded query.
18
18
 
19
19
  Embeddings, Document
20
20
  """ # noqa: E501
21
+
21
22
  from typing import TYPE_CHECKING, Any
22
23
 
23
24
  from langchain_core.vectorstores import VectorStore
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: langchain
3
- Version: 0.2.5
3
+ Version: 0.2.7
4
4
  Summary: Building applications with LLMs through composability
5
5
  Home-page: https://github.com/langchain-ai/langchain
6
6
  License: MIT
@@ -15,14 +15,14 @@ Requires-Dist: PyYAML (>=5.3)
15
15
  Requires-Dist: SQLAlchemy (>=1.4,<3)
16
16
  Requires-Dist: aiohttp (>=3.8.3,<4.0.0)
17
17
  Requires-Dist: async-timeout (>=4.0.0,<5.0.0) ; python_version < "3.11"
18
- Requires-Dist: langchain-core (>=0.2.7,<0.3.0)
18
+ Requires-Dist: langchain-core (>=0.2.12,<0.3.0)
19
19
  Requires-Dist: langchain-text-splitters (>=0.2.0,<0.3.0)
20
20
  Requires-Dist: langsmith (>=0.1.17,<0.2.0)
21
21
  Requires-Dist: numpy (>=1,<2) ; python_version < "3.12"
22
22
  Requires-Dist: numpy (>=1.26.0,<2.0.0) ; python_version >= "3.12"
23
23
  Requires-Dist: pydantic (>=1,<3)
24
24
  Requires-Dist: requests (>=2,<3)
25
- Requires-Dist: tenacity (>=8.1.0,<9.0.0)
25
+ Requires-Dist: tenacity (>=8.1.0,<9.0.0,!=8.4.0)
26
26
  Project-URL: Repository, https://github.com/langchain-ai/langchain
27
27
  Description-Content-Type: text/markdown
28
28
 
@@ -36,7 +36,6 @@ Description-Content-Type: text/markdown
36
36
  [![Downloads](https://static.pepy.tech/badge/langchain/month)](https://pepy.tech/project/langchain)
37
37
  [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
38
38
  [![Twitter](https://img.shields.io/twitter/url/https/twitter.com/langchainai.svg?style=social&label=Follow%20%40LangChainAI)](https://twitter.com/langchainai)
39
- [![](https://dcbadge.vercel.app/api/server/6adMQxSpJS?compact=true&style=flat)](https://discord.gg/6adMQxSpJS)
40
39
  [![Open in Dev Containers](https://img.shields.io/static/v1?label=Dev%20Containers&message=Open&color=blue&logo=visualstudiocode)](https://vscode.dev/redirect?url=vscode://ms-vscode-remote.remote-containers/cloneInVolume?url=https://github.com/langchain-ai/langchain)
41
40
  [![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/langchain-ai/langchain)
42
41
  [![GitHub star chart](https://img.shields.io/github/stars/langchain-ai/langchain?style=social)](https://star-history.com/#langchain-ai/langchain)