langchain-core 0.3.73__py3-none-any.whl → 0.3.74__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-core might be problematic. Click here for more details.

@@ -74,7 +74,14 @@ if TYPE_CHECKING:
74
74
  from collections.abc import Sequence
75
75
 
76
76
  FILTERED_ARGS = ("run_manager", "callbacks")
77
- TOOL_MESSAGE_BLOCK_TYPES = ("text", "image_url", "image", "json", "search_result")
77
+ TOOL_MESSAGE_BLOCK_TYPES = (
78
+ "text",
79
+ "image_url",
80
+ "image",
81
+ "json",
82
+ "search_result",
83
+ "custom_tool_call_output",
84
+ )
78
85
 
79
86
 
80
87
  class SchemaAnnotationError(TypeError):
@@ -575,12 +575,23 @@ def convert_to_openai_tool(
575
575
 
576
576
  Added support for OpenAI's image generation built-in tool.
577
577
  """
578
+ from langchain_core.tools import Tool
579
+
578
580
  if isinstance(tool, dict):
579
581
  if tool.get("type") in _WellKnownOpenAITools:
580
582
  return tool
581
583
  # As of 03.12.25 can be "web_search_preview" or "web_search_preview_2025_03_11"
582
584
  if (tool.get("type") or "").startswith("web_search_preview"):
583
585
  return tool
586
+ if isinstance(tool, Tool) and (tool.metadata or {}).get("type") == "custom_tool":
587
+ oai_tool = {
588
+ "type": "custom",
589
+ "name": tool.name,
590
+ "description": tool.description,
591
+ }
592
+ if tool.metadata is not None and "format" in tool.metadata:
593
+ oai_tool["format"] = tool.metadata["format"]
594
+ return oai_tool
584
595
  oai_function = convert_to_openai_function(tool, strict=strict)
585
596
  return {"type": "function", "function": oai_function}
586
597
 
langchain_core/version.py CHANGED
@@ -1,3 +1,3 @@
1
1
  """langchain-core version information and utilities."""
2
2
 
3
- VERSION = "0.3.73"
3
+ VERSION = "0.3.74"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: langchain-core
3
- Version: 0.3.73
3
+ Version: 0.3.74
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/core
@@ -1,6 +1,6 @@
1
- langchain_core-0.3.73.dist-info/METADATA,sha256=CLA8OfifefiRjj2ymWS-y6ccJsfdFrQ-uXVs1VS_9kI,5767
2
- langchain_core-0.3.73.dist-info/WHEEL,sha256=9P2ygRxDrTJz3gsagc0Z96ukrxjr-LFBGOgv3AuKlCA,90
3
- langchain_core-0.3.73.dist-info/entry_points.txt,sha256=6OYgBcLyFCUgeqLgnvMyOJxPCWzgy7se4rLPKtNonMs,34
1
+ langchain_core-0.3.74.dist-info/METADATA,sha256=4qjK9Sykdwj4rmVe3TkftIEecQXH6SZyj-uL1FuIj08,5767
2
+ langchain_core-0.3.74.dist-info/WHEEL,sha256=9P2ygRxDrTJz3gsagc0Z96ukrxjr-LFBGOgv3AuKlCA,90
3
+ langchain_core-0.3.74.dist-info/entry_points.txt,sha256=6OYgBcLyFCUgeqLgnvMyOJxPCWzgy7se4rLPKtNonMs,34
4
4
  langchain_core/__init__.py,sha256=TgvhxbrjCRVJwr2HddiyHvtH8W94K-uLM6-6ifNIBXo,713
5
5
  langchain_core/_api/__init__.py,sha256=WDOMw4faVuscjDCL5ttnRQNienJP_M9vGMmJUXS6L5w,1976
6
6
  langchain_core/_api/beta_decorator.py,sha256=4rd0VX6SE5pxJ1zrO25bQ7UyL3ASellXuwEOys9LCG8,9943
@@ -126,7 +126,7 @@ langchain_core/stores.py,sha256=au0zWDoz1MF2fN9mzscVpxSNjQoecS2vKtPccJ4tUeM,1082
126
126
  langchain_core/structured_query.py,sha256=y6dInaoZwQJ9qg4Qssv4EdWcnuMm1TBBXLqNnzYyA28,5286
127
127
  langchain_core/sys_info.py,sha256=2i0E5GsKDTKct4aLR6ko-P2edynqhDIbZBYU1hsdXzc,4085
128
128
  langchain_core/tools/__init__.py,sha256=Uqcn6gFAoFbMM4aRXd8ACL4D-owdevGc37Gn-KOB8JU,2860
129
- langchain_core/tools/base.py,sha256=35XsKa20wCz1eMee87MghkPXCGmfXy62ZxWqOVOMuDQ,49929
129
+ langchain_core/tools/base.py,sha256=sHJqHH6k2W2Vzchx7lV7iI3NIkdmyeD2H9lZsvTbowA,49983
130
130
  langchain_core/tools/convert.py,sha256=mzUvT0ykB5-YkJlTsOs7GvlAuby_LqMhwibXDSay-Y4,15670
131
131
  langchain_core/tools/render.py,sha256=BosvIWrSvOJgRg_gaSDBS58j99gwQHsLhprOXeJP53I,1842
132
132
  langchain_core/tools/retriever.py,sha256=zlSV3HnWhhmtZtkNGbNQW9wxv8GptJKmDhzqZj8e36o,3873
@@ -152,7 +152,7 @@ langchain_core/utils/_merge.py,sha256=uo_n2mJ0_FuRJZUUgJemsXQ8rAC9fyYGOMmnPfbbDU
152
152
  langchain_core/utils/aiter.py,sha256=wAW_a_5Lhpf8l1-iUpWHIAnyK3u-FREBvavjT83MPAM,10767
153
153
  langchain_core/utils/env.py,sha256=swKMUVFS-Jr_9KK2ToWam6qd9lt73Pz4RtRqwcaiFQw,2464
154
154
  langchain_core/utils/formatting.py,sha256=fkieArzKXxSsLcEa3B-MX60O4ZLeeLjiPtVtxCJPcOU,1480
155
- langchain_core/utils/function_calling.py,sha256=OT2I2vxtlzy3mg_U_bOzlTAxWSL7mAWhiEEvOtL0VHA,28433
155
+ langchain_core/utils/function_calling.py,sha256=OQA7YErezn3o6UPrFRvqfLxn0wNVJESEjPovpWS9XVw,28848
156
156
  langchain_core/utils/html.py,sha256=fUogMGhd-VoUbsGnMyY6v_gv9nbxJy-vmC4yfICcflM,3780
157
157
  langchain_core/utils/image.py,sha256=1MH8Lbg0f2HfhTC4zobKMvpVoHRfpsyvWHq9ae4xENo,532
158
158
  langchain_core/utils/input.py,sha256=z3tubdUtsoHqfTyiBGfELLr1xemSe-pGvhfAeGE6O2g,1958
@@ -170,5 +170,5 @@ langchain_core/vectorstores/__init__.py,sha256=5P0eoeoH5LHab64JjmEeWa6SxX4eMy-et
170
170
  langchain_core/vectorstores/base.py,sha256=4AR5L6RWuAPEo9DQj9pOIN7UR3Ln45s02pU_Oe8sYsI,42026
171
171
  langchain_core/vectorstores/in_memory.py,sha256=lxe2bR-wFtvNN2Ii7EGOh3ON3MwqNRP996eUEek55fA,18076
172
172
  langchain_core/vectorstores/utils.py,sha256=DZUUR1xDybHDhmZJsd1V2OEPsYiFVc2nhtD4w8hw9ns,4934
173
- langchain_core/version.py,sha256=Yt0ataikGYt4j5ZFjRxeHDl_seiWVXkaUWNYzZMDXhM,76
174
- langchain_core-0.3.73.dist-info/RECORD,,
173
+ langchain_core/version.py,sha256=IVinfytxTeMIgrxFlp5iJwFUjbCvUjhTLeu5MOmwEPo,76
174
+ langchain_core-0.3.74.dist-info/RECORD,,