langchain 0.3.16__py3-none-any.whl → 0.3.18rc1__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.
Potentially problematic release.
This version of langchain might be problematic. Click here for more details.
- langchain/agents/openai_assistant/base.py +5 -3
- langchain/chains/flare/base.py +3 -1
- langchain/chains/moderation.py +1 -1
- langchain/evaluation/embedding_distance/base.py +6 -2
- langchain/evaluation/loading.py +3 -1
- {langchain-0.3.16.dist-info → langchain-0.3.18rc1.dist-info}/METADATA +44 -25
- {langchain-0.3.16.dist-info → langchain-0.3.18rc1.dist-info}/RECORD +10 -10
- {langchain-0.3.16.dist-info → langchain-0.3.18rc1.dist-info}/WHEEL +1 -1
- langchain-0.3.18rc1.dist-info/entry_points.txt +5 -0
- langchain-0.3.16.dist-info/entry_points.txt +0 -3
- {langchain-0.3.16.dist-info → langchain-0.3.18rc1.dist-info/licenses}/LICENSE +0 -0
|
@@ -28,7 +28,7 @@ from typing_extensions import Self
|
|
|
28
28
|
|
|
29
29
|
if TYPE_CHECKING:
|
|
30
30
|
import openai
|
|
31
|
-
from openai.types.beta.threads import ThreadMessage
|
|
31
|
+
from openai.types.beta.threads import ThreadMessage # type: ignore[attr-defined]
|
|
32
32
|
from openai.types.beta.threads.required_action_function_tool_call import (
|
|
33
33
|
RequiredActionFunctionToolCall,
|
|
34
34
|
)
|
|
@@ -590,7 +590,8 @@ class OpenAIAssistantRunnable(RunnableSerializable[Dict, OutputType]):
|
|
|
590
590
|
isinstance(content, openai.types.beta.threads.TextContentBlock)
|
|
591
591
|
if version_gte_1_14
|
|
592
592
|
else isinstance(
|
|
593
|
-
content,
|
|
593
|
+
content,
|
|
594
|
+
openai.types.beta.threads.MessageContentText, # type: ignore[attr-defined]
|
|
594
595
|
)
|
|
595
596
|
)
|
|
596
597
|
for content in answer
|
|
@@ -743,7 +744,8 @@ class OpenAIAssistantRunnable(RunnableSerializable[Dict, OutputType]):
|
|
|
743
744
|
isinstance(content, openai.types.beta.threads.TextContentBlock)
|
|
744
745
|
if version_gte_1_14
|
|
745
746
|
else isinstance(
|
|
746
|
-
content,
|
|
747
|
+
content,
|
|
748
|
+
openai.types.beta.threads.MessageContentText, # type: ignore[attr-defined]
|
|
747
749
|
)
|
|
748
750
|
)
|
|
749
751
|
for content in answer
|
langchain/chains/flare/base.py
CHANGED
|
@@ -236,7 +236,9 @@ class FlareChain(Chain):
|
|
|
236
236
|
"Please install langchain-openai."
|
|
237
237
|
"pip install langchain-openai"
|
|
238
238
|
)
|
|
239
|
-
llm = ChatOpenAI(
|
|
239
|
+
llm = ChatOpenAI(
|
|
240
|
+
max_completion_tokens=max_generation_len, logprobs=True, temperature=0
|
|
241
|
+
)
|
|
240
242
|
response_chain = PROMPT | llm
|
|
241
243
|
question_gen_chain = QUESTION_GENERATOR_PROMPT | llm | StrOutputParser()
|
|
242
244
|
return cls(
|
langchain/chains/moderation.py
CHANGED
|
@@ -65,7 +65,7 @@ class OpenAIModerationChain(Chain):
|
|
|
65
65
|
except ValueError:
|
|
66
66
|
values["openai_pre_1_0"] = True
|
|
67
67
|
if values["openai_pre_1_0"]:
|
|
68
|
-
values["client"] = openai.Moderation
|
|
68
|
+
values["client"] = openai.Moderation # type: ignore[attr-defined]
|
|
69
69
|
else:
|
|
70
70
|
values["client"] = openai.OpenAI(api_key=openai_api_key)
|
|
71
71
|
values["async_client"] = openai.AsyncOpenAI(api_key=openai_api_key)
|
|
@@ -30,7 +30,9 @@ def _embedding_factory() -> Embeddings:
|
|
|
30
30
|
from langchain_openai import OpenAIEmbeddings
|
|
31
31
|
except ImportError:
|
|
32
32
|
try:
|
|
33
|
-
from langchain_community.embeddings.openai import
|
|
33
|
+
from langchain_community.embeddings.openai import ( # type: ignore[no-redef]
|
|
34
|
+
OpenAIEmbeddings,
|
|
35
|
+
)
|
|
34
36
|
except ImportError:
|
|
35
37
|
raise ImportError(
|
|
36
38
|
"Could not import OpenAIEmbeddings. Please install the "
|
|
@@ -89,7 +91,9 @@ class _EmbeddingDistanceChainMixin(Chain):
|
|
|
89
91
|
pass
|
|
90
92
|
|
|
91
93
|
try:
|
|
92
|
-
from langchain_community.embeddings.openai import
|
|
94
|
+
from langchain_community.embeddings.openai import ( # type: ignore[no-redef]
|
|
95
|
+
OpenAIEmbeddings,
|
|
96
|
+
)
|
|
93
97
|
|
|
94
98
|
types_.append(OpenAIEmbeddings)
|
|
95
99
|
except ImportError:
|
langchain/evaluation/loading.py
CHANGED
|
@@ -135,7 +135,9 @@ def load_evaluator(
|
|
|
135
135
|
from langchain_openai import ChatOpenAI
|
|
136
136
|
except ImportError:
|
|
137
137
|
try:
|
|
138
|
-
from langchain_community.chat_models.openai import
|
|
138
|
+
from langchain_community.chat_models.openai import ( # type: ignore[no-redef]
|
|
139
|
+
ChatOpenAI,
|
|
140
|
+
)
|
|
139
141
|
except ImportError:
|
|
140
142
|
raise ImportError(
|
|
141
143
|
"Could not import langchain_openai or fallback onto "
|
|
@@ -1,32 +1,52 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: langchain
|
|
3
|
-
Version: 0.3.
|
|
3
|
+
Version: 0.3.18rc1
|
|
4
4
|
Summary: Building applications with LLMs through composability
|
|
5
|
-
Home-page: https://github.com/langchain-ai/langchain
|
|
6
5
|
License: MIT
|
|
7
|
-
Requires-Python: >=3.9,<4.0
|
|
8
|
-
Classifier: License :: OSI Approved :: MIT License
|
|
9
|
-
Classifier: Programming Language :: Python :: 3
|
|
10
|
-
Classifier: Programming Language :: Python :: 3.9
|
|
11
|
-
Classifier: Programming Language :: Python :: 3.10
|
|
12
|
-
Classifier: Programming Language :: Python :: 3.11
|
|
13
|
-
Classifier: Programming Language :: Python :: 3.12
|
|
14
|
-
Classifier: Programming Language :: Python :: 3.13
|
|
15
|
-
Requires-Dist: PyYAML (>=5.3)
|
|
16
|
-
Requires-Dist: SQLAlchemy (>=1.4,<3)
|
|
17
|
-
Requires-Dist: aiohttp (>=3.8.3,<4.0.0)
|
|
18
|
-
Requires-Dist: async-timeout (>=4.0.0,<5.0.0) ; python_version < "3.11"
|
|
19
|
-
Requires-Dist: langchain-core (>=0.3.32,<0.4.0)
|
|
20
|
-
Requires-Dist: langchain-text-splitters (>=0.3.3,<0.4.0)
|
|
21
|
-
Requires-Dist: langsmith (>=0.1.17,<0.4)
|
|
22
|
-
Requires-Dist: numpy (>=1.22.4,<2) ; python_version < "3.12"
|
|
23
|
-
Requires-Dist: numpy (>=1.26.2,<3) ; python_version >= "3.12"
|
|
24
|
-
Requires-Dist: pydantic (>=2.7.4,<3.0.0)
|
|
25
|
-
Requires-Dist: requests (>=2,<3)
|
|
26
|
-
Requires-Dist: tenacity (>=8.1.0,!=8.4.0,<10)
|
|
27
|
-
Project-URL: Repository, https://github.com/langchain-ai/langchain
|
|
28
|
-
Project-URL: Release Notes, https://github.com/langchain-ai/langchain/releases?q=tag%3A%22langchain%3D%3D0%22&expanded=true
|
|
29
6
|
Project-URL: Source Code, https://github.com/langchain-ai/langchain/tree/master/libs/langchain
|
|
7
|
+
Project-URL: Release Notes, https://github.com/langchain-ai/langchain/releases?q=tag%3A%22langchain%3D%3D0%22&expanded=true
|
|
8
|
+
Project-URL: repository, https://github.com/langchain-ai/langchain
|
|
9
|
+
Requires-Python: <4.0,>=3.9
|
|
10
|
+
Requires-Dist: langchain-core<1.0.0,>=0.3.33
|
|
11
|
+
Requires-Dist: langchain-text-splitters<1.0.0,>=0.3.3
|
|
12
|
+
Requires-Dist: langsmith<0.4,>=0.1.17
|
|
13
|
+
Requires-Dist: pydantic<3.0.0,>=2.7.4
|
|
14
|
+
Requires-Dist: SQLAlchemy<3,>=1.4
|
|
15
|
+
Requires-Dist: requests<3,>=2
|
|
16
|
+
Requires-Dist: PyYAML>=5.3
|
|
17
|
+
Requires-Dist: aiohttp<4.0.0,>=3.8.3
|
|
18
|
+
Requires-Dist: tenacity!=8.4.0,<10,>=8.1.0
|
|
19
|
+
Requires-Dist: numpy<2,>=1.26.4; python_version < "3.12"
|
|
20
|
+
Requires-Dist: numpy<3,>=1.26.2; python_version >= "3.12"
|
|
21
|
+
Requires-Dist: async-timeout<5.0.0,>=4.0.0; python_version < "3.11"
|
|
22
|
+
Provides-Extra: community
|
|
23
|
+
Requires-Dist: langchain-community; extra == "community"
|
|
24
|
+
Provides-Extra: anthropic
|
|
25
|
+
Requires-Dist: langchain-anthropic; extra == "anthropic"
|
|
26
|
+
Provides-Extra: openai
|
|
27
|
+
Requires-Dist: langchain-openai; extra == "openai"
|
|
28
|
+
Provides-Extra: cohere
|
|
29
|
+
Requires-Dist: langchain-cohere; extra == "cohere"
|
|
30
|
+
Provides-Extra: google-vertexai
|
|
31
|
+
Requires-Dist: langchain-google-vertexai; extra == "google-vertexai"
|
|
32
|
+
Provides-Extra: google-genai
|
|
33
|
+
Requires-Dist: langchain-google-genai; extra == "google-genai"
|
|
34
|
+
Provides-Extra: fireworks
|
|
35
|
+
Requires-Dist: langchain-fireworks; extra == "fireworks"
|
|
36
|
+
Provides-Extra: ollama
|
|
37
|
+
Requires-Dist: langchain-ollama; extra == "ollama"
|
|
38
|
+
Provides-Extra: together
|
|
39
|
+
Requires-Dist: langchain-together; extra == "together"
|
|
40
|
+
Provides-Extra: mistralai
|
|
41
|
+
Requires-Dist: langchain-mistralai; extra == "mistralai"
|
|
42
|
+
Provides-Extra: huggingface
|
|
43
|
+
Requires-Dist: langchain-huggingface; extra == "huggingface"
|
|
44
|
+
Provides-Extra: groq
|
|
45
|
+
Requires-Dist: langchain-groq; extra == "groq"
|
|
46
|
+
Provides-Extra: aws
|
|
47
|
+
Requires-Dist: langchain-aws; extra == "aws"
|
|
48
|
+
Provides-Extra: deepseek
|
|
49
|
+
Requires-Dist: langchain-deepseek; extra == "deepseek"
|
|
30
50
|
Description-Content-Type: text/markdown
|
|
31
51
|
|
|
32
52
|
# 🦜️🔗 LangChain
|
|
@@ -120,4 +140,3 @@ For more information on these concepts, please see our [full documentation](http
|
|
|
120
140
|
As an open-source project in a rapidly developing field, we are extremely open to contributions, whether it be in the form of a new feature, improved infrastructure, or better documentation.
|
|
121
141
|
|
|
122
142
|
For detailed information on how to contribute, see the [Contributing Guide](https://python.langchain.com/docs/contributing/).
|
|
123
|
-
|
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
langchain-0.3.18rc1.dist-info/METADATA,sha256=-eWq4C7lPzGAtIbWgC8OSdjLEchSquNbu_6cJryh82E,7813
|
|
2
|
+
langchain-0.3.18rc1.dist-info/WHEEL,sha256=thaaA2w1JzcGC48WYufAs8nrYZjJm8LqNfnXFOFyCC4,90
|
|
3
|
+
langchain-0.3.18rc1.dist-info/entry_points.txt,sha256=hLMwTN6pPNCY0cYtYmCYgY-piFzDb17o6ZrDC6IpdQU,75
|
|
4
|
+
langchain-0.3.18rc1.dist-info/licenses/LICENSE,sha256=TsZ-TKbmch26hJssqCJhWXyGph7iFLvyFBYAa3stBHg,1067
|
|
1
5
|
langchain/__init__.py,sha256=4cqV-N_QJnfjk52DqtR2e72vsmJC1R6PkflvRdLjZQI,13709
|
|
2
6
|
langchain/_api/__init__.py,sha256=0FuHuMNUBMrst1Y1nm5yZzQr2xbLmb7rxMsimqKBXhs,733
|
|
3
7
|
langchain/_api/deprecation.py,sha256=K9VCkmMs_ebfd_wCJppKq4Ahw-mlXkukbsQ69iQVxT0,1246
|
|
@@ -111,7 +115,7 @@ langchain/agents/mrkl/base.py,sha256=yonYGfgMkTixmrknWROMjwjddiUCgmWEkfIaWVlJdAU
|
|
|
111
115
|
langchain/agents/mrkl/output_parser.py,sha256=YQGSjQq5pR4kFUg1HrOS3laV6xgtHgtIOQ_TtJY0UFI,3720
|
|
112
116
|
langchain/agents/mrkl/prompt.py,sha256=2dTMP2lAWiLvCtuEijgQRjbKDlbPEnmx77duMwdJ7e4,641
|
|
113
117
|
langchain/agents/openai_assistant/__init__.py,sha256=Xssaqoxrix3hn1gKSOLmDRQzTxAoJk0ProGXmXQe8Mw,114
|
|
114
|
-
langchain/agents/openai_assistant/base.py,sha256=
|
|
118
|
+
langchain/agents/openai_assistant/base.py,sha256=pq-ttrSp6HWZA9qtw_yOCAvAhQWG90ZA_gt77omNKeM,30169
|
|
115
119
|
langchain/agents/openai_functions_agent/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
116
120
|
langchain/agents/openai_functions_agent/agent_token_buffer_memory.py,sha256=G5vrWDbv3oWojxafiW2qSae7Z7WUdZugI-ywjTP0zZ4,3790
|
|
117
121
|
langchain/agents/openai_functions_agent/base.py,sha256=katIW0vE87B7ezm9WU_fEMfeHSQPHZptM0zppQfnY-4,13474
|
|
@@ -241,7 +245,7 @@ langchain/chains/ernie_functions/__init__.py,sha256=X_gOa8GIjyV6tAS32A1BLv6q08uf
|
|
|
241
245
|
langchain/chains/ernie_functions/base.py,sha256=SGs_-yi0qa7cxgkiu2EsoYQF4_fKQUZkxncrp1KiMbU,1730
|
|
242
246
|
langchain/chains/example_generator.py,sha256=QDY7l9hO-RkTZGMMhVUfbZRf__eacdMGOPQXP3Yshrg,757
|
|
243
247
|
langchain/chains/flare/__init__.py,sha256=ufb8LMpEVUzTDflcNiJJyKCG9e4EVGAvz5e7h7f0Z1c,51
|
|
244
|
-
langchain/chains/flare/base.py,sha256=
|
|
248
|
+
langchain/chains/flare/base.py,sha256=TeOb9K7NrZS4F7ScrTpxc9-5E2vJ1vOAQA9odFwaQB8,8531
|
|
245
249
|
langchain/chains/flare/prompts.py,sha256=6ypb3UrOwd4YFy1W8LjBwNVgZLYb-W1U1hme5IdPpDE,1471
|
|
246
250
|
langchain/chains/graph_qa/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
247
251
|
langchain/chains/graph_qa/arangodb.py,sha256=FdkfnDwKnmWinqYObKK-ZPDO_AFZr3PAiRKDEGJxK_A,669
|
|
@@ -280,7 +284,7 @@ langchain/chains/llm_summarization_checker/prompts/revise_summary.txt,sha256=nSS
|
|
|
280
284
|
langchain/chains/llm_symbolic_math/__init__.py,sha256=KQ6bFiFMsqs8PNtU-oo6l-czNBBwQUn2rEirz3gt-w8,470
|
|
281
285
|
langchain/chains/loading.py,sha256=57shFurz0r_FDoUSTcD5Hv7cZl4Rr2G2A_gT-p7XHCE,28829
|
|
282
286
|
langchain/chains/mapreduce.py,sha256=1Sjrnu21VaRtfAGQB-Mf-ssbsv3vk5-mXThwIq1IHTA,4117
|
|
283
|
-
langchain/chains/moderation.py,sha256=
|
|
287
|
+
langchain/chains/moderation.py,sha256=NhtAkS1rTJTJuqzv4M_jHA0qoDMj2YHyyIgqJO1tuog,4502
|
|
284
288
|
langchain/chains/natbot/__init__.py,sha256=ACF2TYNK_CTfvmdLlG5Ry0_j9D6ZfjgfQxmeKe1BAIg,96
|
|
285
289
|
langchain/chains/natbot/base.py,sha256=pS4NHgEHDjqiHRcyxzNgrFrUG56tW8nQ7BOmxjvoe6c,5433
|
|
286
290
|
langchain/chains/natbot/crawler.py,sha256=E1mQUEsg8Jj6Eth-LBUcMU-Zc88JEA3a79kMhHkKO08,16050
|
|
@@ -635,10 +639,10 @@ langchain/evaluation/criteria/__init__.py,sha256=FE5qrrz5JwWXJWXCzdyNRevEPfmmfBf
|
|
|
635
639
|
langchain/evaluation/criteria/eval_chain.py,sha256=JkBEsgNPymOT3OqTSveRAsIr2Sk1O1oWjJZ664t0BuM,21279
|
|
636
640
|
langchain/evaluation/criteria/prompt.py,sha256=6OgXmdvlYVzRMeAxa1fYGIxqeNAz1NkFCZ6ezLgUnZM,1756
|
|
637
641
|
langchain/evaluation/embedding_distance/__init__.py,sha256=YLtGUI4ZMxjsn2Q0dGZ-R9YMFgZsarfJv9qzNEnrLQs,324
|
|
638
|
-
langchain/evaluation/embedding_distance/base.py,sha256=
|
|
642
|
+
langchain/evaluation/embedding_distance/base.py,sha256=ra149EghJgnQi4k3n2yqA4zijnR7a712MUzVRObuoGg,17330
|
|
639
643
|
langchain/evaluation/exact_match/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
640
644
|
langchain/evaluation/exact_match/base.py,sha256=BykyjgKQ94391eDODzn3m1RXao9ZSXtc9wiww_fysXI,2751
|
|
641
|
-
langchain/evaluation/loading.py,sha256=
|
|
645
|
+
langchain/evaluation/loading.py,sha256=vKg-AbszUMqsC9ptLr5C2SUgHbb3fSIvsI-mwxoUoxE,7371
|
|
642
646
|
langchain/evaluation/parsing/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
643
647
|
langchain/evaluation/parsing/base.py,sha256=oshaVFsY9ggIgOZX_3Xe-x7LPSRaQejmqLRT-nUvSVI,5242
|
|
644
648
|
langchain/evaluation/parsing/json_distance.py,sha256=00h1wUNQyvjQiXi2OWlKb50Hcn_X55w4kndM1L38cAM,3662
|
|
@@ -1335,8 +1339,4 @@ langchain/vectorstores/xata.py,sha256=HW_Oi5Hz8rH2JaUhRNWQ-3hLYmNzD8eAz6K5YqPArm
|
|
|
1335
1339
|
langchain/vectorstores/yellowbrick.py,sha256=-lnjGcRE8Q1nEPOTdbKYTw5noS2cy2ce1ePOU804-_o,624
|
|
1336
1340
|
langchain/vectorstores/zep.py,sha256=RJ2auxoA6uHHLEZknw3_jeFmYJYVt-PWKMBcNMGV6TM,798
|
|
1337
1341
|
langchain/vectorstores/zilliz.py,sha256=XhPPIUfKPFJw0_svCoBgCnNkkBLoRVVcyuMfOnE5IxU,609
|
|
1338
|
-
langchain-0.3.
|
|
1339
|
-
langchain-0.3.16.dist-info/METADATA,sha256=PbAglzKagFXWtp3-u92vKMBd5yKI2ZKvzqcPrWxe58I,7127
|
|
1340
|
-
langchain-0.3.16.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
|
|
1341
|
-
langchain-0.3.16.dist-info/entry_points.txt,sha256=IgKjoXnkkVC8Nm7ggiFMCNAk01ua6RVTb9cmZTVNm5w,58
|
|
1342
|
-
langchain-0.3.16.dist-info/RECORD,,
|
|
1342
|
+
langchain-0.3.18rc1.dist-info/RECORD,,
|
|
File without changes
|