langchain 0.2.4__py3-none-any.whl → 0.2.5__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.
@@ -24,6 +24,9 @@ def create_react_agent(
24
24
  ) -> Runnable:
25
25
  """Create an agent that uses ReAct prompting.
26
26
 
27
+ Based on paper "ReAct: Synergizing Reasoning and Acting in Language Models"
28
+ (https://arxiv.org/abs/2210.03629)
29
+
27
30
  Args:
28
31
  llm: LLM to use as the agent.
29
32
  tools: Tools this agent has access to.
@@ -103,6 +103,8 @@ class TrajectoryEvalChain(AgentTrajectoryEvaluator, LLMEvalChain):
103
103
 
104
104
  This chain is used to evaluate ReAct style agents by reasoning about
105
105
  the sequence of actions taken and their outcomes.
106
+ Based on the paper "ReAct: Synergizing Reasoning and Acting in Language Models"
107
+ (https://arxiv.org/abs/2210.03629)
106
108
 
107
109
  Example:
108
110
 
langchain/python.py CHANGED
@@ -1,11 +1,11 @@
1
1
  """For backwards compatibility."""
2
- from typing import TYPE_CHECKING, Any
2
+ from typing import Any
3
3
 
4
4
  from langchain._api import create_importer
5
5
 
6
- if TYPE_CHECKING:
7
- from langchain_community.utilities.python import PythonREPL
8
-
6
+ # Code has been removed from the community package as well.
7
+ # We'll proxy to community package, which will raise an appropriate exception,
8
+ # but we'll not include this in __all__, so it won't be listed as importable.
9
9
 
10
10
  _importer = create_importer(
11
11
  __package__,
@@ -16,6 +16,3 @@ _importer = create_importer(
16
16
  def __getattr__(name: str) -> Any:
17
17
  """Look up attributes dynamically."""
18
18
  return _importer(name)
19
-
20
-
21
- __all__ = ["PythonREPL"]
@@ -38,7 +38,6 @@ if TYPE_CHECKING:
38
38
  Portkey,
39
39
  PowerBIDataset,
40
40
  PubMedAPIWrapper,
41
- PythonREPL,
42
41
  Requests,
43
42
  RequestsWrapper,
44
43
  SceneXplainAPIWrapper,
@@ -90,6 +89,8 @@ DEPRECATED_LOOKUP = {
90
89
  "Portkey": "langchain_community.utilities",
91
90
  "PowerBIDataset": "langchain_community.utilities",
92
91
  "PubMedAPIWrapper": "langchain_community.utilities",
92
+ # We will not list PythonREPL in __all__ since it has been removed from community
93
+ # it'll proxy to community package, which will raise an appropriate exception.
93
94
  "PythonREPL": "langchain_community.utilities",
94
95
  "Requests": "langchain_community.utilities",
95
96
  "SteamWebAPIWrapper": "langchain_community.utilities",
@@ -147,7 +148,6 @@ __all__ = [
147
148
  "Portkey",
148
149
  "PowerBIDataset",
149
150
  "PubMedAPIWrapper",
150
- "PythonREPL",
151
151
  "Requests",
152
152
  "SteamWebAPIWrapper",
153
153
  "SQLDatabase",
@@ -1,11 +1,11 @@
1
1
  """For backwards compatibility."""
2
- from typing import TYPE_CHECKING, Any
2
+ from typing import Any
3
3
 
4
4
  from langchain._api import create_importer
5
5
 
6
- if TYPE_CHECKING:
7
- from langchain_community.utilities.python import PythonREPL
8
-
6
+ # Code has been removed from the community package as well.
7
+ # We'll proxy to community package, which will raise an appropriate exception,
8
+ # but we'll not include this in __all__, so it won't be listed as importable.
9
9
 
10
10
  _importer = create_importer(
11
11
  __package__,
@@ -16,6 +16,3 @@ _importer = create_importer(
16
16
  def __getattr__(name: str) -> Any:
17
17
  """Look up attributes dynamically."""
18
18
  return _importer(name)
19
-
20
-
21
- __all__ = ["PythonREPL"]
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: langchain
3
- Version: 0.2.4
3
+ Version: 0.2.5
4
4
  Summary: Building applications with LLMs through composability
5
5
  Home-page: https://github.com/langchain-ai/langchain
6
6
  License: MIT
@@ -15,7 +15,7 @@ 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.6,<0.3.0)
18
+ Requires-Dist: langchain-core (>=0.2.7,<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"
@@ -129,7 +129,7 @@ langchain/agents/output_parsers/self_ask.py,sha256=-4_-hQbKB1ichR5odEyeYUV-wIdLm
129
129
  langchain/agents/output_parsers/tools.py,sha256=9hRlUsJVmS0VmFzEKVYfg5AeusynB2lw4Xi4uYns5JM,3753
130
130
  langchain/agents/output_parsers/xml.py,sha256=2MjxW4nAM4sZN-in3K40_K5DBx6cI2Erb0TZbpSoZIY,1658
131
131
  langchain/agents/react/__init__.py,sha256=9RIjjaUDfWnoMEMpV57JQ0CwZZC5Soh357QdKpVIM-4,76
132
- langchain/agents/react/agent.py,sha256=WjD2UYv5aYfmMDH-bSCpmvrz7TnyUmosYpA8rRRom-0,4975
132
+ langchain/agents/react/agent.py,sha256=r-GmQhjZjWLZ4bf7I2KpGvJbWdQZFpGbrpkTM2daZV8,5095
133
133
  langchain/agents/react/base.py,sha256=vJTNp6zq9hCMhCTYjk8wBFuSK4s8DnFlYdmKrobYP5A,5798
134
134
  langchain/agents/react/output_parser.py,sha256=bEL3U3mxYGK7_7Lm4GlOq8JKQTgyHFQQIEVUUZjV1qs,1231
135
135
  langchain/agents/react/textworld_prompt.py,sha256=b9WDM8pFmqrfAWJ8n6zkxlPlxQI5oHljZ1R9g5y6cRE,1906
@@ -626,7 +626,7 @@ langchain/embeddings/xinference.py,sha256=nehpiy79abQ78Bm-Y9DA8FDvpACXROSIats0S6
626
626
  langchain/env.py,sha256=fucAbfcmwiN1CjKSg5l2lzquRVoE7wqfuMMlaByuyEk,476
627
627
  langchain/evaluation/__init__.py,sha256=jFKhJ5vxBMphg7qQe9Tw7Ma-rL7F3FRZG4C6XQPaZhg,5803
628
628
  langchain/evaluation/agents/__init__.py,sha256=fqXIN8cbpBYwE1m7LQRnTHTcMXS1fedZyOhpwzWCqbc,165
629
- langchain/evaluation/agents/trajectory_eval_chain.py,sha256=EWBSiM-T1V6ZZLRIaqCYDgWWLjSEsDarfkBcACA9dKA,13901
629
+ langchain/evaluation/agents/trajectory_eval_chain.py,sha256=zYgpXsccc0y2h6OfgoCw_TtDKpJW1sBC71CDIcpbhuU,14024
630
630
  langchain/evaluation/agents/trajectory_eval_prompt.py,sha256=UqAk4-CKL1LjjpCNgRi-fuY1JEJO03tGxudL_P04N4k,5938
631
631
  langchain/evaluation/comparison/__init__.py,sha256=gHLBcYkt9wI2mf2YEmAxskptxQwuVPCQJrW4MqL_rWQ,1400
632
632
  langchain/evaluation/comparison/eval_chain.py,sha256=wBDsII3fN28B5anjuk_viiDjMSKqf2VT52XiWGAj4rw,15934
@@ -851,7 +851,7 @@ langchain/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
851
851
  langchain/pydantic_v1/__init__.py,sha256=OZOjjRJYJm5UygRZOtxE7q-y81cxvbEh7j2gXkAN1Bs,912
852
852
  langchain/pydantic_v1/dataclasses.py,sha256=q_wsG5TxBrmLN9lCz1NZtK_OFvvG5Ar-4HEIJT59Zbg,149
853
853
  langchain/pydantic_v1/main.py,sha256=ojfN3YOtr50TrXBJrBOLx0TEd1tKMRcnnK-VoTk0H6s,135
854
- langchain/python.py,sha256=uWfB2YOktnaGO3OvUOMB6_3fRfaxMPGqOyKWgTjmSKA,462
854
+ langchain/python.py,sha256=8nodLRp-MiPoKtBp2IdfZ0iU2mQC2kKwTuu9Jkz8DD8,554
855
855
  langchain/requests.py,sha256=42NQEQIcnu3qpmiroYVR8b-DhdA6yqWpvndfRfyM9rs,905
856
856
  langchain/retrievers/__init__.py,sha256=uXZfMXwKEAQOXy76gEBEoO9_FA4Z4apLD6seNAF-RCU,6660
857
857
  langchain/retrievers/arcee.py,sha256=e9wEnHNjWWkcjPYuQfyQQEksqT0ZvERSGx4mohj9HYM,629
@@ -1182,7 +1182,7 @@ langchain/tools/youtube/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG
1182
1182
  langchain/tools/youtube/search.py,sha256=EpZPKchS1q9KFJeffMjAE2dfThbFwefWUZJTv6gCx8U,628
1183
1183
  langchain/tools/zapier/__init__.py,sha256=0huVqFnztFR6XGoZ7yQQwRFK8wW40VU6OnKbcsb3E-s,764
1184
1184
  langchain/tools/zapier/tool.py,sha256=GGyvSMzNG57HS0PQ1x7F-1a1qQWztAd7qb9WsuXJgSw,745
1185
- langchain/utilities/__init__.py,sha256=GK_pib3J6sbxbeCsy0FCGy7pUf1DyeStukJSgxcnGJ0,5891
1185
+ langchain/utilities/__init__.py,sha256=oruz1KexP7EwTPKsMy5WygboYg2WaD8n3UCTu_f3En4,6022
1186
1186
  langchain/utilities/alpha_vantage.py,sha256=OgO-VWunWKArZQxq7r4awzxf8-wCbQZmIpb9gvVuH0s,651
1187
1187
  langchain/utilities/anthropic.py,sha256=mBrkZ5DaeZepzdJaUkkGziD7m2fsMjx5paytoruLwOo,839
1188
1188
  langchain/utilities/apify.py,sha256=sFbnvcDDczN5o1xjU_k296GuwwZCtbPCfEKHbdzvlQw,621
@@ -1222,7 +1222,7 @@ langchain/utilities/outline.py,sha256=xlT8l23BPPTgeBirZ6PTRGuaq0FkOh6xByRQIH7EQp
1222
1222
  langchain/utilities/portkey.py,sha256=y-R0mWJeJL3Fk4AWMt79jW1BSQF0J4YWcYAXAqytECk,606
1223
1223
  langchain/utilities/powerbi.py,sha256=GZHYSwSmx6ONOIu0dOeucT8fedWAQBIqPkHkvIVGI84,627
1224
1224
  langchain/utilities/pubmed.py,sha256=O32mmI3xN0SQIFV38-wDh9WmhgWe3yDwIIAkkwZJqMA,633
1225
- langchain/utilities/python.py,sha256=uWfB2YOktnaGO3OvUOMB6_3fRfaxMPGqOyKWgTjmSKA,462
1225
+ langchain/utilities/python.py,sha256=8nodLRp-MiPoKtBp2IdfZ0iU2mQC2kKwTuu9Jkz8DD8,554
1226
1226
  langchain/utilities/reddit_search.py,sha256=ifhYqW0ocDJtj6wR39bBEdg0sm6M3j9b5boN2KfaK8E,685
1227
1227
  langchain/utilities/redis.py,sha256=ReyZTSsaJCqt5sagnDyvz8uwp_9HSU_QrDO55REDhz8,889
1228
1228
  langchain/utilities/requests.py,sha256=oQOanvlxXdm0t3d3WvpOpb3xa0Dhas7ozC9I0fbYlsw,712
@@ -1333,8 +1333,8 @@ langchain/vectorstores/xata.py,sha256=HW_Oi5Hz8rH2JaUhRNWQ-3hLYmNzD8eAz6K5YqPArm
1333
1333
  langchain/vectorstores/yellowbrick.py,sha256=-lnjGcRE8Q1nEPOTdbKYTw5noS2cy2ce1ePOU804-_o,624
1334
1334
  langchain/vectorstores/zep.py,sha256=RJ2auxoA6uHHLEZknw3_jeFmYJYVt-PWKMBcNMGV6TM,798
1335
1335
  langchain/vectorstores/zilliz.py,sha256=XhPPIUfKPFJw0_svCoBgCnNkkBLoRVVcyuMfOnE5IxU,609
1336
- langchain-0.2.4.dist-info/LICENSE,sha256=TsZ-TKbmch26hJssqCJhWXyGph7iFLvyFBYAa3stBHg,1067
1337
- langchain-0.2.4.dist-info/METADATA,sha256=bf2FLs-wyfDFL1V_Nvws27-xRU12t0Lo06G2JEy_vyw,6956
1338
- langchain-0.2.4.dist-info/WHEEL,sha256=FMvqSimYX_P7y0a7UY-_Mc83r5zkBZsCYPm7Lr0Bsq4,88
1339
- langchain-0.2.4.dist-info/entry_points.txt,sha256=IgKjoXnkkVC8Nm7ggiFMCNAk01ua6RVTb9cmZTVNm5w,58
1340
- langchain-0.2.4.dist-info/RECORD,,
1336
+ langchain-0.2.5.dist-info/LICENSE,sha256=TsZ-TKbmch26hJssqCJhWXyGph7iFLvyFBYAa3stBHg,1067
1337
+ langchain-0.2.5.dist-info/METADATA,sha256=jevAVVRcwRQDlahmw8B_QkfEh8vlxSnl8JhsgILQj9Q,6956
1338
+ langchain-0.2.5.dist-info/WHEEL,sha256=FMvqSimYX_P7y0a7UY-_Mc83r5zkBZsCYPm7Lr0Bsq4,88
1339
+ langchain-0.2.5.dist-info/entry_points.txt,sha256=IgKjoXnkkVC8Nm7ggiFMCNAk01ua6RVTb9cmZTVNm5w,58
1340
+ langchain-0.2.5.dist-info/RECORD,,