pydantic_ai.ext
tool_from_langchain
tool_from_langchain(langchain_tool: LangChainTool) -> Tool
Creates a Pydantic AI tool proxy from a LangChain tool.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
langchain_tool
|
LangChainTool
|
The LangChain tool to wrap. |
required |
Returns:
Type | Description |
---|---|
Tool
|
A Pydantic AI tool that corresponds to the LangChain tool. |
Source code in pydantic_ai_slim/pydantic_ai/ext/langchain.py
30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 |
|
LangChainToolset
Bases: FunctionToolset
A toolset that wraps LangChain tools.
Source code in pydantic_ai_slim/pydantic_ai/ext/langchain.py
65 66 67 68 69 |
|
tool_from_aci
Creates a Pydantic AI tool proxy from an ACI.dev function.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
aci_function
|
str
|
The ACI.dev function to wrap. |
required |
linked_account_owner_id
|
str
|
The ACI user ID to execute the function on behalf of. |
required |
Returns:
Type | Description |
---|---|
Tool
|
A Pydantic AI tool that corresponds to the ACI.dev tool. |
Source code in pydantic_ai_slim/pydantic_ai/ext/aci.py
26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 |
|
ACIToolset
Bases: FunctionToolset
A toolset that wraps ACI.dev tools.
Source code in pydantic_ai_slim/pydantic_ai/ext/aci.py
71 72 73 74 75 |
|