id
stringlengths
14
15
text
stringlengths
22
2.51k
source
stringlengths
61
160
9675d66bd166-0
langchain.tools.gmail.get_thread.GetThreadSchema¶ class langchain.tools.gmail.get_thread.GetThreadSchema(*, thread_id: str)[source]¶ Bases: BaseModel Input for GetMessageTool. Create a new model by parsing and validating input data from keyword arguments. Raises ValidationError if the input data cannot be parsed to form a valid model. param thread_id: str [Required]¶ The thread ID.
https://api.python.langchain.com/en/latest/tools/langchain.tools.gmail.get_thread.GetThreadSchema.html
c447caf2049c-0
langchain.tools.powerbi.tool.ListPowerBITool¶ class langchain.tools.powerbi.tool.ListPowerBITool(*, name: str = 'list_tables_powerbi', description: str = 'Input is an empty string, output is a comma separated list of tables in the database.', args_schema: Optional[Type[BaseModel]] = None, return_direct: bool = False, verbose: bool = False, callbacks: Optional[Union[List[BaseCallbackHandler], BaseCallbackManager]] = None, callback_manager: Optional[BaseCallbackManager] = None, tags: Optional[List[str]] = None, metadata: Optional[Dict[str, Any]] = None, handle_tool_error: Optional[Union[bool, str, Callable[[ToolException], str]]] = False, powerbi: PowerBIDataset)[source]¶ Bases: BaseTool Tool for getting tables names. Create a new model by parsing and validating input data from keyword arguments. Raises ValidationError if the input data cannot be parsed to form a valid model. param args_schema: Optional[Type[BaseModel]] = None¶ Pydantic model class to validate and parse the tool’s input arguments. param callback_manager: Optional[BaseCallbackManager] = None¶ Deprecated. Please use callbacks instead. param callbacks: Callbacks = None¶ Callbacks to be called during tool execution. param description: str = 'Input is an empty string, output is a comma separated list of tables in the database.'¶ Used to tell the model how/when/why to use the tool. You can provide few-shot examples as a part of the description. param handle_tool_error: Optional[Union[bool, str, Callable[[ToolException], str]]] = False¶ Handle the content of the ToolException thrown. param metadata: Optional[Dict[str, Any]] = None¶ Optional metadata associated with the tool. Defaults to None
https://api.python.langchain.com/en/latest/tools/langchain.tools.powerbi.tool.ListPowerBITool.html
c447caf2049c-1
Optional metadata associated with the tool. Defaults to None This metadata will be associated with each call to this tool, and passed as arguments to the handlers defined in callbacks. You can use these to eg identify a specific instance of a tool with its use case. param name: str = 'list_tables_powerbi'¶ The unique name of the tool that clearly communicates its purpose. param powerbi: langchain.utilities.powerbi.PowerBIDataset [Required]¶ param return_direct: bool = False¶ Whether to return the tool’s output directly. Setting this to True means that after the tool is called, the AgentExecutor will stop looping. param tags: Optional[List[str]] = None¶ Optional list of tags associated with the tool. Defaults to None These tags will be associated with each call to this tool, and passed as arguments to the handlers defined in callbacks. You can use these to eg identify a specific instance of a tool with its use case. param verbose: bool = False¶ Whether to log the tool’s progress. __call__(tool_input: str, callbacks: Optional[Union[List[BaseCallbackHandler], BaseCallbackManager]] = None) → str¶ Make tool callable. async ainvoke(input: Union[str, Dict], config: Optional[RunnableConfig] = None, **kwargs: Any) → Any¶ async arun(tool_input: Union[str, Dict], verbose: Optional[bool] = None, start_color: Optional[str] = 'green', color: Optional[str] = 'green', callbacks: Optional[Union[List[BaseCallbackHandler], BaseCallbackManager]] = None, *, tags: Optional[List[str]] = None, metadata: Optional[Dict[str, Any]] = None, **kwargs: Any) → Any¶ Run the tool asynchronously.
https://api.python.langchain.com/en/latest/tools/langchain.tools.powerbi.tool.ListPowerBITool.html
c447caf2049c-2
Run the tool asynchronously. invoke(input: Union[str, Dict], config: Optional[RunnableConfig] = None, **kwargs: Any) → Any¶ validator raise_deprecation  »  all fields¶ Raise deprecation warning if callback_manager is used. run(tool_input: Union[str, Dict], verbose: Optional[bool] = None, start_color: Optional[str] = 'green', color: Optional[str] = 'green', callbacks: Optional[Union[List[BaseCallbackHandler], BaseCallbackManager]] = None, *, tags: Optional[List[str]] = None, metadata: Optional[Dict[str, Any]] = None, **kwargs: Any) → Any¶ Run the tool. property args: dict¶ property is_single_input: bool¶ Whether the tool only accepts a single input. model Config[source]¶ Bases: object Configuration for this pydantic object. arbitrary_types_allowed = True¶
https://api.python.langchain.com/en/latest/tools/langchain.tools.powerbi.tool.ListPowerBITool.html
8d2446654d9b-0
langchain.tools.playwright.navigate.NavigateToolInput¶ class langchain.tools.playwright.navigate.NavigateToolInput(*, url: str)[source]¶ Bases: BaseModel Input for NavigateToolInput. Create a new model by parsing and validating input data from keyword arguments. Raises ValidationError if the input data cannot be parsed to form a valid model. param url: str [Required]¶ url to navigate to
https://api.python.langchain.com/en/latest/tools/langchain.tools.playwright.navigate.NavigateToolInput.html
f77ec134be02-0
langchain.tools.office365.base.O365BaseTool¶ class langchain.tools.office365.base.O365BaseTool(*, name: str, description: str, args_schema: Optional[Type[BaseModel]] = None, return_direct: bool = False, verbose: bool = False, callbacks: Optional[Union[List[BaseCallbackHandler], BaseCallbackManager]] = None, callback_manager: Optional[BaseCallbackManager] = None, tags: Optional[List[str]] = None, metadata: Optional[Dict[str, Any]] = None, handle_tool_error: Optional[Union[bool, str, Callable[[ToolException], str]]] = False, account: Account = None)[source]¶ Bases: BaseTool Base class for the Office 365 tools. Create a new model by parsing and validating input data from keyword arguments. Raises ValidationError if the input data cannot be parsed to form a valid model. param account: Account [Optional]¶ The account object for the Office 365 account. param args_schema: Optional[Type[BaseModel]] = None¶ Pydantic model class to validate and parse the tool’s input arguments. param callback_manager: Optional[BaseCallbackManager] = None¶ Deprecated. Please use callbacks instead. param callbacks: Callbacks = None¶ Callbacks to be called during tool execution. param description: str [Required]¶ Used to tell the model how/when/why to use the tool. You can provide few-shot examples as a part of the description. param handle_tool_error: Optional[Union[bool, str, Callable[[ToolException], str]]] = False¶ Handle the content of the ToolException thrown. param metadata: Optional[Dict[str, Any]] = None¶ Optional metadata associated with the tool. Defaults to None This metadata will be associated with each call to this tool,
https://api.python.langchain.com/en/latest/tools/langchain.tools.office365.base.O365BaseTool.html
f77ec134be02-1
This metadata will be associated with each call to this tool, and passed as arguments to the handlers defined in callbacks. You can use these to eg identify a specific instance of a tool with its use case. param name: str [Required]¶ The unique name of the tool that clearly communicates its purpose. param return_direct: bool = False¶ Whether to return the tool’s output directly. Setting this to True means that after the tool is called, the AgentExecutor will stop looping. param tags: Optional[List[str]] = None¶ Optional list of tags associated with the tool. Defaults to None These tags will be associated with each call to this tool, and passed as arguments to the handlers defined in callbacks. You can use these to eg identify a specific instance of a tool with its use case. param verbose: bool = False¶ Whether to log the tool’s progress. __call__(tool_input: str, callbacks: Optional[Union[List[BaseCallbackHandler], BaseCallbackManager]] = None) → str¶ Make tool callable. async ainvoke(input: Union[str, Dict], config: Optional[RunnableConfig] = None, **kwargs: Any) → Any¶ async arun(tool_input: Union[str, Dict], verbose: Optional[bool] = None, start_color: Optional[str] = 'green', color: Optional[str] = 'green', callbacks: Optional[Union[List[BaseCallbackHandler], BaseCallbackManager]] = None, *, tags: Optional[List[str]] = None, metadata: Optional[Dict[str, Any]] = None, **kwargs: Any) → Any¶ Run the tool asynchronously. invoke(input: Union[str, Dict], config: Optional[RunnableConfig] = None, **kwargs: Any) → Any¶ validator raise_deprecation  »  all fields¶ Raise deprecation warning if callback_manager is used.
https://api.python.langchain.com/en/latest/tools/langchain.tools.office365.base.O365BaseTool.html
f77ec134be02-2
Raise deprecation warning if callback_manager is used. run(tool_input: Union[str, Dict], verbose: Optional[bool] = None, start_color: Optional[str] = 'green', color: Optional[str] = 'green', callbacks: Optional[Union[List[BaseCallbackHandler], BaseCallbackManager]] = None, *, tags: Optional[List[str]] = None, metadata: Optional[Dict[str, Any]] = None, **kwargs: Any) → Any¶ Run the tool. property args: dict¶ property is_single_input: bool¶ Whether the tool only accepts a single input. model Config¶ Bases: object Configuration for this pydantic object. arbitrary_types_allowed = True¶ extra = 'forbid'¶
https://api.python.langchain.com/en/latest/tools/langchain.tools.office365.base.O365BaseTool.html
748c050546a8-0
langchain.tools.gmail.create_draft.GmailCreateDraft¶ class langchain.tools.gmail.create_draft.GmailCreateDraft(*, name: str = 'create_gmail_draft', description: str = 'Use this tool to create a draft email with the provided message fields.', args_schema: ~typing.Type[~langchain.tools.gmail.create_draft.CreateDraftSchema] = <class 'langchain.tools.gmail.create_draft.CreateDraftSchema'>, return_direct: bool = False, verbose: bool = False, callbacks: ~typing.Optional[~typing.Union[~typing.List[~langchain.callbacks.base.BaseCallbackHandler], ~langchain.callbacks.base.BaseCallbackManager]] = None, callback_manager: ~typing.Optional[~langchain.callbacks.base.BaseCallbackManager] = None, tags: ~typing.Optional[~typing.List[str]] = None, metadata: ~typing.Optional[~typing.Dict[str, ~typing.Any]] = None, handle_tool_error: ~typing.Optional[~typing.Union[bool, str, ~typing.Callable[[~langchain.tools.base.ToolException], str]]] = False, api_resource: Resource = None)[source]¶ Bases: GmailBaseTool Tool that creates a draft email for Gmail. Create a new model by parsing and validating input data from keyword arguments. Raises ValidationError if the input data cannot be parsed to form a valid model. param api_resource: Resource [Optional]¶ param args_schema: Type[langchain.tools.gmail.create_draft.CreateDraftSchema] = <class 'langchain.tools.gmail.create_draft.CreateDraftSchema'>¶ Pydantic model class to validate and parse the tool’s input arguments. param callback_manager: Optional[BaseCallbackManager] = None¶ Deprecated. Please use callbacks instead. param callbacks: Callbacks = None¶ Callbacks to be called during tool execution.
https://api.python.langchain.com/en/latest/tools/langchain.tools.gmail.create_draft.GmailCreateDraft.html
748c050546a8-1
param callbacks: Callbacks = None¶ Callbacks to be called during tool execution. param description: str = 'Use this tool to create a draft email with the provided message fields.'¶ Used to tell the model how/when/why to use the tool. You can provide few-shot examples as a part of the description. param handle_tool_error: Optional[Union[bool, str, Callable[[ToolException], str]]] = False¶ Handle the content of the ToolException thrown. param metadata: Optional[Dict[str, Any]] = None¶ Optional metadata associated with the tool. Defaults to None This metadata will be associated with each call to this tool, and passed as arguments to the handlers defined in callbacks. You can use these to eg identify a specific instance of a tool with its use case. param name: str = 'create_gmail_draft'¶ The unique name of the tool that clearly communicates its purpose. param return_direct: bool = False¶ Whether to return the tool’s output directly. Setting this to True means that after the tool is called, the AgentExecutor will stop looping. param tags: Optional[List[str]] = None¶ Optional list of tags associated with the tool. Defaults to None These tags will be associated with each call to this tool, and passed as arguments to the handlers defined in callbacks. You can use these to eg identify a specific instance of a tool with its use case. param verbose: bool = False¶ Whether to log the tool’s progress. __call__(tool_input: str, callbacks: Optional[Union[List[BaseCallbackHandler], BaseCallbackManager]] = None) → str¶ Make tool callable. async ainvoke(input: Union[str, Dict], config: Optional[RunnableConfig] = None, **kwargs: Any) → Any¶
https://api.python.langchain.com/en/latest/tools/langchain.tools.gmail.create_draft.GmailCreateDraft.html
748c050546a8-2
async arun(tool_input: Union[str, Dict], verbose: Optional[bool] = None, start_color: Optional[str] = 'green', color: Optional[str] = 'green', callbacks: Optional[Union[List[BaseCallbackHandler], BaseCallbackManager]] = None, *, tags: Optional[List[str]] = None, metadata: Optional[Dict[str, Any]] = None, **kwargs: Any) → Any¶ Run the tool asynchronously. classmethod from_api_resource(api_resource: Resource) → GmailBaseTool¶ Create a tool from an api resource. Parameters api_resource – The api resource to use. Returns A tool. invoke(input: Union[str, Dict], config: Optional[RunnableConfig] = None, **kwargs: Any) → Any¶ validator raise_deprecation  »  all fields¶ Raise deprecation warning if callback_manager is used. run(tool_input: Union[str, Dict], verbose: Optional[bool] = None, start_color: Optional[str] = 'green', color: Optional[str] = 'green', callbacks: Optional[Union[List[BaseCallbackHandler], BaseCallbackManager]] = None, *, tags: Optional[List[str]] = None, metadata: Optional[Dict[str, Any]] = None, **kwargs: Any) → Any¶ Run the tool. property args: dict¶ property is_single_input: bool¶ Whether the tool only accepts a single input. model Config¶ Bases: object Configuration for this pydantic object. arbitrary_types_allowed = True¶ extra = 'forbid'¶
https://api.python.langchain.com/en/latest/tools/langchain.tools.gmail.create_draft.GmailCreateDraft.html
e822c6cf4f72-0
langchain.tools.file_management.read.ReadFileTool¶ class langchain.tools.file_management.read.ReadFileTool(*, name: str = 'read_file', description: str = 'Read file from disk', args_schema: ~typing.Type[~pydantic.main.BaseModel] = <class 'langchain.tools.file_management.read.ReadFileInput'>, return_direct: bool = False, verbose: bool = False, callbacks: ~typing.Optional[~typing.Union[~typing.List[~langchain.callbacks.base.BaseCallbackHandler], ~langchain.callbacks.base.BaseCallbackManager]] = None, callback_manager: ~typing.Optional[~langchain.callbacks.base.BaseCallbackManager] = None, tags: ~typing.Optional[~typing.List[str]] = None, metadata: ~typing.Optional[~typing.Dict[str, ~typing.Any]] = None, handle_tool_error: ~typing.Optional[~typing.Union[bool, str, ~typing.Callable[[~langchain.tools.base.ToolException], str]]] = False, root_dir: ~typing.Optional[str] = None)[source]¶ Bases: BaseFileToolMixin, BaseTool Tool that reads a file. Create a new model by parsing and validating input data from keyword arguments. Raises ValidationError if the input data cannot be parsed to form a valid model. param args_schema: Type[pydantic.main.BaseModel] = <class 'langchain.tools.file_management.read.ReadFileInput'>¶ Pydantic model class to validate and parse the tool’s input arguments. param callback_manager: Optional[BaseCallbackManager] = None¶ Deprecated. Please use callbacks instead. param callbacks: Callbacks = None¶ Callbacks to be called during tool execution. param description: str = 'Read file from disk'¶ Used to tell the model how/when/why to use the tool. You can provide few-shot examples as a part of the description.
https://api.python.langchain.com/en/latest/tools/langchain.tools.file_management.read.ReadFileTool.html
e822c6cf4f72-1
You can provide few-shot examples as a part of the description. param handle_tool_error: Optional[Union[bool, str, Callable[[ToolException], str]]] = False¶ Handle the content of the ToolException thrown. param metadata: Optional[Dict[str, Any]] = None¶ Optional metadata associated with the tool. Defaults to None This metadata will be associated with each call to this tool, and passed as arguments to the handlers defined in callbacks. You can use these to eg identify a specific instance of a tool with its use case. param name: str = 'read_file'¶ The unique name of the tool that clearly communicates its purpose. param return_direct: bool = False¶ Whether to return the tool’s output directly. Setting this to True means that after the tool is called, the AgentExecutor will stop looping. param root_dir: Optional[str] = None¶ The final path will be chosen relative to root_dir if specified. param tags: Optional[List[str]] = None¶ Optional list of tags associated with the tool. Defaults to None These tags will be associated with each call to this tool, and passed as arguments to the handlers defined in callbacks. You can use these to eg identify a specific instance of a tool with its use case. param verbose: bool = False¶ Whether to log the tool’s progress. __call__(tool_input: str, callbacks: Optional[Union[List[BaseCallbackHandler], BaseCallbackManager]] = None) → str¶ Make tool callable. async ainvoke(input: Union[str, Dict], config: Optional[RunnableConfig] = None, **kwargs: Any) → Any¶
https://api.python.langchain.com/en/latest/tools/langchain.tools.file_management.read.ReadFileTool.html
e822c6cf4f72-2
async arun(tool_input: Union[str, Dict], verbose: Optional[bool] = None, start_color: Optional[str] = 'green', color: Optional[str] = 'green', callbacks: Optional[Union[List[BaseCallbackHandler], BaseCallbackManager]] = None, *, tags: Optional[List[str]] = None, metadata: Optional[Dict[str, Any]] = None, **kwargs: Any) → Any¶ Run the tool asynchronously. get_relative_path(file_path: str) → Path¶ Get the relative path, returning an error if unsupported. invoke(input: Union[str, Dict], config: Optional[RunnableConfig] = None, **kwargs: Any) → Any¶ validator raise_deprecation  »  all fields¶ Raise deprecation warning if callback_manager is used. run(tool_input: Union[str, Dict], verbose: Optional[bool] = None, start_color: Optional[str] = 'green', color: Optional[str] = 'green', callbacks: Optional[Union[List[BaseCallbackHandler], BaseCallbackManager]] = None, *, tags: Optional[List[str]] = None, metadata: Optional[Dict[str, Any]] = None, **kwargs: Any) → Any¶ Run the tool. property args: dict¶ property is_single_input: bool¶ Whether the tool only accepts a single input. model Config¶ Bases: object Configuration for this pydantic object. arbitrary_types_allowed = True¶ extra = 'forbid'¶ Examples using ReadFileTool¶ File System Tools AutoGPT !pip install bs4
https://api.python.langchain.com/en/latest/tools/langchain.tools.file_management.read.ReadFileTool.html
0ecfa8465af6-0
langchain.tools.gmail.base.GmailBaseTool¶ class langchain.tools.gmail.base.GmailBaseTool(*, name: str, description: str, args_schema: Optional[Type[BaseModel]] = None, return_direct: bool = False, verbose: bool = False, callbacks: Optional[Union[List[BaseCallbackHandler], BaseCallbackManager]] = None, callback_manager: Optional[BaseCallbackManager] = None, tags: Optional[List[str]] = None, metadata: Optional[Dict[str, Any]] = None, handle_tool_error: Optional[Union[bool, str, Callable[[ToolException], str]]] = False, api_resource: Resource = None)[source]¶ Bases: BaseTool Base class for Gmail tools. Create a new model by parsing and validating input data from keyword arguments. Raises ValidationError if the input data cannot be parsed to form a valid model. param api_resource: Resource [Optional]¶ param args_schema: Optional[Type[BaseModel]] = None¶ Pydantic model class to validate and parse the tool’s input arguments. param callback_manager: Optional[BaseCallbackManager] = None¶ Deprecated. Please use callbacks instead. param callbacks: Callbacks = None¶ Callbacks to be called during tool execution. param description: str [Required]¶ Used to tell the model how/when/why to use the tool. You can provide few-shot examples as a part of the description. param handle_tool_error: Optional[Union[bool, str, Callable[[ToolException], str]]] = False¶ Handle the content of the ToolException thrown. param metadata: Optional[Dict[str, Any]] = None¶ Optional metadata associated with the tool. Defaults to None This metadata will be associated with each call to this tool, and passed as arguments to the handlers defined in callbacks.
https://api.python.langchain.com/en/latest/tools/langchain.tools.gmail.base.GmailBaseTool.html
0ecfa8465af6-1
and passed as arguments to the handlers defined in callbacks. You can use these to eg identify a specific instance of a tool with its use case. param name: str [Required]¶ The unique name of the tool that clearly communicates its purpose. param return_direct: bool = False¶ Whether to return the tool’s output directly. Setting this to True means that after the tool is called, the AgentExecutor will stop looping. param tags: Optional[List[str]] = None¶ Optional list of tags associated with the tool. Defaults to None These tags will be associated with each call to this tool, and passed as arguments to the handlers defined in callbacks. You can use these to eg identify a specific instance of a tool with its use case. param verbose: bool = False¶ Whether to log the tool’s progress. __call__(tool_input: str, callbacks: Optional[Union[List[BaseCallbackHandler], BaseCallbackManager]] = None) → str¶ Make tool callable. async ainvoke(input: Union[str, Dict], config: Optional[RunnableConfig] = None, **kwargs: Any) → Any¶ async arun(tool_input: Union[str, Dict], verbose: Optional[bool] = None, start_color: Optional[str] = 'green', color: Optional[str] = 'green', callbacks: Optional[Union[List[BaseCallbackHandler], BaseCallbackManager]] = None, *, tags: Optional[List[str]] = None, metadata: Optional[Dict[str, Any]] = None, **kwargs: Any) → Any¶ Run the tool asynchronously. classmethod from_api_resource(api_resource: Resource) → GmailBaseTool[source]¶ Create a tool from an api resource. Parameters api_resource – The api resource to use. Returns A tool.
https://api.python.langchain.com/en/latest/tools/langchain.tools.gmail.base.GmailBaseTool.html
0ecfa8465af6-2
Parameters api_resource – The api resource to use. Returns A tool. invoke(input: Union[str, Dict], config: Optional[RunnableConfig] = None, **kwargs: Any) → Any¶ validator raise_deprecation  »  all fields¶ Raise deprecation warning if callback_manager is used. run(tool_input: Union[str, Dict], verbose: Optional[bool] = None, start_color: Optional[str] = 'green', color: Optional[str] = 'green', callbacks: Optional[Union[List[BaseCallbackHandler], BaseCallbackManager]] = None, *, tags: Optional[List[str]] = None, metadata: Optional[Dict[str, Any]] = None, **kwargs: Any) → Any¶ Run the tool. property args: dict¶ property is_single_input: bool¶ Whether the tool only accepts a single input. model Config¶ Bases: object Configuration for this pydantic object. arbitrary_types_allowed = True¶ extra = 'forbid'¶
https://api.python.langchain.com/en/latest/tools/langchain.tools.gmail.base.GmailBaseTool.html
2c6f28b86176-0
langchain.tools.amadeus.utils.authenticate¶ langchain.tools.amadeus.utils.authenticate() → Client[source]¶ Authenticate using the Amadeus API
https://api.python.langchain.com/en/latest/tools/langchain.tools.amadeus.utils.authenticate.html
b4635e6ca575-0
langchain.tools.brave_search.tool.BraveSearch¶ class langchain.tools.brave_search.tool.BraveSearch(*, name: str = 'brave_search', description: str = 'a search engine. useful for when you need to answer questions about current events. input should be a search query.', args_schema: Optional[Type[BaseModel]] = None, return_direct: bool = False, verbose: bool = False, callbacks: Optional[Union[List[BaseCallbackHandler], BaseCallbackManager]] = None, callback_manager: Optional[BaseCallbackManager] = None, tags: Optional[List[str]] = None, metadata: Optional[Dict[str, Any]] = None, handle_tool_error: Optional[Union[bool, str, Callable[[ToolException], str]]] = False, search_wrapper: BraveSearchWrapper)[source]¶ Bases: BaseTool Tool that queries the BraveSearch. Create a new model by parsing and validating input data from keyword arguments. Raises ValidationError if the input data cannot be parsed to form a valid model. param args_schema: Optional[Type[BaseModel]] = None¶ Pydantic model class to validate and parse the tool’s input arguments. param callback_manager: Optional[BaseCallbackManager] = None¶ Deprecated. Please use callbacks instead. param callbacks: Callbacks = None¶ Callbacks to be called during tool execution. param description: str = 'a search engine. useful for when you need to answer questions about current events. input should be a search query.'¶ Used to tell the model how/when/why to use the tool. You can provide few-shot examples as a part of the description. param handle_tool_error: Optional[Union[bool, str, Callable[[ToolException], str]]] = False¶ Handle the content of the ToolException thrown. param metadata: Optional[Dict[str, Any]] = None¶
https://api.python.langchain.com/en/latest/tools/langchain.tools.brave_search.tool.BraveSearch.html
b4635e6ca575-1
param metadata: Optional[Dict[str, Any]] = None¶ Optional metadata associated with the tool. Defaults to None This metadata will be associated with each call to this tool, and passed as arguments to the handlers defined in callbacks. You can use these to eg identify a specific instance of a tool with its use case. param name: str = 'brave_search'¶ The unique name of the tool that clearly communicates its purpose. param return_direct: bool = False¶ Whether to return the tool’s output directly. Setting this to True means that after the tool is called, the AgentExecutor will stop looping. param search_wrapper: BraveSearchWrapper [Required]¶ param tags: Optional[List[str]] = None¶ Optional list of tags associated with the tool. Defaults to None These tags will be associated with each call to this tool, and passed as arguments to the handlers defined in callbacks. You can use these to eg identify a specific instance of a tool with its use case. param verbose: bool = False¶ Whether to log the tool’s progress. __call__(tool_input: str, callbacks: Optional[Union[List[BaseCallbackHandler], BaseCallbackManager]] = None) → str¶ Make tool callable. async ainvoke(input: Union[str, Dict], config: Optional[RunnableConfig] = None, **kwargs: Any) → Any¶ async arun(tool_input: Union[str, Dict], verbose: Optional[bool] = None, start_color: Optional[str] = 'green', color: Optional[str] = 'green', callbacks: Optional[Union[List[BaseCallbackHandler], BaseCallbackManager]] = None, *, tags: Optional[List[str]] = None, metadata: Optional[Dict[str, Any]] = None, **kwargs: Any) → Any¶ Run the tool asynchronously.
https://api.python.langchain.com/en/latest/tools/langchain.tools.brave_search.tool.BraveSearch.html
b4635e6ca575-2
Run the tool asynchronously. classmethod from_api_key(api_key: str, search_kwargs: Optional[dict] = None, **kwargs: Any) → BraveSearch[source]¶ Create a tool from an api key. Parameters api_key – The api key to use. search_kwargs – Any additional kwargs to pass to the search wrapper. **kwargs – Any additional kwargs to pass to the tool. Returns A tool. invoke(input: Union[str, Dict], config: Optional[RunnableConfig] = None, **kwargs: Any) → Any¶ validator raise_deprecation  »  all fields¶ Raise deprecation warning if callback_manager is used. run(tool_input: Union[str, Dict], verbose: Optional[bool] = None, start_color: Optional[str] = 'green', color: Optional[str] = 'green', callbacks: Optional[Union[List[BaseCallbackHandler], BaseCallbackManager]] = None, *, tags: Optional[List[str]] = None, metadata: Optional[Dict[str, Any]] = None, **kwargs: Any) → Any¶ Run the tool. property args: dict¶ property is_single_input: bool¶ Whether the tool only accepts a single input. model Config¶ Bases: object Configuration for this pydantic object. arbitrary_types_allowed = True¶ extra = 'forbid'¶ Examples using BraveSearch¶ Brave Search
https://api.python.langchain.com/en/latest/tools/langchain.tools.brave_search.tool.BraveSearch.html
d89ef1f76d8c-0
langchain.tools.graphql.tool.BaseGraphQLTool¶ class langchain.tools.graphql.tool.BaseGraphQLTool(*, name: str = 'query_graphql', description: str = "    Input to this tool is a detailed and correct GraphQL query, output is a result from the API.\n    If the query is not correct, an error message will be returned.\n    If an error is returned with 'Bad request' in it, rewrite the query and try again.\n    If an error is returned with 'Unauthorized' in it, do not try again, but tell the user to change their authentication.\n\n    Example Input: query {{ allUsers {{ id, name, email }} }}    ", args_schema: Optional[Type[BaseModel]] = None, return_direct: bool = False, verbose: bool = False, callbacks: Optional[Union[List[BaseCallbackHandler], BaseCallbackManager]] = None, callback_manager: Optional[BaseCallbackManager] = None, tags: Optional[List[str]] = None, metadata: Optional[Dict[str, Any]] = None, handle_tool_error: Optional[Union[bool, str, Callable[[ToolException], str]]] = False, graphql_wrapper: GraphQLAPIWrapper)[source]¶ Bases: BaseTool Base tool for querying a GraphQL API. Create a new model by parsing and validating input data from keyword arguments. Raises ValidationError if the input data cannot be parsed to form a valid model. param args_schema: Optional[Type[BaseModel]] = None¶ Pydantic model class to validate and parse the tool’s input arguments. param callback_manager: Optional[BaseCallbackManager] = None¶ Deprecated. Please use callbacks instead. param callbacks: Callbacks = None¶ Callbacks to be called during tool execution.
https://api.python.langchain.com/en/latest/tools/langchain.tools.graphql.tool.BaseGraphQLTool.html
d89ef1f76d8c-1
param callbacks: Callbacks = None¶ Callbacks to be called during tool execution. param description: str = "    Input to this tool is a detailed and correct GraphQL query, output is a result from the API.\n    If the query is not correct, an error message will be returned.\n    If an error is returned with 'Bad request' in it, rewrite the query and try again.\n    If an error is returned with 'Unauthorized' in it, do not try again, but tell the user to change their authentication.\n\n    Example Input: query {{ allUsers {{ id, name, email }} }}    "¶ Used to tell the model how/when/why to use the tool. You can provide few-shot examples as a part of the description. param graphql_wrapper: langchain.utilities.graphql.GraphQLAPIWrapper [Required]¶ param handle_tool_error: Optional[Union[bool, str, Callable[[ToolException], str]]] = False¶ Handle the content of the ToolException thrown. param metadata: Optional[Dict[str, Any]] = None¶ Optional metadata associated with the tool. Defaults to None This metadata will be associated with each call to this tool, and passed as arguments to the handlers defined in callbacks. You can use these to eg identify a specific instance of a tool with its use case. param name: str = 'query_graphql'¶ The unique name of the tool that clearly communicates its purpose. param return_direct: bool = False¶ Whether to return the tool’s output directly. Setting this to True means that after the tool is called, the AgentExecutor will stop looping. param tags: Optional[List[str]] = None¶ Optional list of tags associated with the tool. Defaults to None These tags will be associated with each call to this tool, and passed as arguments to the handlers defined in callbacks.
https://api.python.langchain.com/en/latest/tools/langchain.tools.graphql.tool.BaseGraphQLTool.html
d89ef1f76d8c-2
and passed as arguments to the handlers defined in callbacks. You can use these to eg identify a specific instance of a tool with its use case. param verbose: bool = False¶ Whether to log the tool’s progress. __call__(tool_input: str, callbacks: Optional[Union[List[BaseCallbackHandler], BaseCallbackManager]] = None) → str¶ Make tool callable. async ainvoke(input: Union[str, Dict], config: Optional[RunnableConfig] = None, **kwargs: Any) → Any¶ async arun(tool_input: Union[str, Dict], verbose: Optional[bool] = None, start_color: Optional[str] = 'green', color: Optional[str] = 'green', callbacks: Optional[Union[List[BaseCallbackHandler], BaseCallbackManager]] = None, *, tags: Optional[List[str]] = None, metadata: Optional[Dict[str, Any]] = None, **kwargs: Any) → Any¶ Run the tool asynchronously. invoke(input: Union[str, Dict], config: Optional[RunnableConfig] = None, **kwargs: Any) → Any¶ validator raise_deprecation  »  all fields¶ Raise deprecation warning if callback_manager is used. run(tool_input: Union[str, Dict], verbose: Optional[bool] = None, start_color: Optional[str] = 'green', color: Optional[str] = 'green', callbacks: Optional[Union[List[BaseCallbackHandler], BaseCallbackManager]] = None, *, tags: Optional[List[str]] = None, metadata: Optional[Dict[str, Any]] = None, **kwargs: Any) → Any¶ Run the tool. property args: dict¶ property is_single_input: bool¶ Whether the tool only accepts a single input. model Config[source]¶ Bases: object Configuration for this pydantic object. arbitrary_types_allowed = True¶
https://api.python.langchain.com/en/latest/tools/langchain.tools.graphql.tool.BaseGraphQLTool.html
0cc78a45ff57-0
langchain.tools.sleep.tool.SleepTool¶ class langchain.tools.sleep.tool.SleepTool(*, name: str = 'sleep', description: str = 'Make agent sleep for a specified number of seconds.', args_schema: ~typing.Type[~pydantic.main.BaseModel] = <class 'langchain.tools.sleep.tool.SleepInput'>, return_direct: bool = False, verbose: bool = False, callbacks: ~typing.Optional[~typing.Union[~typing.List[~langchain.callbacks.base.BaseCallbackHandler], ~langchain.callbacks.base.BaseCallbackManager]] = None, callback_manager: ~typing.Optional[~langchain.callbacks.base.BaseCallbackManager] = None, tags: ~typing.Optional[~typing.List[str]] = None, metadata: ~typing.Optional[~typing.Dict[str, ~typing.Any]] = None, handle_tool_error: ~typing.Optional[~typing.Union[bool, str, ~typing.Callable[[~langchain.tools.base.ToolException], str]]] = False)[source]¶ Bases: BaseTool Tool that adds the capability to sleep. Create a new model by parsing and validating input data from keyword arguments. Raises ValidationError if the input data cannot be parsed to form a valid model. param args_schema: Type[pydantic.main.BaseModel] = <class 'langchain.tools.sleep.tool.SleepInput'>¶ Pydantic model class to validate and parse the tool’s input arguments. param callback_manager: Optional[BaseCallbackManager] = None¶ Deprecated. Please use callbacks instead. param callbacks: Callbacks = None¶ Callbacks to be called during tool execution. param description: str = 'Make agent sleep for a specified number of seconds.'¶ Used to tell the model how/when/why to use the tool. You can provide few-shot examples as a part of the description.
https://api.python.langchain.com/en/latest/tools/langchain.tools.sleep.tool.SleepTool.html
0cc78a45ff57-1
You can provide few-shot examples as a part of the description. param handle_tool_error: Optional[Union[bool, str, Callable[[ToolException], str]]] = False¶ Handle the content of the ToolException thrown. param metadata: Optional[Dict[str, Any]] = None¶ Optional metadata associated with the tool. Defaults to None This metadata will be associated with each call to this tool, and passed as arguments to the handlers defined in callbacks. You can use these to eg identify a specific instance of a tool with its use case. param name: str = 'sleep'¶ The unique name of the tool that clearly communicates its purpose. param return_direct: bool = False¶ Whether to return the tool’s output directly. Setting this to True means that after the tool is called, the AgentExecutor will stop looping. param tags: Optional[List[str]] = None¶ Optional list of tags associated with the tool. Defaults to None These tags will be associated with each call to this tool, and passed as arguments to the handlers defined in callbacks. You can use these to eg identify a specific instance of a tool with its use case. param verbose: bool = False¶ Whether to log the tool’s progress. __call__(tool_input: str, callbacks: Optional[Union[List[BaseCallbackHandler], BaseCallbackManager]] = None) → str¶ Make tool callable. async ainvoke(input: Union[str, Dict], config: Optional[RunnableConfig] = None, **kwargs: Any) → Any¶
https://api.python.langchain.com/en/latest/tools/langchain.tools.sleep.tool.SleepTool.html
0cc78a45ff57-2
async arun(tool_input: Union[str, Dict], verbose: Optional[bool] = None, start_color: Optional[str] = 'green', color: Optional[str] = 'green', callbacks: Optional[Union[List[BaseCallbackHandler], BaseCallbackManager]] = None, *, tags: Optional[List[str]] = None, metadata: Optional[Dict[str, Any]] = None, **kwargs: Any) → Any¶ Run the tool asynchronously. invoke(input: Union[str, Dict], config: Optional[RunnableConfig] = None, **kwargs: Any) → Any¶ validator raise_deprecation  »  all fields¶ Raise deprecation warning if callback_manager is used. run(tool_input: Union[str, Dict], verbose: Optional[bool] = None, start_color: Optional[str] = 'green', color: Optional[str] = 'green', callbacks: Optional[Union[List[BaseCallbackHandler], BaseCallbackManager]] = None, *, tags: Optional[List[str]] = None, metadata: Optional[Dict[str, Any]] = None, **kwargs: Any) → Any¶ Run the tool. property args: dict¶ property is_single_input: bool¶ Whether the tool only accepts a single input. model Config¶ Bases: object Configuration for this pydantic object. arbitrary_types_allowed = True¶ extra = 'forbid'¶
https://api.python.langchain.com/en/latest/tools/langchain.tools.sleep.tool.SleepTool.html
10ecc955bde7-0
langchain.tools.spark_sql.tool.BaseSparkSQLTool¶ class langchain.tools.spark_sql.tool.BaseSparkSQLTool(*, db: SparkSQL)[source]¶ Bases: BaseModel Base tool for interacting with Spark SQL. Create a new model by parsing and validating input data from keyword arguments. Raises ValidationError if the input data cannot be parsed to form a valid model. param db: langchain.utilities.spark_sql.SparkSQL [Required]¶ model Config[source]¶ Bases: Config Configuration for this pydantic object. arbitrary_types_allowed = True¶ extra = 'forbid'¶
https://api.python.langchain.com/en/latest/tools/langchain.tools.spark_sql.tool.BaseSparkSQLTool.html
0b100ec17f6f-0
langchain.tools.amadeus.closest_airport.AmadeusClosestAirport¶ class langchain.tools.amadeus.closest_airport.AmadeusClosestAirport(*, name: str = 'closest_airport', description: str = 'Use this tool to find the closest airport to a particular location.', args_schema: ~typing.Type[~langchain.tools.amadeus.closest_airport.ClosestAirportSchema] = <class 'langchain.tools.amadeus.closest_airport.ClosestAirportSchema'>, return_direct: bool = False, verbose: bool = False, callbacks: ~typing.Optional[~typing.Union[~typing.List[~langchain.callbacks.base.BaseCallbackHandler], ~langchain.callbacks.base.BaseCallbackManager]] = None, callback_manager: ~typing.Optional[~langchain.callbacks.base.BaseCallbackManager] = None, tags: ~typing.Optional[~typing.List[str]] = None, metadata: ~typing.Optional[~typing.Dict[str, ~typing.Any]] = None, handle_tool_error: ~typing.Optional[~typing.Union[bool, str, ~typing.Callable[[~langchain.tools.base.ToolException], str]]] = False, client: Client = None)[source]¶ Bases: AmadeusBaseTool Tool for finding the closest airport to a particular location. Create a new model by parsing and validating input data from keyword arguments. Raises ValidationError if the input data cannot be parsed to form a valid model. param args_schema: Type[langchain.tools.amadeus.closest_airport.ClosestAirportSchema] = <class 'langchain.tools.amadeus.closest_airport.ClosestAirportSchema'>¶ Pydantic model class to validate and parse the tool’s input arguments. param callback_manager: Optional[BaseCallbackManager] = None¶ Deprecated. Please use callbacks instead. param callbacks: Callbacks = None¶ Callbacks to be called during tool execution.
https://api.python.langchain.com/en/latest/tools/langchain.tools.amadeus.closest_airport.AmadeusClosestAirport.html
0b100ec17f6f-1
param callbacks: Callbacks = None¶ Callbacks to be called during tool execution. param client: Client [Optional]¶ param description: str = 'Use this tool to find the closest airport to a particular location.'¶ Used to tell the model how/when/why to use the tool. You can provide few-shot examples as a part of the description. param handle_tool_error: Optional[Union[bool, str, Callable[[ToolException], str]]] = False¶ Handle the content of the ToolException thrown. param metadata: Optional[Dict[str, Any]] = None¶ Optional metadata associated with the tool. Defaults to None This metadata will be associated with each call to this tool, and passed as arguments to the handlers defined in callbacks. You can use these to eg identify a specific instance of a tool with its use case. param name: str = 'closest_airport'¶ The unique name of the tool that clearly communicates its purpose. param return_direct: bool = False¶ Whether to return the tool’s output directly. Setting this to True means that after the tool is called, the AgentExecutor will stop looping. param tags: Optional[List[str]] = None¶ Optional list of tags associated with the tool. Defaults to None These tags will be associated with each call to this tool, and passed as arguments to the handlers defined in callbacks. You can use these to eg identify a specific instance of a tool with its use case. param verbose: bool = False¶ Whether to log the tool’s progress. __call__(tool_input: str, callbacks: Optional[Union[List[BaseCallbackHandler], BaseCallbackManager]] = None) → str¶ Make tool callable. async ainvoke(input: Union[str, Dict], config: Optional[RunnableConfig] = None, **kwargs: Any) → Any¶
https://api.python.langchain.com/en/latest/tools/langchain.tools.amadeus.closest_airport.AmadeusClosestAirport.html
0b100ec17f6f-2
async arun(tool_input: Union[str, Dict], verbose: Optional[bool] = None, start_color: Optional[str] = 'green', color: Optional[str] = 'green', callbacks: Optional[Union[List[BaseCallbackHandler], BaseCallbackManager]] = None, *, tags: Optional[List[str]] = None, metadata: Optional[Dict[str, Any]] = None, **kwargs: Any) → Any¶ Run the tool asynchronously. invoke(input: Union[str, Dict], config: Optional[RunnableConfig] = None, **kwargs: Any) → Any¶ validator raise_deprecation  »  all fields¶ Raise deprecation warning if callback_manager is used. run(tool_input: Union[str, Dict], verbose: Optional[bool] = None, start_color: Optional[str] = 'green', color: Optional[str] = 'green', callbacks: Optional[Union[List[BaseCallbackHandler], BaseCallbackManager]] = None, *, tags: Optional[List[str]] = None, metadata: Optional[Dict[str, Any]] = None, **kwargs: Any) → Any¶ Run the tool. property args: dict¶ property is_single_input: bool¶ Whether the tool only accepts a single input. model Config¶ Bases: object Configuration for this pydantic object. arbitrary_types_allowed = True¶ extra = 'forbid'¶
https://api.python.langchain.com/en/latest/tools/langchain.tools.amadeus.closest_airport.AmadeusClosestAirport.html
065f0cc01d61-0
langchain.tools.spark_sql.tool.ListSparkSQLTool¶ class langchain.tools.spark_sql.tool.ListSparkSQLTool(*, name: str = 'list_tables_sql_db', description: str = 'Input is an empty string, output is a comma separated list of tables in the Spark SQL.', args_schema: Optional[Type[BaseModel]] = None, return_direct: bool = False, verbose: bool = False, callbacks: Optional[Union[List[BaseCallbackHandler], BaseCallbackManager]] = None, callback_manager: Optional[BaseCallbackManager] = None, tags: Optional[List[str]] = None, metadata: Optional[Dict[str, Any]] = None, handle_tool_error: Optional[Union[bool, str, Callable[[ToolException], str]]] = False, db: SparkSQL)[source]¶ Bases: BaseSparkSQLTool, BaseTool Tool for getting tables names. Create a new model by parsing and validating input data from keyword arguments. Raises ValidationError if the input data cannot be parsed to form a valid model. param args_schema: Optional[Type[BaseModel]] = None¶ Pydantic model class to validate and parse the tool’s input arguments. param callback_manager: Optional[BaseCallbackManager] = None¶ Deprecated. Please use callbacks instead. param callbacks: Callbacks = None¶ Callbacks to be called during tool execution. param db: langchain.utilities.spark_sql.SparkSQL [Required]¶ param description: str = 'Input is an empty string, output is a comma separated list of tables in the Spark SQL.'¶ Used to tell the model how/when/why to use the tool. You can provide few-shot examples as a part of the description. param handle_tool_error: Optional[Union[bool, str, Callable[[ToolException], str]]] = False¶ Handle the content of the ToolException thrown.
https://api.python.langchain.com/en/latest/tools/langchain.tools.spark_sql.tool.ListSparkSQLTool.html
065f0cc01d61-1
Handle the content of the ToolException thrown. param metadata: Optional[Dict[str, Any]] = None¶ Optional metadata associated with the tool. Defaults to None This metadata will be associated with each call to this tool, and passed as arguments to the handlers defined in callbacks. You can use these to eg identify a specific instance of a tool with its use case. param name: str = 'list_tables_sql_db'¶ The unique name of the tool that clearly communicates its purpose. param return_direct: bool = False¶ Whether to return the tool’s output directly. Setting this to True means that after the tool is called, the AgentExecutor will stop looping. param tags: Optional[List[str]] = None¶ Optional list of tags associated with the tool. Defaults to None These tags will be associated with each call to this tool, and passed as arguments to the handlers defined in callbacks. You can use these to eg identify a specific instance of a tool with its use case. param verbose: bool = False¶ Whether to log the tool’s progress. __call__(tool_input: str, callbacks: Optional[Union[List[BaseCallbackHandler], BaseCallbackManager]] = None) → str¶ Make tool callable. async ainvoke(input: Union[str, Dict], config: Optional[RunnableConfig] = None, **kwargs: Any) → Any¶ async arun(tool_input: Union[str, Dict], verbose: Optional[bool] = None, start_color: Optional[str] = 'green', color: Optional[str] = 'green', callbacks: Optional[Union[List[BaseCallbackHandler], BaseCallbackManager]] = None, *, tags: Optional[List[str]] = None, metadata: Optional[Dict[str, Any]] = None, **kwargs: Any) → Any¶ Run the tool asynchronously.
https://api.python.langchain.com/en/latest/tools/langchain.tools.spark_sql.tool.ListSparkSQLTool.html
065f0cc01d61-2
Run the tool asynchronously. invoke(input: Union[str, Dict], config: Optional[RunnableConfig] = None, **kwargs: Any) → Any¶ validator raise_deprecation  »  all fields¶ Raise deprecation warning if callback_manager is used. run(tool_input: Union[str, Dict], verbose: Optional[bool] = None, start_color: Optional[str] = 'green', color: Optional[str] = 'green', callbacks: Optional[Union[List[BaseCallbackHandler], BaseCallbackManager]] = None, *, tags: Optional[List[str]] = None, metadata: Optional[Dict[str, Any]] = None, **kwargs: Any) → Any¶ Run the tool. property args: dict¶ property is_single_input: bool¶ Whether the tool only accepts a single input. model Config¶ Bases: Config Configuration for this pydantic object. arbitrary_types_allowed = True¶ extra = 'forbid'¶
https://api.python.langchain.com/en/latest/tools/langchain.tools.spark_sql.tool.ListSparkSQLTool.html
e0624e337fa0-0
langchain.tools.google_search.tool.GoogleSearchRun¶ class langchain.tools.google_search.tool.GoogleSearchRun(*, name: str = 'google_search', description: str = 'A wrapper around Google Search. Useful for when you need to answer questions about current events. Input should be a search query.', args_schema: Optional[Type[BaseModel]] = None, return_direct: bool = False, verbose: bool = False, callbacks: Optional[Union[List[BaseCallbackHandler], BaseCallbackManager]] = None, callback_manager: Optional[BaseCallbackManager] = None, tags: Optional[List[str]] = None, metadata: Optional[Dict[str, Any]] = None, handle_tool_error: Optional[Union[bool, str, Callable[[ToolException], str]]] = False, api_wrapper: GoogleSearchAPIWrapper)[source]¶ Bases: BaseTool Tool that queries the Google search API. Create a new model by parsing and validating input data from keyword arguments. Raises ValidationError if the input data cannot be parsed to form a valid model. param api_wrapper: langchain.utilities.google_search.GoogleSearchAPIWrapper [Required]¶ param args_schema: Optional[Type[BaseModel]] = None¶ Pydantic model class to validate and parse the tool’s input arguments. param callback_manager: Optional[BaseCallbackManager] = None¶ Deprecated. Please use callbacks instead. param callbacks: Callbacks = None¶ Callbacks to be called during tool execution. param description: str = 'A wrapper around Google Search. Useful for when you need to answer questions about current events. Input should be a search query.'¶ Used to tell the model how/when/why to use the tool. You can provide few-shot examples as a part of the description. param handle_tool_error: Optional[Union[bool, str, Callable[[ToolException], str]]] = False¶
https://api.python.langchain.com/en/latest/tools/langchain.tools.google_search.tool.GoogleSearchRun.html
e0624e337fa0-1
Handle the content of the ToolException thrown. param metadata: Optional[Dict[str, Any]] = None¶ Optional metadata associated with the tool. Defaults to None This metadata will be associated with each call to this tool, and passed as arguments to the handlers defined in callbacks. You can use these to eg identify a specific instance of a tool with its use case. param name: str = 'google_search'¶ The unique name of the tool that clearly communicates its purpose. param return_direct: bool = False¶ Whether to return the tool’s output directly. Setting this to True means that after the tool is called, the AgentExecutor will stop looping. param tags: Optional[List[str]] = None¶ Optional list of tags associated with the tool. Defaults to None These tags will be associated with each call to this tool, and passed as arguments to the handlers defined in callbacks. You can use these to eg identify a specific instance of a tool with its use case. param verbose: bool = False¶ Whether to log the tool’s progress. __call__(tool_input: str, callbacks: Optional[Union[List[BaseCallbackHandler], BaseCallbackManager]] = None) → str¶ Make tool callable. async ainvoke(input: Union[str, Dict], config: Optional[RunnableConfig] = None, **kwargs: Any) → Any¶ async arun(tool_input: Union[str, Dict], verbose: Optional[bool] = None, start_color: Optional[str] = 'green', color: Optional[str] = 'green', callbacks: Optional[Union[List[BaseCallbackHandler], BaseCallbackManager]] = None, *, tags: Optional[List[str]] = None, metadata: Optional[Dict[str, Any]] = None, **kwargs: Any) → Any¶ Run the tool asynchronously.
https://api.python.langchain.com/en/latest/tools/langchain.tools.google_search.tool.GoogleSearchRun.html
e0624e337fa0-2
Run the tool asynchronously. invoke(input: Union[str, Dict], config: Optional[RunnableConfig] = None, **kwargs: Any) → Any¶ validator raise_deprecation  »  all fields¶ Raise deprecation warning if callback_manager is used. run(tool_input: Union[str, Dict], verbose: Optional[bool] = None, start_color: Optional[str] = 'green', color: Optional[str] = 'green', callbacks: Optional[Union[List[BaseCallbackHandler], BaseCallbackManager]] = None, *, tags: Optional[List[str]] = None, metadata: Optional[Dict[str, Any]] = None, **kwargs: Any) → Any¶ Run the tool. property args: dict¶ property is_single_input: bool¶ Whether the tool only accepts a single input. model Config¶ Bases: object Configuration for this pydantic object. arbitrary_types_allowed = True¶ extra = 'forbid'¶
https://api.python.langchain.com/en/latest/tools/langchain.tools.google_search.tool.GoogleSearchRun.html
fb0934f3b00e-0
langchain.tools.playwright.extract_hyperlinks.ExtractHyperlinksToolInput¶ class langchain.tools.playwright.extract_hyperlinks.ExtractHyperlinksToolInput(*, absolute_urls: bool = False)[source]¶ Bases: BaseModel Input for ExtractHyperlinksTool. Create a new model by parsing and validating input data from keyword arguments. Raises ValidationError if the input data cannot be parsed to form a valid model. param absolute_urls: bool = False¶ Return absolute URLs instead of relative URLs
https://api.python.langchain.com/en/latest/tools/langchain.tools.playwright.extract_hyperlinks.ExtractHyperlinksToolInput.html
1f06912b81d0-0
langchain.tools.base.create_schema_from_function¶ langchain.tools.base.create_schema_from_function(model_name: str, func: Callable) → Type[BaseModel][source]¶ Create a pydantic schema from a function’s signature. :param model_name: Name to assign to the generated pydandic schema :param func: Function to generate the schema from Returns A pydantic model with the same arguments as the function
https://api.python.langchain.com/en/latest/tools/langchain.tools.base.create_schema_from_function.html
953f4e4cefef-0
langchain.tools.playwright.navigate_back.NavigateBackTool¶ class langchain.tools.playwright.navigate_back.NavigateBackTool(*, name: str = 'previous_webpage', description: str = 'Navigate back to the previous page in the browser history', args_schema: ~typing.Type[~pydantic.main.BaseModel] = <class 'pydantic.main.BaseModel'>, return_direct: bool = False, verbose: bool = False, callbacks: ~typing.Optional[~typing.Union[~typing.List[~langchain.callbacks.base.BaseCallbackHandler], ~langchain.callbacks.base.BaseCallbackManager]] = None, callback_manager: ~typing.Optional[~langchain.callbacks.base.BaseCallbackManager] = None, tags: ~typing.Optional[~typing.List[str]] = None, metadata: ~typing.Optional[~typing.Dict[str, ~typing.Any]] = None, handle_tool_error: ~typing.Optional[~typing.Union[bool, str, ~typing.Callable[[~langchain.tools.base.ToolException], str]]] = False, sync_browser: Optional['SyncBrowser'] = None, async_browser: Optional['AsyncBrowser'] = None)[source]¶ Bases: BaseBrowserTool Navigate back to the previous page in the browser history. Create a new model by parsing and validating input data from keyword arguments. Raises ValidationError if the input data cannot be parsed to form a valid model. param args_schema: Type[BaseModel] = <class 'pydantic.main.BaseModel'>¶ Pydantic model class to validate and parse the tool’s input arguments. param async_browser: Optional['AsyncBrowser'] = None¶ param callback_manager: Optional[BaseCallbackManager] = None¶ Deprecated. Please use callbacks instead. param callbacks: Callbacks = None¶ Callbacks to be called during tool execution. param description: str = 'Navigate back to the previous page in the browser history'¶
https://api.python.langchain.com/en/latest/tools/langchain.tools.playwright.navigate_back.NavigateBackTool.html
953f4e4cefef-1
param description: str = 'Navigate back to the previous page in the browser history'¶ Used to tell the model how/when/why to use the tool. You can provide few-shot examples as a part of the description. param handle_tool_error: Optional[Union[bool, str, Callable[[ToolException], str]]] = False¶ Handle the content of the ToolException thrown. param metadata: Optional[Dict[str, Any]] = None¶ Optional metadata associated with the tool. Defaults to None This metadata will be associated with each call to this tool, and passed as arguments to the handlers defined in callbacks. You can use these to eg identify a specific instance of a tool with its use case. param name: str = 'previous_webpage'¶ The unique name of the tool that clearly communicates its purpose. param return_direct: bool = False¶ Whether to return the tool’s output directly. Setting this to True means that after the tool is called, the AgentExecutor will stop looping. param sync_browser: Optional['SyncBrowser'] = None¶ param tags: Optional[List[str]] = None¶ Optional list of tags associated with the tool. Defaults to None These tags will be associated with each call to this tool, and passed as arguments to the handlers defined in callbacks. You can use these to eg identify a specific instance of a tool with its use case. param verbose: bool = False¶ Whether to log the tool’s progress. __call__(tool_input: str, callbacks: Optional[Union[List[BaseCallbackHandler], BaseCallbackManager]] = None) → str¶ Make tool callable. async ainvoke(input: Union[str, Dict], config: Optional[RunnableConfig] = None, **kwargs: Any) → Any¶
https://api.python.langchain.com/en/latest/tools/langchain.tools.playwright.navigate_back.NavigateBackTool.html
953f4e4cefef-2
async arun(tool_input: Union[str, Dict], verbose: Optional[bool] = None, start_color: Optional[str] = 'green', color: Optional[str] = 'green', callbacks: Optional[Union[List[BaseCallbackHandler], BaseCallbackManager]] = None, *, tags: Optional[List[str]] = None, metadata: Optional[Dict[str, Any]] = None, **kwargs: Any) → Any¶ Run the tool asynchronously. classmethod from_browser(sync_browser: Optional[SyncBrowser] = None, async_browser: Optional[AsyncBrowser] = None) → BaseBrowserTool¶ Instantiate the tool. invoke(input: Union[str, Dict], config: Optional[RunnableConfig] = None, **kwargs: Any) → Any¶ validator raise_deprecation  »  all fields¶ Raise deprecation warning if callback_manager is used. run(tool_input: Union[str, Dict], verbose: Optional[bool] = None, start_color: Optional[str] = 'green', color: Optional[str] = 'green', callbacks: Optional[Union[List[BaseCallbackHandler], BaseCallbackManager]] = None, *, tags: Optional[List[str]] = None, metadata: Optional[Dict[str, Any]] = None, **kwargs: Any) → Any¶ Run the tool. validator validate_browser_provided  »  all fields¶ Check that the arguments are valid. property args: dict¶ property is_single_input: bool¶ Whether the tool only accepts a single input. model Config¶ Bases: object Configuration for this pydantic object. arbitrary_types_allowed = True¶ extra = 'forbid'¶
https://api.python.langchain.com/en/latest/tools/langchain.tools.playwright.navigate_back.NavigateBackTool.html
827ab49feafd-0
langchain.tools.gmail.utils.get_gmail_credentials¶ langchain.tools.gmail.utils.get_gmail_credentials(token_file: Optional[str] = None, client_secrets_file: Optional[str] = None, scopes: Optional[List[str]] = None) → Credentials[source]¶ Get credentials. Examples using get_gmail_credentials¶ Gmail Toolkit
https://api.python.langchain.com/en/latest/tools/langchain.tools.gmail.utils.get_gmail_credentials.html
85a5e76a8de6-0
langchain.tools.bing_search.tool.BingSearchRun¶ class langchain.tools.bing_search.tool.BingSearchRun(*, name: str = 'bing_search', description: str = 'A wrapper around Bing Search. Useful for when you need to answer questions about current events. Input should be a search query.', args_schema: Optional[Type[BaseModel]] = None, return_direct: bool = False, verbose: bool = False, callbacks: Optional[Union[List[BaseCallbackHandler], BaseCallbackManager]] = None, callback_manager: Optional[BaseCallbackManager] = None, tags: Optional[List[str]] = None, metadata: Optional[Dict[str, Any]] = None, handle_tool_error: Optional[Union[bool, str, Callable[[ToolException], str]]] = False, api_wrapper: BingSearchAPIWrapper)[source]¶ Bases: BaseTool Tool that queries the Bing search API. Create a new model by parsing and validating input data from keyword arguments. Raises ValidationError if the input data cannot be parsed to form a valid model. param api_wrapper: langchain.utilities.bing_search.BingSearchAPIWrapper [Required]¶ param args_schema: Optional[Type[BaseModel]] = None¶ Pydantic model class to validate and parse the tool’s input arguments. param callback_manager: Optional[BaseCallbackManager] = None¶ Deprecated. Please use callbacks instead. param callbacks: Callbacks = None¶ Callbacks to be called during tool execution. param description: str = 'A wrapper around Bing Search. Useful for when you need to answer questions about current events. Input should be a search query.'¶ Used to tell the model how/when/why to use the tool. You can provide few-shot examples as a part of the description.
https://api.python.langchain.com/en/latest/tools/langchain.tools.bing_search.tool.BingSearchRun.html
85a5e76a8de6-1
You can provide few-shot examples as a part of the description. param handle_tool_error: Optional[Union[bool, str, Callable[[ToolException], str]]] = False¶ Handle the content of the ToolException thrown. param metadata: Optional[Dict[str, Any]] = None¶ Optional metadata associated with the tool. Defaults to None This metadata will be associated with each call to this tool, and passed as arguments to the handlers defined in callbacks. You can use these to eg identify a specific instance of a tool with its use case. param name: str = 'bing_search'¶ The unique name of the tool that clearly communicates its purpose. param return_direct: bool = False¶ Whether to return the tool’s output directly. Setting this to True means that after the tool is called, the AgentExecutor will stop looping. param tags: Optional[List[str]] = None¶ Optional list of tags associated with the tool. Defaults to None These tags will be associated with each call to this tool, and passed as arguments to the handlers defined in callbacks. You can use these to eg identify a specific instance of a tool with its use case. param verbose: bool = False¶ Whether to log the tool’s progress. __call__(tool_input: str, callbacks: Optional[Union[List[BaseCallbackHandler], BaseCallbackManager]] = None) → str¶ Make tool callable. async ainvoke(input: Union[str, Dict], config: Optional[RunnableConfig] = None, **kwargs: Any) → Any¶
https://api.python.langchain.com/en/latest/tools/langchain.tools.bing_search.tool.BingSearchRun.html
85a5e76a8de6-2
async arun(tool_input: Union[str, Dict], verbose: Optional[bool] = None, start_color: Optional[str] = 'green', color: Optional[str] = 'green', callbacks: Optional[Union[List[BaseCallbackHandler], BaseCallbackManager]] = None, *, tags: Optional[List[str]] = None, metadata: Optional[Dict[str, Any]] = None, **kwargs: Any) → Any¶ Run the tool asynchronously. invoke(input: Union[str, Dict], config: Optional[RunnableConfig] = None, **kwargs: Any) → Any¶ validator raise_deprecation  »  all fields¶ Raise deprecation warning if callback_manager is used. run(tool_input: Union[str, Dict], verbose: Optional[bool] = None, start_color: Optional[str] = 'green', color: Optional[str] = 'green', callbacks: Optional[Union[List[BaseCallbackHandler], BaseCallbackManager]] = None, *, tags: Optional[List[str]] = None, metadata: Optional[Dict[str, Any]] = None, **kwargs: Any) → Any¶ Run the tool. property args: dict¶ property is_single_input: bool¶ Whether the tool only accepts a single input. model Config¶ Bases: object Configuration for this pydantic object. arbitrary_types_allowed = True¶ extra = 'forbid'¶
https://api.python.langchain.com/en/latest/tools/langchain.tools.bing_search.tool.BingSearchRun.html
92fb92e738d3-0
langchain.tools.requests.tool.RequestsPutTool¶ class langchain.tools.requests.tool.RequestsPutTool(*, name: str = 'requests_put', description: str = 'Use this when you want to PUT to a website.\n    Input should be a json string with two keys: "url" and "data".\n    The value of "url" should be a string, and the value of "data" should be a dictionary of \n    key-value pairs you want to PUT to the url.\n    Be careful to always use double quotes for strings in the json string.\n    The output will be the text response of the PUT request.\n    ', args_schema: Optional[Type[BaseModel]] = None, return_direct: bool = False, verbose: bool = False, callbacks: Optional[Union[List[BaseCallbackHandler], BaseCallbackManager]] = None, callback_manager: Optional[BaseCallbackManager] = None, tags: Optional[List[str]] = None, metadata: Optional[Dict[str, Any]] = None, handle_tool_error: Optional[Union[bool, str, Callable[[ToolException], str]]] = False, requests_wrapper: TextRequestsWrapper)[source]¶ Bases: BaseRequestsTool, BaseTool Tool for making a PUT request to an API endpoint. Create a new model by parsing and validating input data from keyword arguments. Raises ValidationError if the input data cannot be parsed to form a valid model. param args_schema: Optional[Type[BaseModel]] = None¶ Pydantic model class to validate and parse the tool’s input arguments. param callback_manager: Optional[BaseCallbackManager] = None¶ Deprecated. Please use callbacks instead. param callbacks: Callbacks = None¶ Callbacks to be called during tool execution.
https://api.python.langchain.com/en/latest/tools/langchain.tools.requests.tool.RequestsPutTool.html
92fb92e738d3-1
param callbacks: Callbacks = None¶ Callbacks to be called during tool execution. param description: str = 'Use this when you want to PUT to a website.\n    Input should be a json string with two keys: "url" and "data".\n    The value of "url" should be a string, and the value of "data" should be a dictionary of \n    key-value pairs you want to PUT to the url.\n    Be careful to always use double quotes for strings in the json string.\n    The output will be the text response of the PUT request.\n    '¶ Used to tell the model how/when/why to use the tool. You can provide few-shot examples as a part of the description. param handle_tool_error: Optional[Union[bool, str, Callable[[ToolException], str]]] = False¶ Handle the content of the ToolException thrown. param metadata: Optional[Dict[str, Any]] = None¶ Optional metadata associated with the tool. Defaults to None This metadata will be associated with each call to this tool, and passed as arguments to the handlers defined in callbacks. You can use these to eg identify a specific instance of a tool with its use case. param name: str = 'requests_put'¶ The unique name of the tool that clearly communicates its purpose. param requests_wrapper: langchain.utilities.requests.TextRequestsWrapper [Required]¶ param return_direct: bool = False¶ Whether to return the tool’s output directly. Setting this to True means that after the tool is called, the AgentExecutor will stop looping. param tags: Optional[List[str]] = None¶ Optional list of tags associated with the tool. Defaults to None These tags will be associated with each call to this tool, and passed as arguments to the handlers defined in callbacks.
https://api.python.langchain.com/en/latest/tools/langchain.tools.requests.tool.RequestsPutTool.html
92fb92e738d3-2
and passed as arguments to the handlers defined in callbacks. You can use these to eg identify a specific instance of a tool with its use case. param verbose: bool = False¶ Whether to log the tool’s progress. __call__(tool_input: str, callbacks: Optional[Union[List[BaseCallbackHandler], BaseCallbackManager]] = None) → str¶ Make tool callable. async ainvoke(input: Union[str, Dict], config: Optional[RunnableConfig] = None, **kwargs: Any) → Any¶ async arun(tool_input: Union[str, Dict], verbose: Optional[bool] = None, start_color: Optional[str] = 'green', color: Optional[str] = 'green', callbacks: Optional[Union[List[BaseCallbackHandler], BaseCallbackManager]] = None, *, tags: Optional[List[str]] = None, metadata: Optional[Dict[str, Any]] = None, **kwargs: Any) → Any¶ Run the tool asynchronously. invoke(input: Union[str, Dict], config: Optional[RunnableConfig] = None, **kwargs: Any) → Any¶ validator raise_deprecation  »  all fields¶ Raise deprecation warning if callback_manager is used. run(tool_input: Union[str, Dict], verbose: Optional[bool] = None, start_color: Optional[str] = 'green', color: Optional[str] = 'green', callbacks: Optional[Union[List[BaseCallbackHandler], BaseCallbackManager]] = None, *, tags: Optional[List[str]] = None, metadata: Optional[Dict[str, Any]] = None, **kwargs: Any) → Any¶ Run the tool. property args: dict¶ property is_single_input: bool¶ Whether the tool only accepts a single input. model Config¶ Bases: object Configuration for this pydantic object. arbitrary_types_allowed = True¶
https://api.python.langchain.com/en/latest/tools/langchain.tools.requests.tool.RequestsPutTool.html
92fb92e738d3-3
Configuration for this pydantic object. arbitrary_types_allowed = True¶ extra = 'forbid'¶
https://api.python.langchain.com/en/latest/tools/langchain.tools.requests.tool.RequestsPutTool.html
b4695776559b-0
langchain.tools.scenexplain.tool.SceneXplainInput¶ class langchain.tools.scenexplain.tool.SceneXplainInput(*, query: str)[source]¶ Bases: BaseModel Input for SceneXplain. Create a new model by parsing and validating input data from keyword arguments. Raises ValidationError if the input data cannot be parsed to form a valid model. param query: str [Required]¶ The link to the image to explain
https://api.python.langchain.com/en/latest/tools/langchain.tools.scenexplain.tool.SceneXplainInput.html
8d13f8ec84c8-0
langchain.tools.bing_search.tool.BingSearchResults¶ class langchain.tools.bing_search.tool.BingSearchResults(*, name: str = 'Bing Search Results JSON', description: str = 'A wrapper around Bing Search. Useful for when you need to answer questions about current events. Input should be a search query. Output is a JSON array of the query results', args_schema: Optional[Type[BaseModel]] = None, return_direct: bool = False, verbose: bool = False, callbacks: Optional[Union[List[BaseCallbackHandler], BaseCallbackManager]] = None, callback_manager: Optional[BaseCallbackManager] = None, tags: Optional[List[str]] = None, metadata: Optional[Dict[str, Any]] = None, handle_tool_error: Optional[Union[bool, str, Callable[[ToolException], str]]] = False, num_results: int = 4, api_wrapper: BingSearchAPIWrapper)[source]¶ Bases: BaseTool Tool that queries the Bing Search API and gets back json. Create a new model by parsing and validating input data from keyword arguments. Raises ValidationError if the input data cannot be parsed to form a valid model. param api_wrapper: langchain.utilities.bing_search.BingSearchAPIWrapper [Required]¶ param args_schema: Optional[Type[BaseModel]] = None¶ Pydantic model class to validate and parse the tool’s input arguments. param callback_manager: Optional[BaseCallbackManager] = None¶ Deprecated. Please use callbacks instead. param callbacks: Callbacks = None¶ Callbacks to be called during tool execution. param description: str = 'A wrapper around Bing Search. Useful for when you need to answer questions about current events. Input should be a search query. Output is a JSON array of the query results'¶ Used to tell the model how/when/why to use the tool.
https://api.python.langchain.com/en/latest/tools/langchain.tools.bing_search.tool.BingSearchResults.html
8d13f8ec84c8-1
Used to tell the model how/when/why to use the tool. You can provide few-shot examples as a part of the description. param handle_tool_error: Optional[Union[bool, str, Callable[[ToolException], str]]] = False¶ Handle the content of the ToolException thrown. param metadata: Optional[Dict[str, Any]] = None¶ Optional metadata associated with the tool. Defaults to None This metadata will be associated with each call to this tool, and passed as arguments to the handlers defined in callbacks. You can use these to eg identify a specific instance of a tool with its use case. param name: str = 'Bing Search Results JSON'¶ The unique name of the tool that clearly communicates its purpose. param num_results: int = 4¶ param return_direct: bool = False¶ Whether to return the tool’s output directly. Setting this to True means that after the tool is called, the AgentExecutor will stop looping. param tags: Optional[List[str]] = None¶ Optional list of tags associated with the tool. Defaults to None These tags will be associated with each call to this tool, and passed as arguments to the handlers defined in callbacks. You can use these to eg identify a specific instance of a tool with its use case. param verbose: bool = False¶ Whether to log the tool’s progress. __call__(tool_input: str, callbacks: Optional[Union[List[BaseCallbackHandler], BaseCallbackManager]] = None) → str¶ Make tool callable. async ainvoke(input: Union[str, Dict], config: Optional[RunnableConfig] = None, **kwargs: Any) → Any¶
https://api.python.langchain.com/en/latest/tools/langchain.tools.bing_search.tool.BingSearchResults.html
8d13f8ec84c8-2
async arun(tool_input: Union[str, Dict], verbose: Optional[bool] = None, start_color: Optional[str] = 'green', color: Optional[str] = 'green', callbacks: Optional[Union[List[BaseCallbackHandler], BaseCallbackManager]] = None, *, tags: Optional[List[str]] = None, metadata: Optional[Dict[str, Any]] = None, **kwargs: Any) → Any¶ Run the tool asynchronously. invoke(input: Union[str, Dict], config: Optional[RunnableConfig] = None, **kwargs: Any) → Any¶ validator raise_deprecation  »  all fields¶ Raise deprecation warning if callback_manager is used. run(tool_input: Union[str, Dict], verbose: Optional[bool] = None, start_color: Optional[str] = 'green', color: Optional[str] = 'green', callbacks: Optional[Union[List[BaseCallbackHandler], BaseCallbackManager]] = None, *, tags: Optional[List[str]] = None, metadata: Optional[Dict[str, Any]] = None, **kwargs: Any) → Any¶ Run the tool. property args: dict¶ property is_single_input: bool¶ Whether the tool only accepts a single input. model Config¶ Bases: object Configuration for this pydantic object. arbitrary_types_allowed = True¶ extra = 'forbid'¶
https://api.python.langchain.com/en/latest/tools/langchain.tools.bing_search.tool.BingSearchResults.html
f9879aed652b-0
langchain.tools.file_management.delete.DeleteFileTool¶ class langchain.tools.file_management.delete.DeleteFileTool(*, name: str = 'file_delete', description: str = 'Delete a file', args_schema: ~typing.Type[~pydantic.main.BaseModel] = <class 'langchain.tools.file_management.delete.FileDeleteInput'>, return_direct: bool = False, verbose: bool = False, callbacks: ~typing.Optional[~typing.Union[~typing.List[~langchain.callbacks.base.BaseCallbackHandler], ~langchain.callbacks.base.BaseCallbackManager]] = None, callback_manager: ~typing.Optional[~langchain.callbacks.base.BaseCallbackManager] = None, tags: ~typing.Optional[~typing.List[str]] = None, metadata: ~typing.Optional[~typing.Dict[str, ~typing.Any]] = None, handle_tool_error: ~typing.Optional[~typing.Union[bool, str, ~typing.Callable[[~langchain.tools.base.ToolException], str]]] = False, root_dir: ~typing.Optional[str] = None)[source]¶ Bases: BaseFileToolMixin, BaseTool Tool that deletes a file. Create a new model by parsing and validating input data from keyword arguments. Raises ValidationError if the input data cannot be parsed to form a valid model. param args_schema: Type[pydantic.main.BaseModel] = <class 'langchain.tools.file_management.delete.FileDeleteInput'>¶ Pydantic model class to validate and parse the tool’s input arguments. param callback_manager: Optional[BaseCallbackManager] = None¶ Deprecated. Please use callbacks instead. param callbacks: Callbacks = None¶ Callbacks to be called during tool execution. param description: str = 'Delete a file'¶ Used to tell the model how/when/why to use the tool. You can provide few-shot examples as a part of the description.
https://api.python.langchain.com/en/latest/tools/langchain.tools.file_management.delete.DeleteFileTool.html
f9879aed652b-1
You can provide few-shot examples as a part of the description. param handle_tool_error: Optional[Union[bool, str, Callable[[ToolException], str]]] = False¶ Handle the content of the ToolException thrown. param metadata: Optional[Dict[str, Any]] = None¶ Optional metadata associated with the tool. Defaults to None This metadata will be associated with each call to this tool, and passed as arguments to the handlers defined in callbacks. You can use these to eg identify a specific instance of a tool with its use case. param name: str = 'file_delete'¶ The unique name of the tool that clearly communicates its purpose. param return_direct: bool = False¶ Whether to return the tool’s output directly. Setting this to True means that after the tool is called, the AgentExecutor will stop looping. param root_dir: Optional[str] = None¶ The final path will be chosen relative to root_dir if specified. param tags: Optional[List[str]] = None¶ Optional list of tags associated with the tool. Defaults to None These tags will be associated with each call to this tool, and passed as arguments to the handlers defined in callbacks. You can use these to eg identify a specific instance of a tool with its use case. param verbose: bool = False¶ Whether to log the tool’s progress. __call__(tool_input: str, callbacks: Optional[Union[List[BaseCallbackHandler], BaseCallbackManager]] = None) → str¶ Make tool callable. async ainvoke(input: Union[str, Dict], config: Optional[RunnableConfig] = None, **kwargs: Any) → Any¶
https://api.python.langchain.com/en/latest/tools/langchain.tools.file_management.delete.DeleteFileTool.html
f9879aed652b-2
async arun(tool_input: Union[str, Dict], verbose: Optional[bool] = None, start_color: Optional[str] = 'green', color: Optional[str] = 'green', callbacks: Optional[Union[List[BaseCallbackHandler], BaseCallbackManager]] = None, *, tags: Optional[List[str]] = None, metadata: Optional[Dict[str, Any]] = None, **kwargs: Any) → Any¶ Run the tool asynchronously. get_relative_path(file_path: str) → Path¶ Get the relative path, returning an error if unsupported. invoke(input: Union[str, Dict], config: Optional[RunnableConfig] = None, **kwargs: Any) → Any¶ validator raise_deprecation  »  all fields¶ Raise deprecation warning if callback_manager is used. run(tool_input: Union[str, Dict], verbose: Optional[bool] = None, start_color: Optional[str] = 'green', color: Optional[str] = 'green', callbacks: Optional[Union[List[BaseCallbackHandler], BaseCallbackManager]] = None, *, tags: Optional[List[str]] = None, metadata: Optional[Dict[str, Any]] = None, **kwargs: Any) → Any¶ Run the tool. property args: dict¶ property is_single_input: bool¶ Whether the tool only accepts a single input. model Config¶ Bases: object Configuration for this pydantic object. arbitrary_types_allowed = True¶ extra = 'forbid'¶ Examples using DeleteFileTool¶ File System Tools
https://api.python.langchain.com/en/latest/tools/langchain.tools.file_management.delete.DeleteFileTool.html
458bdeacdb4d-0
langchain.tools.azure_cognitive_services.speech2text.AzureCogsSpeech2TextTool¶ class langchain.tools.azure_cognitive_services.speech2text.AzureCogsSpeech2TextTool(*, name: str = 'azure_cognitive_services_speech2text', description: str = 'A wrapper around Azure Cognitive Services Speech2Text. Useful for when you need to transcribe audio to text. Input should be a url to an audio file.', args_schema: Optional[Type[BaseModel]] = None, return_direct: bool = False, verbose: bool = False, callbacks: Optional[Union[List[BaseCallbackHandler], BaseCallbackManager]] = None, callback_manager: Optional[BaseCallbackManager] = None, tags: Optional[List[str]] = None, metadata: Optional[Dict[str, Any]] = None, handle_tool_error: Optional[Union[bool, str, Callable[[ToolException], str]]] = False, azure_cogs_key: str = '', azure_cogs_region: str = '', speech_language: str = 'en-US', speech_config: Any = None)[source]¶ Bases: BaseTool Tool that queries the Azure Cognitive Services Speech2Text API. In order to set this up, follow instructions at: https://learn.microsoft.com/en-us/azure/cognitive-services/speech-service/get-started-speech-to-text?pivots=programming-language-python Create a new model by parsing and validating input data from keyword arguments. Raises ValidationError if the input data cannot be parsed to form a valid model. param args_schema: Optional[Type[BaseModel]] = None¶ Pydantic model class to validate and parse the tool’s input arguments. param callback_manager: Optional[BaseCallbackManager] = None¶ Deprecated. Please use callbacks instead. param callbacks: Callbacks = None¶ Callbacks to be called during tool execution.
https://api.python.langchain.com/en/latest/tools/langchain.tools.azure_cognitive_services.speech2text.AzureCogsSpeech2TextTool.html
458bdeacdb4d-1
param callbacks: Callbacks = None¶ Callbacks to be called during tool execution. param description: str = 'A wrapper around Azure Cognitive Services Speech2Text. Useful for when you need to transcribe audio to text. Input should be a url to an audio file.'¶ Used to tell the model how/when/why to use the tool. You can provide few-shot examples as a part of the description. param handle_tool_error: Optional[Union[bool, str, Callable[[ToolException], str]]] = False¶ Handle the content of the ToolException thrown. param metadata: Optional[Dict[str, Any]] = None¶ Optional metadata associated with the tool. Defaults to None This metadata will be associated with each call to this tool, and passed as arguments to the handlers defined in callbacks. You can use these to eg identify a specific instance of a tool with its use case. param name: str = 'azure_cognitive_services_speech2text'¶ The unique name of the tool that clearly communicates its purpose. param return_direct: bool = False¶ Whether to return the tool’s output directly. Setting this to True means that after the tool is called, the AgentExecutor will stop looping. param tags: Optional[List[str]] = None¶ Optional list of tags associated with the tool. Defaults to None These tags will be associated with each call to this tool, and passed as arguments to the handlers defined in callbacks. You can use these to eg identify a specific instance of a tool with its use case. param verbose: bool = False¶ Whether to log the tool’s progress. __call__(tool_input: str, callbacks: Optional[Union[List[BaseCallbackHandler], BaseCallbackManager]] = None) → str¶ Make tool callable.
https://api.python.langchain.com/en/latest/tools/langchain.tools.azure_cognitive_services.speech2text.AzureCogsSpeech2TextTool.html
458bdeacdb4d-2
Make tool callable. async ainvoke(input: Union[str, Dict], config: Optional[RunnableConfig] = None, **kwargs: Any) → Any¶ async arun(tool_input: Union[str, Dict], verbose: Optional[bool] = None, start_color: Optional[str] = 'green', color: Optional[str] = 'green', callbacks: Optional[Union[List[BaseCallbackHandler], BaseCallbackManager]] = None, *, tags: Optional[List[str]] = None, metadata: Optional[Dict[str, Any]] = None, **kwargs: Any) → Any¶ Run the tool asynchronously. invoke(input: Union[str, Dict], config: Optional[RunnableConfig] = None, **kwargs: Any) → Any¶ validator raise_deprecation  »  all fields¶ Raise deprecation warning if callback_manager is used. run(tool_input: Union[str, Dict], verbose: Optional[bool] = None, start_color: Optional[str] = 'green', color: Optional[str] = 'green', callbacks: Optional[Union[List[BaseCallbackHandler], BaseCallbackManager]] = None, *, tags: Optional[List[str]] = None, metadata: Optional[Dict[str, Any]] = None, **kwargs: Any) → Any¶ Run the tool. validator validate_environment  »  all fields[source]¶ Validate that api key and endpoint exists in environment. property args: dict¶ property is_single_input: bool¶ Whether the tool only accepts a single input. model Config¶ Bases: object Configuration for this pydantic object. arbitrary_types_allowed = True¶ extra = 'forbid'¶
https://api.python.langchain.com/en/latest/tools/langchain.tools.azure_cognitive_services.speech2text.AzureCogsSpeech2TextTool.html
66bdab554ac7-0
langchain.tools.office365.send_event.O365SendEvent¶ class langchain.tools.office365.send_event.O365SendEvent(*, name: str = 'send_event', description: str = 'Use this tool to create and send an event with the provided event fields.', args_schema: ~typing.Type[~langchain.tools.office365.send_event.SendEventSchema] = <class 'langchain.tools.office365.send_event.SendEventSchema'>, return_direct: bool = False, verbose: bool = False, callbacks: ~typing.Optional[~typing.Union[~typing.List[~langchain.callbacks.base.BaseCallbackHandler], ~langchain.callbacks.base.BaseCallbackManager]] = None, callback_manager: ~typing.Optional[~langchain.callbacks.base.BaseCallbackManager] = None, tags: ~typing.Optional[~typing.List[str]] = None, metadata: ~typing.Optional[~typing.Dict[str, ~typing.Any]] = None, handle_tool_error: ~typing.Optional[~typing.Union[bool, str, ~typing.Callable[[~langchain.tools.base.ToolException], str]]] = False, account: Account = None)[source]¶ Bases: O365BaseTool Tool for sending calendar events in Office 365. Create a new model by parsing and validating input data from keyword arguments. Raises ValidationError if the input data cannot be parsed to form a valid model. param account: Account [Optional]¶ The account object for the Office 365 account. param args_schema: Type[langchain.tools.office365.send_event.SendEventSchema] = <class 'langchain.tools.office365.send_event.SendEventSchema'>¶ Pydantic model class to validate and parse the tool’s input arguments. param callback_manager: Optional[BaseCallbackManager] = None¶ Deprecated. Please use callbacks instead. param callbacks: Callbacks = None¶ Callbacks to be called during tool execution.
https://api.python.langchain.com/en/latest/tools/langchain.tools.office365.send_event.O365SendEvent.html
66bdab554ac7-1
param callbacks: Callbacks = None¶ Callbacks to be called during tool execution. param description: str = 'Use this tool to create and send an event with the provided event fields.'¶ Used to tell the model how/when/why to use the tool. You can provide few-shot examples as a part of the description. param handle_tool_error: Optional[Union[bool, str, Callable[[ToolException], str]]] = False¶ Handle the content of the ToolException thrown. param metadata: Optional[Dict[str, Any]] = None¶ Optional metadata associated with the tool. Defaults to None This metadata will be associated with each call to this tool, and passed as arguments to the handlers defined in callbacks. You can use these to eg identify a specific instance of a tool with its use case. param name: str = 'send_event'¶ The unique name of the tool that clearly communicates its purpose. param return_direct: bool = False¶ Whether to return the tool’s output directly. Setting this to True means that after the tool is called, the AgentExecutor will stop looping. param tags: Optional[List[str]] = None¶ Optional list of tags associated with the tool. Defaults to None These tags will be associated with each call to this tool, and passed as arguments to the handlers defined in callbacks. You can use these to eg identify a specific instance of a tool with its use case. param verbose: bool = False¶ Whether to log the tool’s progress. __call__(tool_input: str, callbacks: Optional[Union[List[BaseCallbackHandler], BaseCallbackManager]] = None) → str¶ Make tool callable. async ainvoke(input: Union[str, Dict], config: Optional[RunnableConfig] = None, **kwargs: Any) → Any¶
https://api.python.langchain.com/en/latest/tools/langchain.tools.office365.send_event.O365SendEvent.html
66bdab554ac7-2
async arun(tool_input: Union[str, Dict], verbose: Optional[bool] = None, start_color: Optional[str] = 'green', color: Optional[str] = 'green', callbacks: Optional[Union[List[BaseCallbackHandler], BaseCallbackManager]] = None, *, tags: Optional[List[str]] = None, metadata: Optional[Dict[str, Any]] = None, **kwargs: Any) → Any¶ Run the tool asynchronously. invoke(input: Union[str, Dict], config: Optional[RunnableConfig] = None, **kwargs: Any) → Any¶ validator raise_deprecation  »  all fields¶ Raise deprecation warning if callback_manager is used. run(tool_input: Union[str, Dict], verbose: Optional[bool] = None, start_color: Optional[str] = 'green', color: Optional[str] = 'green', callbacks: Optional[Union[List[BaseCallbackHandler], BaseCallbackManager]] = None, *, tags: Optional[List[str]] = None, metadata: Optional[Dict[str, Any]] = None, **kwargs: Any) → Any¶ Run the tool. property args: dict¶ property is_single_input: bool¶ Whether the tool only accepts a single input. model Config¶ Bases: object Configuration for this pydantic object. arbitrary_types_allowed = True¶ extra = 'forbid'¶
https://api.python.langchain.com/en/latest/tools/langchain.tools.office365.send_event.O365SendEvent.html
023260bc9948-0
langchain.tools.arxiv.tool.ArxivQueryRun¶ class langchain.tools.arxiv.tool.ArxivQueryRun(*, name: str = 'arxiv', description: str = 'A wrapper around Arxiv.org Useful for when you need to answer questions about Physics, Mathematics, Computer Science, Quantitative Biology, Quantitative Finance, Statistics, Electrical Engineering, and Economics from scientific articles on arxiv.org. Input should be a search query.', args_schema: Optional[Type[BaseModel]] = None, return_direct: bool = False, verbose: bool = False, callbacks: Optional[Union[List[BaseCallbackHandler], BaseCallbackManager]] = None, callback_manager: Optional[BaseCallbackManager] = None, tags: Optional[List[str]] = None, metadata: Optional[Dict[str, Any]] = None, handle_tool_error: Optional[Union[bool, str, Callable[[ToolException], str]]] = False, api_wrapper: ArxivAPIWrapper = None)[source]¶ Bases: BaseTool Tool that searches the Arxiv API. Create a new model by parsing and validating input data from keyword arguments. Raises ValidationError if the input data cannot be parsed to form a valid model. param api_wrapper: langchain.utilities.arxiv.ArxivAPIWrapper [Optional]¶ param args_schema: Optional[Type[BaseModel]] = None¶ Pydantic model class to validate and parse the tool’s input arguments. param callback_manager: Optional[BaseCallbackManager] = None¶ Deprecated. Please use callbacks instead. param callbacks: Callbacks = None¶ Callbacks to be called during tool execution.
https://api.python.langchain.com/en/latest/tools/langchain.tools.arxiv.tool.ArxivQueryRun.html
023260bc9948-1
param callbacks: Callbacks = None¶ Callbacks to be called during tool execution. param description: str = 'A wrapper around Arxiv.org Useful for when you need to answer questions about Physics, Mathematics, Computer Science, Quantitative Biology, Quantitative Finance, Statistics, Electrical Engineering, and Economics from scientific articles on arxiv.org. Input should be a search query.'¶ Used to tell the model how/when/why to use the tool. You can provide few-shot examples as a part of the description. param handle_tool_error: Optional[Union[bool, str, Callable[[ToolException], str]]] = False¶ Handle the content of the ToolException thrown. param metadata: Optional[Dict[str, Any]] = None¶ Optional metadata associated with the tool. Defaults to None This metadata will be associated with each call to this tool, and passed as arguments to the handlers defined in callbacks. You can use these to eg identify a specific instance of a tool with its use case. param name: str = 'arxiv'¶ The unique name of the tool that clearly communicates its purpose. param return_direct: bool = False¶ Whether to return the tool’s output directly. Setting this to True means that after the tool is called, the AgentExecutor will stop looping. param tags: Optional[List[str]] = None¶ Optional list of tags associated with the tool. Defaults to None These tags will be associated with each call to this tool, and passed as arguments to the handlers defined in callbacks. You can use these to eg identify a specific instance of a tool with its use case. param verbose: bool = False¶ Whether to log the tool’s progress. __call__(tool_input: str, callbacks: Optional[Union[List[BaseCallbackHandler], BaseCallbackManager]] = None) → str¶ Make tool callable.
https://api.python.langchain.com/en/latest/tools/langchain.tools.arxiv.tool.ArxivQueryRun.html
023260bc9948-2
Make tool callable. async ainvoke(input: Union[str, Dict], config: Optional[RunnableConfig] = None, **kwargs: Any) → Any¶ async arun(tool_input: Union[str, Dict], verbose: Optional[bool] = None, start_color: Optional[str] = 'green', color: Optional[str] = 'green', callbacks: Optional[Union[List[BaseCallbackHandler], BaseCallbackManager]] = None, *, tags: Optional[List[str]] = None, metadata: Optional[Dict[str, Any]] = None, **kwargs: Any) → Any¶ Run the tool asynchronously. invoke(input: Union[str, Dict], config: Optional[RunnableConfig] = None, **kwargs: Any) → Any¶ validator raise_deprecation  »  all fields¶ Raise deprecation warning if callback_manager is used. run(tool_input: Union[str, Dict], verbose: Optional[bool] = None, start_color: Optional[str] = 'green', color: Optional[str] = 'green', callbacks: Optional[Union[List[BaseCallbackHandler], BaseCallbackManager]] = None, *, tags: Optional[List[str]] = None, metadata: Optional[Dict[str, Any]] = None, **kwargs: Any) → Any¶ Run the tool. property args: dict¶ property is_single_input: bool¶ Whether the tool only accepts a single input. model Config¶ Bases: object Configuration for this pydantic object. arbitrary_types_allowed = True¶ extra = 'forbid'¶
https://api.python.langchain.com/en/latest/tools/langchain.tools.arxiv.tool.ArxivQueryRun.html
fa3061fdd74c-0
langchain.tools.json.tool.JsonListKeysTool¶ class langchain.tools.json.tool.JsonListKeysTool(*, name: str = 'json_spec_list_keys', description: str = '\n    Can be used to list all keys at a given path. \n    Before calling this you should be SURE that the path to this exists.\n    The input is a text representation of the path to the dict in Python syntax (e.g. data["key1"][0]["key2"]).\n    ', args_schema: Optional[Type[BaseModel]] = None, return_direct: bool = False, verbose: bool = False, callbacks: Optional[Union[List[BaseCallbackHandler], BaseCallbackManager]] = None, callback_manager: Optional[BaseCallbackManager] = None, tags: Optional[List[str]] = None, metadata: Optional[Dict[str, Any]] = None, handle_tool_error: Optional[Union[bool, str, Callable[[ToolException], str]]] = False, spec: JsonSpec)[source]¶ Bases: BaseTool Tool for listing keys in a JSON spec. Create a new model by parsing and validating input data from keyword arguments. Raises ValidationError if the input data cannot be parsed to form a valid model. param args_schema: Optional[Type[BaseModel]] = None¶ Pydantic model class to validate and parse the tool’s input arguments. param callback_manager: Optional[BaseCallbackManager] = None¶ Deprecated. Please use callbacks instead. param callbacks: Callbacks = None¶ Callbacks to be called during tool execution.
https://api.python.langchain.com/en/latest/tools/langchain.tools.json.tool.JsonListKeysTool.html
fa3061fdd74c-1
param callbacks: Callbacks = None¶ Callbacks to be called during tool execution. param description: str = '\n    Can be used to list all keys at a given path. \n    Before calling this you should be SURE that the path to this exists.\n    The input is a text representation of the path to the dict in Python syntax (e.g. data["key1"][0]["key2"]).\n    '¶ Used to tell the model how/when/why to use the tool. You can provide few-shot examples as a part of the description. param handle_tool_error: Optional[Union[bool, str, Callable[[ToolException], str]]] = False¶ Handle the content of the ToolException thrown. param metadata: Optional[Dict[str, Any]] = None¶ Optional metadata associated with the tool. Defaults to None This metadata will be associated with each call to this tool, and passed as arguments to the handlers defined in callbacks. You can use these to eg identify a specific instance of a tool with its use case. param name: str = 'json_spec_list_keys'¶ The unique name of the tool that clearly communicates its purpose. param return_direct: bool = False¶ Whether to return the tool’s output directly. Setting this to True means that after the tool is called, the AgentExecutor will stop looping. param spec: JsonSpec [Required]¶ param tags: Optional[List[str]] = None¶ Optional list of tags associated with the tool. Defaults to None These tags will be associated with each call to this tool, and passed as arguments to the handlers defined in callbacks. You can use these to eg identify a specific instance of a tool with its use case. param verbose: bool = False¶ Whether to log the tool’s progress.
https://api.python.langchain.com/en/latest/tools/langchain.tools.json.tool.JsonListKeysTool.html
fa3061fdd74c-2
param verbose: bool = False¶ Whether to log the tool’s progress. __call__(tool_input: str, callbacks: Optional[Union[List[BaseCallbackHandler], BaseCallbackManager]] = None) → str¶ Make tool callable. async ainvoke(input: Union[str, Dict], config: Optional[RunnableConfig] = None, **kwargs: Any) → Any¶ async arun(tool_input: Union[str, Dict], verbose: Optional[bool] = None, start_color: Optional[str] = 'green', color: Optional[str] = 'green', callbacks: Optional[Union[List[BaseCallbackHandler], BaseCallbackManager]] = None, *, tags: Optional[List[str]] = None, metadata: Optional[Dict[str, Any]] = None, **kwargs: Any) → Any¶ Run the tool asynchronously. invoke(input: Union[str, Dict], config: Optional[RunnableConfig] = None, **kwargs: Any) → Any¶ validator raise_deprecation  »  all fields¶ Raise deprecation warning if callback_manager is used. run(tool_input: Union[str, Dict], verbose: Optional[bool] = None, start_color: Optional[str] = 'green', color: Optional[str] = 'green', callbacks: Optional[Union[List[BaseCallbackHandler], BaseCallbackManager]] = None, *, tags: Optional[List[str]] = None, metadata: Optional[Dict[str, Any]] = None, **kwargs: Any) → Any¶ Run the tool. property args: dict¶ property is_single_input: bool¶ Whether the tool only accepts a single input. model Config¶ Bases: object Configuration for this pydantic object. arbitrary_types_allowed = True¶ extra = 'forbid'¶
https://api.python.langchain.com/en/latest/tools/langchain.tools.json.tool.JsonListKeysTool.html
43cc06c96045-0
langchain.tools.spark_sql.tool.QuerySparkSQLTool¶ class langchain.tools.spark_sql.tool.QuerySparkSQLTool(*, name: str = 'query_sql_db', description: str = '\n    Input to this tool is a detailed and correct SQL query, output is a result from the Spark SQL.\n    If the query is not correct, an error message will be returned.\n    If an error is returned, rewrite the query, check the query, and try again.\n    ', args_schema: Optional[Type[BaseModel]] = None, return_direct: bool = False, verbose: bool = False, callbacks: Optional[Union[List[BaseCallbackHandler], BaseCallbackManager]] = None, callback_manager: Optional[BaseCallbackManager] = None, tags: Optional[List[str]] = None, metadata: Optional[Dict[str, Any]] = None, handle_tool_error: Optional[Union[bool, str, Callable[[ToolException], str]]] = False, db: SparkSQL)[source]¶ Bases: BaseSparkSQLTool, BaseTool Tool for querying a Spark SQL. Create a new model by parsing and validating input data from keyword arguments. Raises ValidationError if the input data cannot be parsed to form a valid model. param args_schema: Optional[Type[BaseModel]] = None¶ Pydantic model class to validate and parse the tool’s input arguments. param callback_manager: Optional[BaseCallbackManager] = None¶ Deprecated. Please use callbacks instead. param callbacks: Callbacks = None¶ Callbacks to be called during tool execution. param db: langchain.utilities.spark_sql.SparkSQL [Required]¶
https://api.python.langchain.com/en/latest/tools/langchain.tools.spark_sql.tool.QuerySparkSQLTool.html
43cc06c96045-1
param db: langchain.utilities.spark_sql.SparkSQL [Required]¶ param description: str = '\n    Input to this tool is a detailed and correct SQL query, output is a result from the Spark SQL.\n    If the query is not correct, an error message will be returned.\n    If an error is returned, rewrite the query, check the query, and try again.\n    '¶ Used to tell the model how/when/why to use the tool. You can provide few-shot examples as a part of the description. param handle_tool_error: Optional[Union[bool, str, Callable[[ToolException], str]]] = False¶ Handle the content of the ToolException thrown. param metadata: Optional[Dict[str, Any]] = None¶ Optional metadata associated with the tool. Defaults to None This metadata will be associated with each call to this tool, and passed as arguments to the handlers defined in callbacks. You can use these to eg identify a specific instance of a tool with its use case. param name: str = 'query_sql_db'¶ The unique name of the tool that clearly communicates its purpose. param return_direct: bool = False¶ Whether to return the tool’s output directly. Setting this to True means that after the tool is called, the AgentExecutor will stop looping. param tags: Optional[List[str]] = None¶ Optional list of tags associated with the tool. Defaults to None These tags will be associated with each call to this tool, and passed as arguments to the handlers defined in callbacks. You can use these to eg identify a specific instance of a tool with its use case. param verbose: bool = False¶ Whether to log the tool’s progress. __call__(tool_input: str, callbacks: Optional[Union[List[BaseCallbackHandler], BaseCallbackManager]] = None) → str¶
https://api.python.langchain.com/en/latest/tools/langchain.tools.spark_sql.tool.QuerySparkSQLTool.html
43cc06c96045-2
Make tool callable. async ainvoke(input: Union[str, Dict], config: Optional[RunnableConfig] = None, **kwargs: Any) → Any¶ async arun(tool_input: Union[str, Dict], verbose: Optional[bool] = None, start_color: Optional[str] = 'green', color: Optional[str] = 'green', callbacks: Optional[Union[List[BaseCallbackHandler], BaseCallbackManager]] = None, *, tags: Optional[List[str]] = None, metadata: Optional[Dict[str, Any]] = None, **kwargs: Any) → Any¶ Run the tool asynchronously. invoke(input: Union[str, Dict], config: Optional[RunnableConfig] = None, **kwargs: Any) → Any¶ validator raise_deprecation  »  all fields¶ Raise deprecation warning if callback_manager is used. run(tool_input: Union[str, Dict], verbose: Optional[bool] = None, start_color: Optional[str] = 'green', color: Optional[str] = 'green', callbacks: Optional[Union[List[BaseCallbackHandler], BaseCallbackManager]] = None, *, tags: Optional[List[str]] = None, metadata: Optional[Dict[str, Any]] = None, **kwargs: Any) → Any¶ Run the tool. property args: dict¶ property is_single_input: bool¶ Whether the tool only accepts a single input. model Config¶ Bases: Config Configuration for this pydantic object. arbitrary_types_allowed = True¶ extra = 'forbid'¶
https://api.python.langchain.com/en/latest/tools/langchain.tools.spark_sql.tool.QuerySparkSQLTool.html
13a4758c7d16-0
langchain.tools.python.tool.PythonAstREPLTool¶ class langchain.tools.python.tool.PythonAstREPLTool(*, name: str = 'python_repl_ast', description: str = 'A Python shell. Use this to execute python commands. Input should be a valid python command. When using this tool, sometimes output is abbreviated - make sure it does not look abbreviated before using it in your answer.', args_schema: Optional[Type[BaseModel]] = None, return_direct: bool = False, verbose: bool = False, callbacks: Optional[Union[List[BaseCallbackHandler], BaseCallbackManager]] = None, callback_manager: Optional[BaseCallbackManager] = None, tags: Optional[List[str]] = None, metadata: Optional[Dict[str, Any]] = None, handle_tool_error: Optional[Union[bool, str, Callable[[ToolException], str]]] = False, globals: Optional[Dict] = None, locals: Optional[Dict] = None, sanitize_input: bool = True)[source]¶ Bases: BaseTool A tool for running python code in a REPL. Create a new model by parsing and validating input data from keyword arguments. Raises ValidationError if the input data cannot be parsed to form a valid model. param args_schema: Optional[Type[BaseModel]] = None¶ Pydantic model class to validate and parse the tool’s input arguments. param callback_manager: Optional[BaseCallbackManager] = None¶ Deprecated. Please use callbacks instead. param callbacks: Callbacks = None¶ Callbacks to be called during tool execution. param description: str = 'A Python shell. Use this to execute python commands. Input should be a valid python command. When using this tool, sometimes output is abbreviated - make sure it does not look abbreviated before using it in your answer.'¶ Used to tell the model how/when/why to use the tool.
https://api.python.langchain.com/en/latest/tools/langchain.tools.python.tool.PythonAstREPLTool.html
13a4758c7d16-1
Used to tell the model how/when/why to use the tool. You can provide few-shot examples as a part of the description. param globals: Optional[Dict] [Optional]¶ param handle_tool_error: Optional[Union[bool, str, Callable[[ToolException], str]]] = False¶ Handle the content of the ToolException thrown. param locals: Optional[Dict] [Optional]¶ param metadata: Optional[Dict[str, Any]] = None¶ Optional metadata associated with the tool. Defaults to None This metadata will be associated with each call to this tool, and passed as arguments to the handlers defined in callbacks. You can use these to eg identify a specific instance of a tool with its use case. param name: str = 'python_repl_ast'¶ The unique name of the tool that clearly communicates its purpose. param return_direct: bool = False¶ Whether to return the tool’s output directly. Setting this to True means that after the tool is called, the AgentExecutor will stop looping. param sanitize_input: bool = True¶ param tags: Optional[List[str]] = None¶ Optional list of tags associated with the tool. Defaults to None These tags will be associated with each call to this tool, and passed as arguments to the handlers defined in callbacks. You can use these to eg identify a specific instance of a tool with its use case. param verbose: bool = False¶ Whether to log the tool’s progress. __call__(tool_input: str, callbacks: Optional[Union[List[BaseCallbackHandler], BaseCallbackManager]] = None) → str¶ Make tool callable. async ainvoke(input: Union[str, Dict], config: Optional[RunnableConfig] = None, **kwargs: Any) → Any¶
https://api.python.langchain.com/en/latest/tools/langchain.tools.python.tool.PythonAstREPLTool.html
13a4758c7d16-2
async arun(tool_input: Union[str, Dict], verbose: Optional[bool] = None, start_color: Optional[str] = 'green', color: Optional[str] = 'green', callbacks: Optional[Union[List[BaseCallbackHandler], BaseCallbackManager]] = None, *, tags: Optional[List[str]] = None, metadata: Optional[Dict[str, Any]] = None, **kwargs: Any) → Any¶ Run the tool asynchronously. invoke(input: Union[str, Dict], config: Optional[RunnableConfig] = None, **kwargs: Any) → Any¶ validator raise_deprecation  »  all fields¶ Raise deprecation warning if callback_manager is used. run(tool_input: Union[str, Dict], verbose: Optional[bool] = None, start_color: Optional[str] = 'green', color: Optional[str] = 'green', callbacks: Optional[Union[List[BaseCallbackHandler], BaseCallbackManager]] = None, *, tags: Optional[List[str]] = None, metadata: Optional[Dict[str, Any]] = None, **kwargs: Any) → Any¶ Run the tool. validator validate_python_version  »  all fields[source]¶ Validate valid python version. property args: dict¶ property is_single_input: bool¶ Whether the tool only accepts a single input. model Config¶ Bases: object Configuration for this pydantic object. arbitrary_types_allowed = True¶ extra = 'forbid'¶
https://api.python.langchain.com/en/latest/tools/langchain.tools.python.tool.PythonAstREPLTool.html
d15e35fdb1d2-0
langchain.tools.gmail.get_message.SearchArgsSchema¶ class langchain.tools.gmail.get_message.SearchArgsSchema(*, message_id: str)[source]¶ Bases: BaseModel Input for GetMessageTool. Create a new model by parsing and validating input data from keyword arguments. Raises ValidationError if the input data cannot be parsed to form a valid model. param message_id: str [Required]¶ The unique ID of the email message, retrieved from a search.
https://api.python.langchain.com/en/latest/tools/langchain.tools.gmail.get_message.SearchArgsSchema.html
d98a51304dbe-0
langchain.tools.steamship_image_generation.tool.ModelName¶ class langchain.tools.steamship_image_generation.tool.ModelName(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]¶ Bases: str, Enum Supported Image Models for generation. Methods __init__(*args, **kwds) capitalize() Return a capitalized version of the string. casefold() Return a version of the string suitable for caseless comparisons. center(width[, fillchar]) Return a centered string of length width. count(sub[, start[, end]]) Return the number of non-overlapping occurrences of substring sub in string S[start:end]. encode([encoding, errors]) Encode the string using the codec registered for encoding. endswith(suffix[, start[, end]]) Return True if S ends with the specified suffix, False otherwise. expandtabs([tabsize]) Return a copy where all tab characters are expanded using spaces. find(sub[, start[, end]]) Return the lowest index in S where substring sub is found, such that sub is contained within S[start:end]. format(*args, **kwargs) Return a formatted version of S, using substitutions from args and kwargs. format_map(mapping) Return a formatted version of S, using substitutions from mapping. index(sub[, start[, end]]) Return the lowest index in S where substring sub is found, such that sub is contained within S[start:end]. isalnum() Return True if the string is an alpha-numeric string, False otherwise. isalpha() Return True if the string is an alphabetic string, False otherwise. isascii() Return True if all characters in the string are ASCII, False otherwise. isdecimal() Return True if the string is a decimal string, False otherwise.
https://api.python.langchain.com/en/latest/tools/langchain.tools.steamship_image_generation.tool.ModelName.html
d98a51304dbe-1
isdecimal() Return True if the string is a decimal string, False otherwise. isdigit() Return True if the string is a digit string, False otherwise. isidentifier() Return True if the string is a valid Python identifier, False otherwise. islower() Return True if the string is a lowercase string, False otherwise. isnumeric() Return True if the string is a numeric string, False otherwise. isprintable() Return True if the string is printable, False otherwise. isspace() Return True if the string is a whitespace string, False otherwise. istitle() Return True if the string is a title-cased string, False otherwise. isupper() Return True if the string is an uppercase string, False otherwise. join(iterable, /) Concatenate any number of strings. ljust(width[, fillchar]) Return a left-justified string of length width. lower() Return a copy of the string converted to lowercase. lstrip([chars]) Return a copy of the string with leading whitespace removed. maketrans Return a translation table usable for str.translate(). partition(sep, /) Partition the string into three parts using the given separator. removeprefix(prefix, /) Return a str with the given prefix string removed if present. removesuffix(suffix, /) Return a str with the given suffix string removed if present. replace(old, new[, count]) Return a copy with all occurrences of substring old replaced by new. rfind(sub[, start[, end]]) Return the highest index in S where substring sub is found, such that sub is contained within S[start:end]. rindex(sub[, start[, end]]) Return the highest index in S where substring sub is found, such that sub is contained within S[start:end].
https://api.python.langchain.com/en/latest/tools/langchain.tools.steamship_image_generation.tool.ModelName.html
d98a51304dbe-2
rjust(width[, fillchar]) Return a right-justified string of length width. rpartition(sep, /) Partition the string into three parts using the given separator. rsplit([sep, maxsplit]) Return a list of the substrings in the string, using sep as the separator string. rstrip([chars]) Return a copy of the string with trailing whitespace removed. split([sep, maxsplit]) Return a list of the substrings in the string, using sep as the separator string. splitlines([keepends]) Return a list of the lines in the string, breaking at line boundaries. startswith(prefix[, start[, end]]) Return True if S starts with the specified prefix, False otherwise. strip([chars]) Return a copy of the string with leading and trailing whitespace removed. swapcase() Convert uppercase characters to lowercase and lowercase characters to uppercase. title() Return a version of the string where each word is titlecased. translate(table, /) Replace each character in the string using the given translation table. upper() Return a copy of the string converted to uppercase. zfill(width, /) Pad a numeric string with zeros on the left, to fill a field of the given width. Attributes DALL_E STABLE_DIFFUSION capitalize()¶ Return a capitalized version of the string. More specifically, make the first character have upper case and the rest lower case. casefold()¶ Return a version of the string suitable for caseless comparisons. center(width, fillchar=' ', /)¶ Return a centered string of length width. Padding is done using the specified fill character (default is a space). count(sub[, start[, end]]) → int¶ Return the number of non-overlapping occurrences of substring sub in
https://api.python.langchain.com/en/latest/tools/langchain.tools.steamship_image_generation.tool.ModelName.html
d98a51304dbe-3
Return the number of non-overlapping occurrences of substring sub in string S[start:end]. Optional arguments start and end are interpreted as in slice notation. encode(encoding='utf-8', errors='strict')¶ Encode the string using the codec registered for encoding. encodingThe encoding in which to encode the string. errorsThe error handling scheme to use for encoding errors. The default is ‘strict’ meaning that encoding errors raise a UnicodeEncodeError. Other possible values are ‘ignore’, ‘replace’ and ‘xmlcharrefreplace’ as well as any other name registered with codecs.register_error that can handle UnicodeEncodeErrors. endswith(suffix[, start[, end]]) → bool¶ Return True if S ends with the specified suffix, False otherwise. With optional start, test S beginning at that position. With optional end, stop comparing S at that position. suffix can also be a tuple of strings to try. expandtabs(tabsize=8)¶ Return a copy where all tab characters are expanded using spaces. If tabsize is not given, a tab size of 8 characters is assumed. find(sub[, start[, end]]) → int¶ Return the lowest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation. Return -1 on failure. format(*args, **kwargs) → str¶ Return a formatted version of S, using substitutions from args and kwargs. The substitutions are identified by braces (‘{’ and ‘}’). format_map(mapping) → str¶ Return a formatted version of S, using substitutions from mapping. The substitutions are identified by braces (‘{’ and ‘}’). index(sub[, start[, end]]) → int¶ Return the lowest index in S where substring sub is found,
https://api.python.langchain.com/en/latest/tools/langchain.tools.steamship_image_generation.tool.ModelName.html
d98a51304dbe-4
Return the lowest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation. Raises ValueError when the substring is not found. isalnum()¶ Return True if the string is an alpha-numeric string, False otherwise. A string is alpha-numeric if all characters in the string are alpha-numeric and there is at least one character in the string. isalpha()¶ Return True if the string is an alphabetic string, False otherwise. A string is alphabetic if all characters in the string are alphabetic and there is at least one character in the string. isascii()¶ Return True if all characters in the string are ASCII, False otherwise. ASCII characters have code points in the range U+0000-U+007F. Empty string is ASCII too. isdecimal()¶ Return True if the string is a decimal string, False otherwise. A string is a decimal string if all characters in the string are decimal and there is at least one character in the string. isdigit()¶ Return True if the string is a digit string, False otherwise. A string is a digit string if all characters in the string are digits and there is at least one character in the string. isidentifier()¶ Return True if the string is a valid Python identifier, False otherwise. Call keyword.iskeyword(s) to test whether string s is a reserved identifier, such as “def” or “class”. islower()¶ Return True if the string is a lowercase string, False otherwise. A string is lowercase if all cased characters in the string are lowercase and there is at least one cased character in the string. isnumeric()¶ Return True if the string is a numeric string, False otherwise.
https://api.python.langchain.com/en/latest/tools/langchain.tools.steamship_image_generation.tool.ModelName.html
d98a51304dbe-5
isnumeric()¶ Return True if the string is a numeric string, False otherwise. A string is numeric if all characters in the string are numeric and there is at least one character in the string. isprintable()¶ Return True if the string is printable, False otherwise. A string is printable if all of its characters are considered printable in repr() or if it is empty. isspace()¶ Return True if the string is a whitespace string, False otherwise. A string is whitespace if all characters in the string are whitespace and there is at least one character in the string. istitle()¶ Return True if the string is a title-cased string, False otherwise. In a title-cased string, upper- and title-case characters may only follow uncased characters and lowercase characters only cased ones. isupper()¶ Return True if the string is an uppercase string, False otherwise. A string is uppercase if all cased characters in the string are uppercase and there is at least one cased character in the string. join(iterable, /)¶ Concatenate any number of strings. The string whose method is called is inserted in between each given string. The result is returned as a new string. Example: ‘.’.join([‘ab’, ‘pq’, ‘rs’]) -> ‘ab.pq.rs’ ljust(width, fillchar=' ', /)¶ Return a left-justified string of length width. Padding is done using the specified fill character (default is a space). lower()¶ Return a copy of the string converted to lowercase. lstrip(chars=None, /)¶ Return a copy of the string with leading whitespace removed. If chars is given and not None, remove characters in chars instead. static maketrans()¶ Return a translation table usable for str.translate().
https://api.python.langchain.com/en/latest/tools/langchain.tools.steamship_image_generation.tool.ModelName.html
d98a51304dbe-6
static maketrans()¶ Return a translation table usable for str.translate(). If there is only one argument, it must be a dictionary mapping Unicode ordinals (integers) or characters to Unicode ordinals, strings or None. Character keys will be then converted to ordinals. If there are two arguments, they must be strings of equal length, and in the resulting dictionary, each character in x will be mapped to the character at the same position in y. If there is a third argument, it must be a string, whose characters will be mapped to None in the result. partition(sep, /)¶ Partition the string into three parts using the given separator. This will search for the separator in the string. If the separator is found, returns a 3-tuple containing the part before the separator, the separator itself, and the part after it. If the separator is not found, returns a 3-tuple containing the original string and two empty strings. removeprefix(prefix, /)¶ Return a str with the given prefix string removed if present. If the string starts with the prefix string, return string[len(prefix):]. Otherwise, return a copy of the original string. removesuffix(suffix, /)¶ Return a str with the given suffix string removed if present. If the string ends with the suffix string and that suffix is not empty, return string[:-len(suffix)]. Otherwise, return a copy of the original string. replace(old, new, count=- 1, /)¶ Return a copy with all occurrences of substring old replaced by new. countMaximum number of occurrences to replace. -1 (the default value) means replace all occurrences. If the optional argument count is given, only the first count occurrences are replaced. rfind(sub[, start[, end]]) → int¶
https://api.python.langchain.com/en/latest/tools/langchain.tools.steamship_image_generation.tool.ModelName.html
d98a51304dbe-7
replaced. rfind(sub[, start[, end]]) → int¶ Return the highest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation. Return -1 on failure. rindex(sub[, start[, end]]) → int¶ Return the highest index in S where substring sub is found, such that sub is contained within S[start:end]. Optional arguments start and end are interpreted as in slice notation. Raises ValueError when the substring is not found. rjust(width, fillchar=' ', /)¶ Return a right-justified string of length width. Padding is done using the specified fill character (default is a space). rpartition(sep, /)¶ Partition the string into three parts using the given separator. This will search for the separator in the string, starting at the end. If the separator is found, returns a 3-tuple containing the part before the separator, the separator itself, and the part after it. If the separator is not found, returns a 3-tuple containing two empty strings and the original string. rsplit(sep=None, maxsplit=- 1)¶ Return a list of the substrings in the string, using sep as the separator string. sepThe separator used to split the string. When set to None (the default value), will split on any whitespace character (including \n \r \t \f and spaces) and will discard empty strings from the result. maxsplitMaximum number of splits (starting from the left). -1 (the default value) means no limit. Splitting starts at the end of the string and works to the front. rstrip(chars=None, /)¶ Return a copy of the string with trailing whitespace removed.
https://api.python.langchain.com/en/latest/tools/langchain.tools.steamship_image_generation.tool.ModelName.html
d98a51304dbe-8
rstrip(chars=None, /)¶ Return a copy of the string with trailing whitespace removed. If chars is given and not None, remove characters in chars instead. split(sep=None, maxsplit=- 1)¶ Return a list of the substrings in the string, using sep as the separator string. sepThe separator used to split the string. When set to None (the default value), will split on any whitespace character (including \n \r \t \f and spaces) and will discard empty strings from the result. maxsplitMaximum number of splits (starting from the left). -1 (the default value) means no limit. Note, str.split() is mainly useful for data that has been intentionally delimited. With natural text that includes punctuation, consider using the regular expression module. splitlines(keepends=False)¶ Return a list of the lines in the string, breaking at line boundaries. Line breaks are not included in the resulting list unless keepends is given and true. startswith(prefix[, start[, end]]) → bool¶ Return True if S starts with the specified prefix, False otherwise. With optional start, test S beginning at that position. With optional end, stop comparing S at that position. prefix can also be a tuple of strings to try. strip(chars=None, /)¶ Return a copy of the string with leading and trailing whitespace removed. If chars is given and not None, remove characters in chars instead. swapcase()¶ Convert uppercase characters to lowercase and lowercase characters to uppercase. title()¶ Return a version of the string where each word is titlecased. More specifically, words start with uppercased characters and all remaining cased characters have lower case. translate(table, /)¶ Replace each character in the string using the given translation table.
https://api.python.langchain.com/en/latest/tools/langchain.tools.steamship_image_generation.tool.ModelName.html
d98a51304dbe-9
translate(table, /)¶ Replace each character in the string using the given translation table. tableTranslation table, which must be a mapping of Unicode ordinals to Unicode ordinals, strings, or None. The table must implement lookup/indexing via __getitem__, for instance a dictionary or list. If this operation raises LookupError, the character is left untouched. Characters mapped to None are deleted. upper()¶ Return a copy of the string converted to uppercase. zfill(width, /)¶ Pad a numeric string with zeros on the left, to fill a field of the given width. The string is never truncated. DALL_E = 'dall-e'¶ STABLE_DIFFUSION = 'stable-diffusion'¶
https://api.python.langchain.com/en/latest/tools/langchain.tools.steamship_image_generation.tool.ModelName.html
66c2a0e2e18c-0
langchain.tools.openapi.utils.api_models.APIPropertyLocation¶ class langchain.tools.openapi.utils.api_models.APIPropertyLocation(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]¶ Bases: Enum The location of the property. Methods from_str(location) Parse an APIPropertyLocation. Attributes QUERY PATH HEADER COOKIE classmethod from_str(location: str) → APIPropertyLocation[source]¶ Parse an APIPropertyLocation. COOKIE = 'cookie'¶ HEADER = 'header'¶ PATH = 'path'¶ QUERY = 'query'¶
https://api.python.langchain.com/en/latest/tools/langchain.tools.openapi.utils.api_models.APIPropertyLocation.html
8ae8d40bfa22-0
langchain.tools.plugin.AIPlugin¶ class langchain.tools.plugin.AIPlugin(*, schema_version: str, name_for_model: str, name_for_human: str, description_for_model: str, description_for_human: str, auth: Optional[dict] = None, api: ApiConfig, logo_url: Optional[str] = None, contact_email: Optional[str] = None, legal_info_url: Optional[str] = None)[source]¶ Bases: BaseModel AI Plugin Definition. Create a new model by parsing and validating input data from keyword arguments. Raises ValidationError if the input data cannot be parsed to form a valid model. param api: langchain.tools.plugin.ApiConfig [Required]¶ param auth: Optional[dict] = None¶ param contact_email: Optional[str] = None¶ param description_for_human: str [Required]¶ param description_for_model: str [Required]¶ param legal_info_url: Optional[str] = None¶ param logo_url: Optional[str] = None¶ param name_for_human: str [Required]¶ param name_for_model: str [Required]¶ param schema_version: str [Required]¶ classmethod from_url(url: str) → AIPlugin[source]¶ Instantiate AIPlugin from a URL. Examples using AIPlugin¶ Plug-and-Plai Custom Agent with PlugIn Retrieval
https://api.python.langchain.com/en/latest/tools/langchain.tools.plugin.AIPlugin.html
758c55aa3340-0
langchain.tools.powerbi.tool.QueryPowerBITool¶
https://api.python.langchain.com/en/latest/tools/langchain.tools.powerbi.tool.QueryPowerBITool.html
758c55aa3340-1
class langchain.tools.powerbi.tool.QueryPowerBITool(*, name: str = 'query_powerbi', description: str = '\n    Input to this tool is a detailed question about the dataset, output is a result from the dataset. It will try to answer the question using the dataset, and if it cannot, it will ask for clarification.\n\n    Example Input: "How many rows are in table1?"\n    ', args_schema: Optional[Type[BaseModel]] = None, return_direct: bool = False, verbose: bool = False, callbacks: Optional[Union[List[BaseCallbackHandler], BaseCallbackManager]] = None, callback_manager: Optional[BaseCallbackManager] = None, tags: Optional[List[str]] = None, metadata: Optional[Dict[str, Any]] = None, handle_tool_error: Optional[Union[bool, str, Callable[[ToolException], str]]] = False, llm_chain: LLMChain, powerbi: PowerBIDataset, examples: Optional[str] = '\nQuestion: How many rows are in the table <table>?\nDAX: EVALUATE ROW("Number of rows", COUNTROWS(<table>))\n----\nQuestion: How many rows are in the table <table> where <column> is not empty?\nDAX: EVALUATE ROW("Number of rows", COUNTROWS(FILTER(<table>, <table>[<column>] <> "")))\n----\nQuestion: What was the average of <column> in <table>?\nDAX: EVALUATE ROW("Average", AVERAGE(<table>[<column>]))\n----\n', session_cache: Dict[str, Any] = None, max_iterations: int = 5, output_token_limit: int = 4000, tiktoken_model_name: Optional[str] = None)[source]¶ Bases: BaseTool
https://api.python.langchain.com/en/latest/tools/langchain.tools.powerbi.tool.QueryPowerBITool.html
758c55aa3340-2
Bases: BaseTool Tool for querying a Power BI Dataset. Create a new model by parsing and validating input data from keyword arguments. Raises ValidationError if the input data cannot be parsed to form a valid model. param args_schema: Optional[Type[BaseModel]] = None¶ Pydantic model class to validate and parse the tool’s input arguments. param callback_manager: Optional[BaseCallbackManager] = None¶ Deprecated. Please use callbacks instead. param callbacks: Callbacks = None¶ Callbacks to be called during tool execution. param description: str = '\n    Input to this tool is a detailed question about the dataset, output is a result from the dataset. It will try to answer the question using the dataset, and if it cannot, it will ask for clarification.\n\n    Example Input: "How many rows are in table1?"\n    '¶ Used to tell the model how/when/why to use the tool. You can provide few-shot examples as a part of the description. param examples: Optional[str] = '\nQuestion: How many rows are in the table <table>?\nDAX: EVALUATE ROW("Number of rows", COUNTROWS(<table>))\n----\nQuestion: How many rows are in the table <table> where <column> is not empty?\nDAX: EVALUATE ROW("Number of rows", COUNTROWS(FILTER(<table>, <table>[<column>] <> "")))\n----\nQuestion: What was the average of <column> in <table>?\nDAX: EVALUATE ROW("Average", AVERAGE(<table>[<column>]))\n----\n'¶ param handle_tool_error: Optional[Union[bool, str, Callable[[ToolException], str]]] = False¶ Handle the content of the ToolException thrown.
https://api.python.langchain.com/en/latest/tools/langchain.tools.powerbi.tool.QueryPowerBITool.html
758c55aa3340-3
Handle the content of the ToolException thrown. param llm_chain: langchain.chains.llm.LLMChain [Required]¶ param max_iterations: int = 5¶ param metadata: Optional[Dict[str, Any]] = None¶ Optional metadata associated with the tool. Defaults to None This metadata will be associated with each call to this tool, and passed as arguments to the handlers defined in callbacks. You can use these to eg identify a specific instance of a tool with its use case. param name: str = 'query_powerbi'¶ The unique name of the tool that clearly communicates its purpose. param output_token_limit: int = 4000¶ param powerbi: langchain.utilities.powerbi.PowerBIDataset [Required]¶ param return_direct: bool = False¶ Whether to return the tool’s output directly. Setting this to True means that after the tool is called, the AgentExecutor will stop looping. param session_cache: Dict[str, Any] [Optional]¶ param tags: Optional[List[str]] = None¶ Optional list of tags associated with the tool. Defaults to None These tags will be associated with each call to this tool, and passed as arguments to the handlers defined in callbacks. You can use these to eg identify a specific instance of a tool with its use case. param tiktoken_model_name: Optional[str] = None¶ param verbose: bool = False¶ Whether to log the tool’s progress. __call__(tool_input: str, callbacks: Optional[Union[List[BaseCallbackHandler], BaseCallbackManager]] = None) → str¶ Make tool callable. async ainvoke(input: Union[str, Dict], config: Optional[RunnableConfig] = None, **kwargs: Any) → Any¶
https://api.python.langchain.com/en/latest/tools/langchain.tools.powerbi.tool.QueryPowerBITool.html
758c55aa3340-4
async arun(tool_input: Union[str, Dict], verbose: Optional[bool] = None, start_color: Optional[str] = 'green', color: Optional[str] = 'green', callbacks: Optional[Union[List[BaseCallbackHandler], BaseCallbackManager]] = None, *, tags: Optional[List[str]] = None, metadata: Optional[Dict[str, Any]] = None, **kwargs: Any) → Any¶ Run the tool asynchronously. invoke(input: Union[str, Dict], config: Optional[RunnableConfig] = None, **kwargs: Any) → Any¶ validator raise_deprecation  »  all fields¶ Raise deprecation warning if callback_manager is used. run(tool_input: Union[str, Dict], verbose: Optional[bool] = None, start_color: Optional[str] = 'green', color: Optional[str] = 'green', callbacks: Optional[Union[List[BaseCallbackHandler], BaseCallbackManager]] = None, *, tags: Optional[List[str]] = None, metadata: Optional[Dict[str, Any]] = None, **kwargs: Any) → Any¶ Run the tool. validator validate_llm_chain_input_variables  »  llm_chain[source]¶ Make sure the LLM chain has the correct input variables. property args: dict¶ property is_single_input: bool¶ Whether the tool only accepts a single input. model Config[source]¶ Bases: object Configuration for this pydantic object. arbitrary_types_allowed = True¶
https://api.python.langchain.com/en/latest/tools/langchain.tools.powerbi.tool.QueryPowerBITool.html
b3a6362f368c-0
langchain.tools.requests.tool.RequestsDeleteTool¶ class langchain.tools.requests.tool.RequestsDeleteTool(*, name: str = 'requests_delete', description: str = 'A portal to the internet. Use this when you need to make a DELETE request to a URL. Input should be a specific url, and the output will be the text response of the DELETE request.', args_schema: Optional[Type[BaseModel]] = None, return_direct: bool = False, verbose: bool = False, callbacks: Optional[Union[List[BaseCallbackHandler], BaseCallbackManager]] = None, callback_manager: Optional[BaseCallbackManager] = None, tags: Optional[List[str]] = None, metadata: Optional[Dict[str, Any]] = None, handle_tool_error: Optional[Union[bool, str, Callable[[ToolException], str]]] = False, requests_wrapper: TextRequestsWrapper)[source]¶ Bases: BaseRequestsTool, BaseTool Tool for making a DELETE request to an API endpoint. Create a new model by parsing and validating input data from keyword arguments. Raises ValidationError if the input data cannot be parsed to form a valid model. param args_schema: Optional[Type[BaseModel]] = None¶ Pydantic model class to validate and parse the tool’s input arguments. param callback_manager: Optional[BaseCallbackManager] = None¶ Deprecated. Please use callbacks instead. param callbacks: Callbacks = None¶ Callbacks to be called during tool execution. param description: str = 'A portal to the internet. Use this when you need to make a DELETE request to a URL. Input should be a specific url, and the output will be the text response of the DELETE request.'¶ Used to tell the model how/when/why to use the tool. You can provide few-shot examples as a part of the description.
https://api.python.langchain.com/en/latest/tools/langchain.tools.requests.tool.RequestsDeleteTool.html
b3a6362f368c-1
You can provide few-shot examples as a part of the description. param handle_tool_error: Optional[Union[bool, str, Callable[[ToolException], str]]] = False¶ Handle the content of the ToolException thrown. param metadata: Optional[Dict[str, Any]] = None¶ Optional metadata associated with the tool. Defaults to None This metadata will be associated with each call to this tool, and passed as arguments to the handlers defined in callbacks. You can use these to eg identify a specific instance of a tool with its use case. param name: str = 'requests_delete'¶ The unique name of the tool that clearly communicates its purpose. param requests_wrapper: langchain.utilities.requests.TextRequestsWrapper [Required]¶ param return_direct: bool = False¶ Whether to return the tool’s output directly. Setting this to True means that after the tool is called, the AgentExecutor will stop looping. param tags: Optional[List[str]] = None¶ Optional list of tags associated with the tool. Defaults to None These tags will be associated with each call to this tool, and passed as arguments to the handlers defined in callbacks. You can use these to eg identify a specific instance of a tool with its use case. param verbose: bool = False¶ Whether to log the tool’s progress. __call__(tool_input: str, callbacks: Optional[Union[List[BaseCallbackHandler], BaseCallbackManager]] = None) → str¶ Make tool callable. async ainvoke(input: Union[str, Dict], config: Optional[RunnableConfig] = None, **kwargs: Any) → Any¶
https://api.python.langchain.com/en/latest/tools/langchain.tools.requests.tool.RequestsDeleteTool.html
b3a6362f368c-2
async arun(tool_input: Union[str, Dict], verbose: Optional[bool] = None, start_color: Optional[str] = 'green', color: Optional[str] = 'green', callbacks: Optional[Union[List[BaseCallbackHandler], BaseCallbackManager]] = None, *, tags: Optional[List[str]] = None, metadata: Optional[Dict[str, Any]] = None, **kwargs: Any) → Any¶ Run the tool asynchronously. invoke(input: Union[str, Dict], config: Optional[RunnableConfig] = None, **kwargs: Any) → Any¶ validator raise_deprecation  »  all fields¶ Raise deprecation warning if callback_manager is used. run(tool_input: Union[str, Dict], verbose: Optional[bool] = None, start_color: Optional[str] = 'green', color: Optional[str] = 'green', callbacks: Optional[Union[List[BaseCallbackHandler], BaseCallbackManager]] = None, *, tags: Optional[List[str]] = None, metadata: Optional[Dict[str, Any]] = None, **kwargs: Any) → Any¶ Run the tool. property args: dict¶ property is_single_input: bool¶ Whether the tool only accepts a single input. model Config¶ Bases: object Configuration for this pydantic object. arbitrary_types_allowed = True¶ extra = 'forbid'¶
https://api.python.langchain.com/en/latest/tools/langchain.tools.requests.tool.RequestsDeleteTool.html
24c83984e990-0
langchain.tools.google_places.tool.GooglePlacesSchema¶ class langchain.tools.google_places.tool.GooglePlacesSchema(*, query: str)[source]¶ Bases: BaseModel Input for GooglePlacesTool. Create a new model by parsing and validating input data from keyword arguments. Raises ValidationError if the input data cannot be parsed to form a valid model. param query: str [Required]¶ Query for google maps
https://api.python.langchain.com/en/latest/tools/langchain.tools.google_places.tool.GooglePlacesSchema.html
30f46657abff-0
langchain.tools.multion.tool.MultionClientTool¶ class langchain.tools.multion.tool.MultionClientTool(*, name: str = 'Multion_Client', description: str = 'A api to communicate with browser extension multion Useful for automating tasks and actions in the browser Input should be a task and a url.The result is text form of action that was executed in the given url.', args_schema: Optional[Type[BaseModel]] = None, return_direct: bool = False, verbose: bool = False, callbacks: Optional[Union[List[BaseCallbackHandler], BaseCallbackManager]] = None, callback_manager: Optional[BaseCallbackManager] = None, tags: Optional[List[str]] = None, metadata: Optional[Dict[str, Any]] = None, handle_tool_error: Optional[Union[bool, str, Callable[[ToolException], str]]] = False, api_wrapper: MultionClientAPIWrapper = None)[source]¶ Bases: BaseTool Simulates a Browser interacting agent. Create a new model by parsing and validating input data from keyword arguments. Raises ValidationError if the input data cannot be parsed to form a valid model. param api_wrapper: langchain.utilities.multion.MultionClientAPIWrapper [Optional]¶ param args_schema: Optional[Type[BaseModel]] = None¶ Pydantic model class to validate and parse the tool’s input arguments. param callback_manager: Optional[BaseCallbackManager] = None¶ Deprecated. Please use callbacks instead. param callbacks: Callbacks = None¶ Callbacks to be called during tool execution. param description: str = 'A api to communicate with browser extension multion Useful for automating tasks and actions in the browser Input should be a task and a url.The result is text form of action that was executed in the given url.'¶ Used to tell the model how/when/why to use the tool.
https://api.python.langchain.com/en/latest/tools/langchain.tools.multion.tool.MultionClientTool.html
30f46657abff-1
Used to tell the model how/when/why to use the tool. You can provide few-shot examples as a part of the description. param handle_tool_error: Optional[Union[bool, str, Callable[[ToolException], str]]] = False¶ Handle the content of the ToolException thrown. param metadata: Optional[Dict[str, Any]] = None¶ Optional metadata associated with the tool. Defaults to None This metadata will be associated with each call to this tool, and passed as arguments to the handlers defined in callbacks. You can use these to eg identify a specific instance of a tool with its use case. param name: str = 'Multion_Client'¶ The unique name of the tool that clearly communicates its purpose. param return_direct: bool = False¶ Whether to return the tool’s output directly. Setting this to True means that after the tool is called, the AgentExecutor will stop looping. param tags: Optional[List[str]] = None¶ Optional list of tags associated with the tool. Defaults to None These tags will be associated with each call to this tool, and passed as arguments to the handlers defined in callbacks. You can use these to eg identify a specific instance of a tool with its use case. param verbose: bool = False¶ Whether to log the tool’s progress. __call__(tool_input: str, callbacks: Optional[Union[List[BaseCallbackHandler], BaseCallbackManager]] = None) → str¶ Make tool callable. async ainvoke(input: Union[str, Dict], config: Optional[RunnableConfig] = None, **kwargs: Any) → Any¶
https://api.python.langchain.com/en/latest/tools/langchain.tools.multion.tool.MultionClientTool.html
30f46657abff-2
async arun(tool_input: Union[str, Dict], verbose: Optional[bool] = None, start_color: Optional[str] = 'green', color: Optional[str] = 'green', callbacks: Optional[Union[List[BaseCallbackHandler], BaseCallbackManager]] = None, *, tags: Optional[List[str]] = None, metadata: Optional[Dict[str, Any]] = None, **kwargs: Any) → Any¶ Run the tool asynchronously. invoke(input: Union[str, Dict], config: Optional[RunnableConfig] = None, **kwargs: Any) → Any¶ validator raise_deprecation  »  all fields¶ Raise deprecation warning if callback_manager is used. run(tool_input: Union[str, Dict], verbose: Optional[bool] = None, start_color: Optional[str] = 'green', color: Optional[str] = 'green', callbacks: Optional[Union[List[BaseCallbackHandler], BaseCallbackManager]] = None, *, tags: Optional[List[str]] = None, metadata: Optional[Dict[str, Any]] = None, **kwargs: Any) → Any¶ Run the tool. property args: dict¶ property is_single_input: bool¶ Whether the tool only accepts a single input. model Config¶ Bases: object Configuration for this pydantic object. arbitrary_types_allowed = True¶ extra = 'forbid'¶ Examples using MultionClientTool¶ Multion Toolkit
https://api.python.langchain.com/en/latest/tools/langchain.tools.multion.tool.MultionClientTool.html