langchain 0.3.20__py3-none-any.whl → 0.3.22__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.

@@ -114,7 +114,7 @@ def _is_assistants_builtin_tool(
114
114
  tool: Union[Dict[str, Any], Type[BaseModel], Callable, BaseTool],
115
115
  ) -> bool:
116
116
  """Determine if tool corresponds to OpenAI Assistants built-in."""
117
- assistants_builtin_tools = ("code_interpreter", "retrieval")
117
+ assistants_builtin_tools = ("code_interpreter", "file_search")
118
118
  return (
119
119
  isinstance(tool, dict)
120
120
  and ("type" in tool)
@@ -128,7 +128,7 @@ def _get_assistants_tool(
128
128
  """Convert a raw function/class to an OpenAI tool.
129
129
 
130
130
  Note that OpenAI assistants supports several built-in tools,
131
- such as "code_interpreter" and "retrieval."
131
+ such as "code_interpreter" and "file_search".
132
132
  """
133
133
  if _is_assistants_builtin_tool(tool):
134
134
  return tool # type: ignore
@@ -300,6 +300,8 @@ class OpenAIAssistantRunnable(RunnableSerializable[Dict, OutputType]):
300
300
  max_completion_tokens: Allow setting max_completion_tokens for this run.
301
301
  max_prompt_tokens: Allow setting max_prompt_tokens for this run.
302
302
  run_metadata: Metadata to associate with new run.
303
+ attachments: A list of files attached to the message, and the
304
+ tools they should be added to.
303
305
  config: Runnable config. Defaults to None.
304
306
 
305
307
  Return:
@@ -333,6 +335,7 @@ class OpenAIAssistantRunnable(RunnableSerializable[Dict, OutputType]):
333
335
  "role": "user",
334
336
  "content": input["content"],
335
337
  "metadata": input.get("message_metadata"),
338
+ "attachments": input.get("attachments"),
336
339
  }
337
340
  ],
338
341
  "metadata": input.get("thread_metadata"),
