29from langchain_core.prompts import ChatPromptTemplate
30from langchain_core.tools import BaseTool, tool
31▶from langchain_core.utils.function_calling import (
32 convert_to_json_schema,
33 tool_example_to_messages,
· · ·
99
100
101▶class _MagicFunctionSchema(BaseModel):
102 input: int = Field(..., gt=-1000, lt=1000)
103
· · ·
104
105▶@tool(args_schema=_MagicFunctionSchema)
106def magic_function(_input: int) -> int:
107 """Apply a magic function to an input."""
· · ·
106▶def magic_function(_input: int) -> int:
107 """Apply a magic function to an input."""
108 return _input + 2
· · ·
107▶ """Apply a magic function to an input."""
108 return _input + 2
109
+ 44 more matches in this file