A tool that interacts with Azure AI Foundry Agent Service V2.
Use this class to wrap tools from Azure AI Foundry for use with
PromptBasedAgentNodeV2.
Example:
from langchain_azure_ai.agents.prebuilt.tools_v2 import AgentServiceBaseToolV2
from azure.ai.projects.models import CodeInterpreterTool
code_interpreter_tool = AgentServiceBaseTool(tool=CodeInterpreterTool())
Some tools require extra HTTP headers when calling the Responses API.
For example, ImageGenTool requires an
x-ms-oai-image-generation-deployment header:
from azure.ai.projects.models import ImageGenTool
image_tool = AgentServiceBaseToolV2(
tool=ImageGenTool(model="gpt-image-1", quality="low", size="1024x1024"),
extra_headers={
"x-ms-oai-image-generation-deployment": "gpt-image-1",
},
)
All extra_headers from every tool are merged and sent with each
responses.create() call made by the agent node.