@@ -108,6 +108,7 @@ def init_chat_model(
108
108
  - 'openai' -> langchain-openai
109
109
  - 'anthropic' -> langchain-anthropic
110
110
  - 'azure_openai' -> langchain-openai
111
+ - 'azure_ai' -> langchain-azure-ai
111
112
  - 'google_vertexai' -> langchain-google-vertexai
112
113
  - 'google_genai' -> langchain-google-genai
113
114
  - 'bedrock' -> langchain-aws
@@ -356,6 +357,11 @@ def _init_chat_model_helper(
356
357
  from langchain_openai import AzureChatOpenAI
357
358
 
358
359
  return AzureChatOpenAI(model=model, **kwargs)
360
+ elif model_provider == "azure_ai":
361
+ _check_pkg("langchain_azure_ai")
362
+ from langchain_azure_ai.chat_models import AzureAIChatCompletionsModel
363
+
364
+ return AzureAIChatCompletionsModel(model=model, **kwargs)
359
365
  elif model_provider == "cohere":
360
366
  _check_pkg("langchain_cohere")
361
367
  from langchain_cohere import ChatCohere
@@ -459,6 +465,7 @@ _SUPPORTED_PROVIDERS = {
459
465
  "openai",
460
466
  "anthropic",
461
467
  "azure_openai",
468
+ "azure_ai",
462
469
  "cohere",
463
470
  "google_vertexai",
464
471
  "google_genai",
@@ -1,14 +1,14 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: langchain
3
- Version: 0.3.20
3
+ Version: 0.3.22
4
4
  Summary: Building applications with LLMs through composability
5
5
  License: MIT
6
6
  Project-URL: Source Code, https://github.com/langchain-ai/langchain/tree/master/libs/langchain
7
7
  Project-URL: Release Notes, https://github.com/langchain-ai/langchain/releases?q=tag%3A%22langchain%3D%3D0%22&expanded=true
8
8
  Project-URL: repository, https://github.com/langchain-ai/langchain
9
9
  Requires-Python: <4.0,>=3.9
10
- Requires-Dist: langchain-core<1.0.0,>=0.3.41
11
- Requires-Dist: langchain-text-splitters<1.0.0,>=0.3.6
10
+ Requires-Dist: langchain-core<1.0.0,>=0.3.49
11
+ Requires-Dist: langchain-text-splitters<1.0.0,>=0.3.7
12
12
  Requires-Dist: langsmith<0.4,>=0.1.17
13
13
  Requires-Dist: pydantic<3.0.0,>=2.7.4
14
14
  Requires-Dist: SQLAlchemy<3,>=1.4
@@ -21,6 +21,8 @@ Provides-Extra: anthropic
21
21
  Requires-Dist: langchain-anthropic; extra == "anthropic"
22
22
  Provides-Extra: openai
23
23
  Requires-Dist: langchain-openai; extra == "openai"
24
+ Provides-Extra: azure-ai
25
+ Requires-Dist: langchain-azure-ai; extra == "azure-ai"
24
26
  Provides-Extra: cohere
25
27
  Requires-Dist: langchain-cohere; extra == "cohere"
26
28
  Provides-Extra: google-vertexai
@@ -1,7 +1,7 @@
1
- langchain-0.3.20.dist-info/METADATA,sha256=Igkqqj4LLz-IQexFHUYfh-pYdrua3qzGbvVytVr9MA8,7680
2
- langchain-0.3.20.dist-info/WHEEL,sha256=thaaA2w1JzcGC48WYufAs8nrYZjJm8LqNfnXFOFyCC4,90
3
- langchain-0.3.20.dist-info/entry_points.txt,sha256=hLMwTN6pPNCY0cYtYmCYgY-piFzDb17o6ZrDC6IpdQU,75
4
- langchain-0.3.20.dist-info/licenses/LICENSE,sha256=TsZ-TKbmch26hJssqCJhWXyGph7iFLvyFBYAa3stBHg,1067
1
+ langchain-0.3.22.dist-info/METADATA,sha256=0aEEqzoGbs0ymaArX7GyBiypuitjx0tSwTyQ4zF-D-A,7760
2
+ langchain-0.3.22.dist-info/WHEEL,sha256=thaaA2w1JzcGC48WYufAs8nrYZjJm8LqNfnXFOFyCC4,90
3
+ langchain-0.3.22.dist-info/entry_points.txt,sha256=hLMwTN6pPNCY0cYtYmCYgY-piFzDb17o6ZrDC6IpdQU,75
4
+ langchain-0.3.22.dist-info/licenses/LICENSE,sha256=TsZ-TKbmch26hJssqCJhWXyGph7iFLvyFBYAa3stBHg,1067
5
5
  langchain/__init__.py,sha256=4cqV-N_QJnfjk52DqtR2e72vsmJC1R6PkflvRdLjZQI,13709
6
6
  langchain/_api/__init__.py,sha256=0FuHuMNUBMrst1Y1nm5yZzQr2xbLmb7rxMsimqKBXhs,733
7
7
  langchain/_api/deprecation.py,sha256=K9VCkmMs_ebfd_wCJppKq4Ahw-mlXkukbsQ69iQVxT0,1246
@@ -115,7 +115,7 @@ langchain/agents/mrkl/base.py,sha256=yonYGfgMkTixmrknWROMjwjddiUCgmWEkfIaWVlJdAU
115
115
  langchain/agents/mrkl/output_parser.py,sha256=YQGSjQq5pR4kFUg1HrOS3laV6xgtHgtIOQ_TtJY0UFI,3720
116
116
  langchain/agents/mrkl/prompt.py,sha256=2dTMP2lAWiLvCtuEijgQRjbKDlbPEnmx77duMwdJ7e4,641
117
117
  langchain/agents/openai_assistant/__init__.py,sha256=Xssaqoxrix3hn1gKSOLmDRQzTxAoJk0ProGXmXQe8Mw,114
118
- langchain/agents/openai_assistant/base.py,sha256=VW4CnD3IrQBnebzh11hEqEbIoNuAyiT6PumVKMJ2_Ok,30163
118
+ langchain/agents/openai_assistant/base.py,sha256=ElQWMn_Ld_bb26vEXuHmI8Zs7HsMVh5Z7jBFv33KEFI,30365
119
119
  langchain/agents/openai_functions_agent/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
120
120
  langchain/agents/openai_functions_agent/agent_token_buffer_memory.py,sha256=G5vrWDbv3oWojxafiW2qSae7Z7WUdZugI-ywjTP0zZ4,3790
121
121
  langchain/agents/openai_functions_agent/base.py,sha256=katIW0vE87B7ezm9WU_fEMfeHSQPHZptM0zppQfnY-4,13474
@@ -364,7 +364,7 @@ langchain/chat_models/azure_openai.py,sha256=aRNol2PNC49PmvdZnwjhQeMFRDOOelPNAXz
364
364
  langchain/chat_models/azureml_endpoint.py,sha256=6mxXm8UFXataLp0NYRGA88V3DpiNKPo095u_JGj7XGE,863
365
365
  langchain/chat_models/baichuan.py,sha256=3-GveFoF5ZNyLdRNK6V4i3EDDjdseOTFWbCMhDbtO9w,643
366
366
  langchain/chat_models/baidu_qianfan_endpoint.py,sha256=CZrX2SMpbE9H7wBXNC6rGvw-YqQl9zjuJrClYQxEzuI,715
367
- langchain/chat_models/base.py,sha256=YK84iOnFy64l_6yO1voeO-0toP5nxhIBaTDNQyV2Rgs,34568
367
+ langchain/chat_models/base.py,sha256=qrUQZM0hHj8RxqEyCA_4tFwyqCpAOXY5tCpC39-mfKs,34868
368
368
  langchain/chat_models/bedrock.py,sha256=HRV3T_0mEnZ8LvJJqAA_UVpt-_03G715oIgomRJw55M,757
369
369
  langchain/chat_models/cohere.py,sha256=EYOECHX-nKRhZVfCfmFGZ2lr51PzaB5OvOEqmBCu1fI,633
370
370
  langchain/chat_models/databricks.py,sha256=5_QkC5lG4OldaHC2FS0XylirJouyZx1YT95SKwc12M0,653
@@ -1339,4 +1339,4 @@ langchain/vectorstores/xata.py,sha256=HW_Oi5Hz8rH2JaUhRNWQ-3hLYmNzD8eAz6K5YqPArm
1339
1339
  langchain/vectorstores/yellowbrick.py,sha256=-lnjGcRE8Q1nEPOTdbKYTw5noS2cy2ce1ePOU804-_o,624
1340
1340
  langchain/vectorstores/zep.py,sha256=RJ2auxoA6uHHLEZknw3_jeFmYJYVt-PWKMBcNMGV6TM,798
1341
1341
  langchain/vectorstores/zilliz.py,sha256=XhPPIUfKPFJw0_svCoBgCnNkkBLoRVVcyuMfOnE5IxU,609
1342
- langchain-0.3.20.dist-info/RECORD,,
1342
+ langchain-0.3.22.dist-info/RECORD,,