The agent engineering platform.
Python agentsaiai-agentsanthropicchatgptdeepagentsenterpriseframeworkgeminigenerative-ailangchainlanggraphllmmultiagentopen-sourceopenaipydanticpythonragtypescript
core[patch]: Release 0.2.29 (#25126)
Bagaturb4c12346ccd5
diff --git a/libs/core/langchain_core/utils/function_calling.py b/libs/core/langchain_core/utils/function_calling.pyindex b726aa0019..e4a7acabee 100644--- a/libs/core/langchain_core/utils/function_calling.py+++ b/libs/core/langchain_core/utils/function_calling.py@@ -327,15 +327,23 @@ def convert_to_openai_function() -> Dict[str, Any]:"""Convert a raw function/class to an OpenAI function.+ .. versionchanged:: 0.2.29++ ``strict`` arg added.+Args:- function: A dictionary, Pydantic BaseModel class, TypedDict class, a LangChain+ function:+ A dictionary, Pydantic BaseModel class, TypedDict class, a LangChainTool object, or a Python function. If a dictionary is passed in, it isassumed to already be a valid OpenAI function or a JSON schema withtop-level 'title' and 'description' keys specified.- strict: If True, model output is guaranteed to exactly match the JSON Schema+ strict:+ If True, model output is guaranteed to exactly match the JSON Schemaprovided in the function definition. If None, ``strict`` argument will notbe included in function definition.+ .. versionadded:: 0.2.29+Returns:A dict version of the passed in function which is compatible with the OpenAIfunction-calling API.@@ -393,18 +401,26 @@ def convert_to_openai_tool() -> Dict[str, Any]:"""Convert a raw function/class to an OpenAI tool.+ .. versionchanged:: 0.2.29++ ``strict`` arg added.+Args:- tool: Either a dictionary, a pydantic.BaseModel class, Python function, or+ tool:+ Either a dictionary, a pydantic.BaseModel class, Python function, orBaseTool. If a dictionary is passed in, it is assumed to already be a validOpenAI tool, OpenAI function, or a JSON schema with top-level 'title' and'description' keys specified.- strict: If True, model output is guaranteed to exactly match the JSON Schema+ strict:+ If True, model output is guaranteed to exactly match the JSON Schemaprovided in the function definition. If None, ``strict`` argument will notbe included in tool definition.+ .. versionadded:: 0.2.29+Returns:A dict version of the passed in tool which is compatible with the- OpenAI tool-calling API.+ OpenAI tool-calling API."""if isinstance(tool, dict) and tool.get("type") == "function" and "function" in tool:return tooldiff --git a/libs/core/pyproject.toml b/libs/core/pyproject.tomlindex 2e44a1528f..057c74e081 100644--- a/libs/core/pyproject.toml+++ b/libs/core/pyproject.toml@@ -4,7 +4,7 @@ build-backend = "poetry.core.masonry.api"[tool.poetry]name = "langchain-core"-version = "0.2.29rc1"+version = "0.2.29"description = "Building applications with LLMs through composability"authors = []license = "MIT"