id
stringlengths
14
15
text
stringlengths
35
2.51k
source
stringlengths
61
154
74dde3e2deb2-2
that after the tool is called, the AgentExecutor will stop looping. param template: str = '\n{query}\nDouble check the {dialect} query above for common mistakes, including:\n- Using NOT IN with NULL values\n- Using UNION when UNION ALL should have been used\n- Using BETWEEN for exclusive ranges\n- Data type mismatch in predicates\n- Properly quoting identifiers\n- Using the correct number of arguments for functions\n- Casting to the correct data type\n- Using the proper columns for joins\n\nIf there are any of the above mistakes, rewrite the query. If there are no mistakes, just reproduce the original query.'¶ 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 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, **kwargs: Any) → Any¶ Run the tool asynchronously. validator initialize_llm_chain  »  all fields[source]¶ 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, **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
https://api.python.langchain.com/en/latest/tools/langchain.tools.sql_database.tool.QuerySQLCheckerTool.html
74dde3e2deb2-3
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.sql_database.tool.QuerySQLCheckerTool.html
e397cd953078-0
langchain.tools.file_management.utils.FileValidationError¶ class langchain.tools.file_management.utils.FileValidationError[source]¶ Bases: ValueError Error for paths outside the root directory. add_note()¶ Exception.add_note(note) – add a note to the exception with_traceback()¶ Exception.with_traceback(tb) – set self.__traceback__ to tb and return self. args¶
https://api.python.langchain.com/en/latest/tools/langchain.tools.file_management.utils.FileValidationError.html
92677419272a-0
langchain.tools.google_serper.tool.GoogleSerperRun¶ class langchain.tools.google_serper.tool.GoogleSerperRun(*, name: str = 'google_serper', description: str = 'A low-cost Google Search API.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, handle_tool_error: Optional[Union[bool, str, Callable[[ToolException], str]]] = False, api_wrapper: GoogleSerperAPIWrapper)[source]¶ Bases: BaseTool Tool that adds the capability to query the Serper.dev 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_serper.GoogleSerperAPIWrapper [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 low-cost Google Search API.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.
https://api.python.langchain.com/en/latest/tools/langchain.tools.google_serper.tool.GoogleSerperRun.html
92677419272a-1
Handle the content of the ToolException thrown. param name: str = 'google_serper'¶ 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 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 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, **kwargs: Any) → Any¶ Run the tool asynchronously. 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, **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_serper.tool.GoogleSerperRun.html
033664028385-0
langchain.tools.playwright.current_page.CurrentWebPageTool¶ class langchain.tools.playwright.current_page.CurrentWebPageTool(*, name: str = 'current_webpage', description: str = 'Returns the URL of the current page', 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, 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 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 = 'Returns the URL of the current page'¶ 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.playwright.current_page.CurrentWebPageTool.html
033664028385-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 name: str = 'current_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 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 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, **kwargs: Any) → Any¶ Run the tool asynchronously. classmethod from_browser(sync_browser: Optional[SyncBrowser] = None, async_browser: Optional[AsyncBrowser] = None) → BaseBrowserTool¶ Instantiate the tool. 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, **kwargs: Any) → Any¶ Run the tool. validator validate_browser_provided  »  all fields¶ Check that the arguments are valid.
https://api.python.langchain.com/en/latest/tools/langchain.tools.playwright.current_page.CurrentWebPageTool.html
033664028385-2
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.current_page.CurrentWebPageTool.html
db1725315bef-0
langchain.tools.azure_cognitive_services.image_analysis.AzureCogsImageAnalysisTool¶ class langchain.tools.azure_cognitive_services.image_analysis.AzureCogsImageAnalysisTool(*, name: str = 'azure_cognitive_services_image_analysis', description: str = 'A wrapper around Azure Cognitive Services Image Analysis. Useful for when you need to analyze images. Input should be a url to an image.', 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, handle_tool_error: Optional[Union[bool, str, Callable[[ToolException], str]]] = False, azure_cogs_key: str = '', azure_cogs_endpoint: str = '', vision_service: Any = None, analysis_options: Any = None)[source]¶ Bases: BaseTool Tool that queries the Azure Cognitive Services Image Analysis API. In order to set this up, follow instructions at: https://learn.microsoft.com/en-us/azure/cognitive-services/computer-vision/quickstarts-sdk/image-analysis-client-library-40 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 wrapper around Azure Cognitive Services Image Analysis. Useful for when you need to analyze images. Input should be a url to an image.'¶
https://api.python.langchain.com/en/latest/tools/langchain.tools.azure_cognitive_services.image_analysis.AzureCogsImageAnalysisTool.html
db1725315bef-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 name: str = 'azure_cognitive_services_image_analysis'¶ 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 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 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, **kwargs: Any) → Any¶ Run the tool asynchronously. 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, **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¶
https://api.python.langchain.com/en/latest/tools/langchain.tools.azure_cognitive_services.image_analysis.AzureCogsImageAnalysisTool.html
db1725315bef-2
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.image_analysis.AzureCogsImageAnalysisTool.html
3268aa84d9c1-0
langchain.tools.gmail.search.GmailSearch¶ class langchain.tools.gmail.search.GmailSearch(*, name: str = 'search_gmail', description: str = 'Use this tool to search for email messages or threads. The input must be a valid Gmail query. The output is a JSON list of the requested resource.', args_schema: ~typing.Type[~langchain.tools.gmail.search.SearchArgsSchema] = <class 'langchain.tools.gmail.search.SearchArgsSchema'>, 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, handle_tool_error: ~typing.Optional[~typing.Union[bool, str, ~typing.Callable[[~langchain.tools.base.ToolException], str]]] = False, api_resource: Resource = None)[source]¶ Bases: GmailBaseTool 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.search.SearchArgsSchema] = <class 'langchain.tools.gmail.search.SearchArgsSchema'>¶ 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 = 'Use this tool to search for email messages or threads. The input must be a valid Gmail query. The output is a JSON list of the requested resource.'¶ Used to tell the model how/when/why to use the tool.
https://api.python.langchain.com/en/latest/tools/langchain.tools.gmail.search.GmailSearch.html
3268aa84d9c1-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 name: str = 'search_gmail'¶ 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 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 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, **kwargs: Any) → Any¶ Run the tool asynchronously. classmethod from_api_resource(api_resource: Resource) → GmailBaseTool¶ 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, **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
https://api.python.langchain.com/en/latest/tools/langchain.tools.gmail.search.GmailSearch.html
3268aa84d9c1-2
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.search.GmailSearch.html
b18320dca8b1-0
langchain.tools.spark_sql.tool.QueryCheckerTool¶ class langchain.tools.spark_sql.tool.QueryCheckerTool(*, name: str = 'query_checker_sql_db', description: str = '\n    Use this tool to double check if your query is correct before executing it.\n    Always use this tool before executing a query with query_sql_db!\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, handle_tool_error: Optional[Union[bool, str, Callable[[ToolException], str]]] = False, db: SparkSQL, template: str = '\n{query}\nDouble check the Spark SQL query above for common mistakes, including:\n- Using NOT IN with NULL values\n- Using UNION when UNION ALL should have been used\n- Using BETWEEN for exclusive ranges\n- Data type mismatch in predicates\n- Properly quoting identifiers\n- Using the correct number of arguments for functions\n- Casting to the correct data type\n- Using the proper columns for joins\n\nIf there are any of the above mistakes, rewrite the query. If there are no mistakes, just reproduce the original query.', llm: BaseLanguageModel, llm_chain: LLMChain)[source]¶ Bases: BaseSparkSQLTool, BaseTool Use an LLM to check if a query is correct. Adapted from https://www.patterns.app/blog/2023/01/18/crunchbot-sql-analyst-gpt/ 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¶
https://api.python.langchain.com/en/latest/tools/langchain.tools.spark_sql.tool.QueryCheckerTool.html
b18320dca8b1-1
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: SparkSQL [Required]¶ param description: str = '\n    Use this tool to double check if your query is correct before executing it.\n    Always use this tool before executing a query with query_sql_db!\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 llm: langchain.base_language.BaseLanguageModel [Required]¶ param llm_chain: langchain.chains.llm.LLMChain [Required]¶ param name: str = 'query_checker_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.
https://api.python.langchain.com/en/latest/tools/langchain.tools.spark_sql.tool.QueryCheckerTool.html
b18320dca8b1-2
that after the tool is called, the AgentExecutor will stop looping. param template: str = '\n{query}\nDouble check the Spark SQL query above for common mistakes, including:\n- Using NOT IN with NULL values\n- Using UNION when UNION ALL should have been used\n- Using BETWEEN for exclusive ranges\n- Data type mismatch in predicates\n- Properly quoting identifiers\n- Using the correct number of arguments for functions\n- Casting to the correct data type\n- Using the proper columns for joins\n\nIf there are any of the above mistakes, rewrite the query. If there are no mistakes, just reproduce the original query.'¶ 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 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, **kwargs: Any) → Any¶ Run the tool asynchronously. validator initialize_llm_chain  »  all fields[source]¶ 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, **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
https://api.python.langchain.com/en/latest/tools/langchain.tools.spark_sql.tool.QueryCheckerTool.html
b18320dca8b1-3
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.QueryCheckerTool.html
d2a7d34c706a-0
langchain.tools.file_management.move.MoveFileTool¶ class langchain.tools.file_management.move.MoveFileTool(*, name: str = 'move_file', description: str = 'Move or rename a file from one location to another', args_schema: ~typing.Type[~pydantic.main.BaseModel] = <class 'langchain.tools.file_management.move.FileMoveInput'>, 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, 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 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.move.FileMoveInput'>¶ 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 = 'Move or rename a file from one location to another'¶ 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.file_management.move.MoveFileTool.html
d2a7d34c706a-1
Handle the content of the ToolException thrown. param name: str = 'move_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 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 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, **kwargs: Any) → Any¶ Run the tool asynchronously. get_relative_path(file_path: str) → Path¶ Get the relative path, returning an error if unsupported. 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, **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.file_management.move.MoveFileTool.html
99371a870c59-0
langchain.tools.sleep.tool.SleepInput¶ class langchain.tools.sleep.tool.SleepInput(*, sleep_time: int)[source]¶ Bases: BaseModel Input for CopyFileTool. 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 sleep_time: int [Required]¶ Time to sleep in seconds
https://api.python.langchain.com/en/latest/tools/langchain.tools.sleep.tool.SleepInput.html
36c8d9e36f36-0
langchain.tools.plugin.marshal_spec¶ langchain.tools.plugin.marshal_spec(txt: str) → dict[source]¶ Convert the yaml or json serialized spec to a dict. Parameters txt – The yaml or json serialized spec. Returns The spec as a dict. Return type dict
https://api.python.langchain.com/en/latest/tools/langchain.tools.plugin.marshal_spec.html
672e9f4323b8-0
langchain.tools.file_management.utils.BaseFileToolMixin¶ class langchain.tools.file_management.utils.BaseFileToolMixin(*, root_dir: Optional[str] = None)[source]¶ Bases: BaseModel Mixin for file system 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 root_dir: Optional[str] = None¶ The final path will be chosen relative to root_dir if specified. get_relative_path(file_path: str) → Path[source]¶ Get the relative path, returning an error if unsupported.
https://api.python.langchain.com/en/latest/tools/langchain.tools.file_management.utils.BaseFileToolMixin.html
1525e192bb17-0
langchain.tools.steamship_image_generation.utils.make_image_public¶ langchain.tools.steamship_image_generation.utils.make_image_public(client: Steamship, block: Block) → str[source]¶ Upload a block to a signed URL and return the public URL.
https://api.python.langchain.com/en/latest/tools/langchain.tools.steamship_image_generation.utils.make_image_public.html
c60cf09eacba-0
langchain.tools.openapi.utils.api_models.APIRequestBodyProperty¶ class langchain.tools.openapi.utils.api_models.APIRequestBodyProperty(*, name: str, required: bool, type: Union[str, Type, tuple, None, Enum] = None, default: Optional[Any] = None, description: Optional[str] = None, properties: List[APIRequestBodyProperty], references_used: List[str])[source]¶ Bases: APIPropertyBase A model for a request body property. 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 default: Optional[Any] = None¶ The default value of the property. param description: Optional[str] = None¶ The description of the property. param name: str [Required]¶ The name of the property. param properties: List[langchain.tools.openapi.utils.api_models.APIRequestBodyProperty] [Required]¶ The sub-properties of the property. param references_used: List[str] [Required]¶ The references used by the property. param required: bool [Required]¶ Whether the property is required. param type: Union[str, Type, tuple, None, enum.Enum] = None¶ The type of the property. Either a primitive type, a component/parameter type, or an array or ‘object’ (dict) of the above. classmethod from_schema(schema: Schema, name: str, required: bool, spec: OpenAPISpec, references_used: Optional[List[str]] = None) → APIRequestBodyProperty[source]¶ Recursively populate from an OpenAPI Schema.
https://api.python.langchain.com/en/latest/tools/langchain.tools.openapi.utils.api_models.APIRequestBodyProperty.html
53edeb5e59c6-0
langchain.tools.gmail.utils.import_google¶ langchain.tools.gmail.utils.import_google() → Tuple[Request, Credentials][source]¶ Import google libraries. Returns Request and Credentials classes. Return type Tuple[Request, Credentials]
https://api.python.langchain.com/en/latest/tools/langchain.tools.gmail.utils.import_google.html
93ea682428d0-0
langchain.tools.file_management.move.FileMoveInput¶ class langchain.tools.file_management.move.FileMoveInput(*, source_path: str, destination_path: str)[source]¶ Bases: BaseModel Input for MoveFileTool. 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 destination_path: str [Required]¶ New path for the moved file param source_path: str [Required]¶ Path of the file to move
https://api.python.langchain.com/en/latest/tools/langchain.tools.file_management.move.FileMoveInput.html
97176da2fdec-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, 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 name: str = 'list_tables_powerbi'¶ The unique name of the tool that clearly communicates its purpose. param powerbi: langchain.utilities.powerbi.PowerBIDataset [Required]¶
https://api.python.langchain.com/en/latest/tools/langchain.tools.powerbi.tool.ListPowerBITool.html
97176da2fdec-1
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 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 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, **kwargs: Any) → Any¶ Run the tool asynchronously. 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, **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
1eceeb577c76-0
langchain.tools.office365.utils.clean_body¶ langchain.tools.office365.utils.clean_body(body: str) → str[source]¶ Clean body of a message or event.
https://api.python.langchain.com/en/latest/tools/langchain.tools.office365.utils.clean_body.html
206f4cd86f2b-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
eb1ca4a6cd7a-0
langchain.tools.base.tool¶ langchain.tools.base.tool(*args: Union[str, Callable], return_direct: bool = False, args_schema: Optional[Type[BaseModel]] = None, infer_schema: bool = True) → Callable[source]¶ Make tools out of functions, can be used with or without arguments. Parameters *args – The arguments to the tool. return_direct – Whether to return directly from the tool rather than continuing the agent loop. args_schema – optional argument schema for user to specify infer_schema – Whether to infer the schema of the arguments from the function’s signature. This also makes the resultant tool accept a dictionary input to its run() function. Requires: Function must be of type (str) -> str Function must have a docstring Examples @tool def search_api(query: str) -> str: # Searches the API for the query. return @tool("search", return_direct=True) def search_api(query: str) -> str: # Searches the API for the query. return
https://api.python.langchain.com/en/latest/tools/langchain.tools.base.tool.html
70a403793bfe-0
langchain.tools.python.tool.sanitize_input¶ langchain.tools.python.tool.sanitize_input(query: str) → str[source]¶ Sanitize input to the python REPL. Remove whitespace, backtick & python (if llm mistakes python console as terminal) Parameters query – The query to sanitize Returns The sanitized query Return type str
https://api.python.langchain.com/en/latest/tools/langchain.tools.python.tool.sanitize_input.html
d1d39709b7c6-0
langchain.tools.gmail.get_thread.GetThreadSchema¶ class langchain.tools.gmail.get_thread.GetThreadSchema(*, thread_id: str)[source]¶ Bases: BaseModel 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
8ccb8e5aaf94-0
langchain.tools.convert_to_openai.format_tool_to_openai_function¶ langchain.tools.convert_to_openai.format_tool_to_openai_function(tool: BaseTool) → FunctionDescription[source]¶ Format tool into the OpenAI function API.
https://api.python.langchain.com/en/latest/tools/langchain.tools.convert_to_openai.format_tool_to_openai_function.html
2a4c3e7740bb-0
langchain.tools.file_management.read.ReadFileInput¶ class langchain.tools.file_management.read.ReadFileInput(*, file_path: str)[source]¶ Bases: BaseModel Input for ReadFileTool. 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 file_path: str [Required]¶ name of file
https://api.python.langchain.com/en/latest/tools/langchain.tools.file_management.read.ReadFileInput.html
f8804bd496f7-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, handle_tool_error: ~typing.Optional[~typing.Union[bool, str, ~typing.Callable[[~langchain.tools.base.ToolException], str]]] = False, api_resource: Resource = None)[source]¶ Bases: GmailBaseTool 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. 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.
https://api.python.langchain.com/en/latest/tools/langchain.tools.gmail.create_draft.GmailCreateDraft.html
f8804bd496f7-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 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 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 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, **kwargs: Any) → Any¶ Run the tool asynchronously. classmethod from_api_resource(api_resource: Resource) → GmailBaseTool¶ 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, **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.gmail.create_draft.GmailCreateDraft.html
f8804bd496f7-2
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
5aa9b62d19dc-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, handle_tool_error: Optional[Union[bool, str, Callable[[ToolException], str]]] = False, search_wrapper: BraveSearchWrapper)[source]¶ Bases: BaseTool 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 name: str = 'brave_search'¶ The unique name of the tool that clearly communicates its purpose. param return_direct: bool = False¶
https://api.python.langchain.com/en/latest/tools/langchain.tools.brave_search.tool.BraveSearch.html
5aa9b62d19dc-1
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 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 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, **kwargs: Any) → Any¶ Run the tool asynchronously. classmethod from_api_key(api_key: str, search_kwargs: Optional[dict] = None, **kwargs: Any) → BraveSearch[source]¶ 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, **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.brave_search.tool.BraveSearch.html
ba8dfa8d2f87-0
langchain.tools.vectorstore.tool.VectorStoreQATool¶ class langchain.tools.vectorstore.tool.VectorStoreQATool(*, 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, handle_tool_error: Optional[Union[bool, str, Callable[[ToolException], str]]] = False, vectorstore: VectorStore, llm: BaseLanguageModel = None)[source]¶ Bases: BaseVectorStoreTool, BaseTool Tool for the VectorDBQA chain. To be initialized with name and chain. 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 [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 llm: langchain.base_language.BaseLanguageModel [Optional]¶ 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
https://api.python.langchain.com/en/latest/tools/langchain.tools.vectorstore.tool.VectorStoreQATool.html
ba8dfa8d2f87-1
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 vectorstore: langchain.vectorstores.base.VectorStore [Required]¶ 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 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, **kwargs: Any) → Any¶ Run the tool asynchronously. static get_description(name: str, description: str) → str[source]¶ 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, **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.vectorstore.tool.VectorStoreQATool.html
f37bca9b2ff9-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
22731d6c8a6b-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, 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. param handle_tool_error: Optional[Union[bool, str, Callable[[ToolException], str]]] = False¶
https://api.python.langchain.com/en/latest/tools/langchain.tools.requests.tool.RequestsDeleteTool.html
22731d6c8a6b-1
Handle the content of the ToolException thrown. param name: str = 'requests_delete'¶ The unique name of the tool that clearly communicates its purpose. param requests_wrapper: langchain.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 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 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, **kwargs: Any) → Any¶ Run the tool asynchronously. 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, **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
066b18e788b6-0
langchain.tools.playwright.base.BaseBrowserTool¶ class langchain.tools.playwright.base.BaseBrowserTool(*, 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, handle_tool_error: Optional[Union[bool, str, Callable[[ToolException], str]]] = False, sync_browser: Optional['SyncBrowser'] = None, async_browser: Optional['AsyncBrowser'] = None)[source]¶ Bases: BaseTool Base class for browser 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 args_schema: Optional[Type[BaseModel]] = None¶ 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 [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 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.
https://api.python.langchain.com/en/latest/tools/langchain.tools.playwright.base.BaseBrowserTool.html
066b18e788b6-1
that after the tool is called, the AgentExecutor will stop looping. param sync_browser: Optional['SyncBrowser'] = 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 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, **kwargs: Any) → Any¶ Run the tool asynchronously. classmethod from_browser(sync_browser: Optional[SyncBrowser] = None, async_browser: Optional[AsyncBrowser] = None) → BaseBrowserTool[source]¶ Instantiate the tool. 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, **kwargs: Any) → Any¶ Run the tool. validator validate_browser_provided  »  all fields[source]¶ 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.base.BaseBrowserTool.html
f1155e79f94e-0
langchain.tools.pubmed.tool.PubmedQueryRun¶ class langchain.tools.pubmed.tool.PubmedQueryRun(*, name: str = 'PubMed', description: str = 'A wrapper around PubMed.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 PubMed.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, handle_tool_error: Optional[Union[bool, str, Callable[[ToolException], str]]] = False, api_wrapper: PubMedAPIWrapper = None)[source]¶ Bases: BaseTool Tool that adds the capability to search using the PubMed 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.pupmed.PubMedAPIWrapper [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 wrapper around PubMed.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 PubMed.org. Input should be a search query.'¶ Used to tell the model how/when/why to use the tool.
https://api.python.langchain.com/en/latest/tools/langchain.tools.pubmed.tool.PubmedQueryRun.html
f1155e79f94e-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 name: str = 'PubMed'¶ 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 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 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, **kwargs: Any) → Any¶ Run the tool asynchronously. 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, **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.pubmed.tool.PubmedQueryRun.html
32c7925001eb-0
langchain.tools.metaphor_search.tool.MetaphorSearchResults¶ class langchain.tools.metaphor_search.tool.MetaphorSearchResults(*, name: str = 'metaphor_search_results_json', description: str = 'A wrapper around Metaphor Search. Input should be a Metaphor-optimized 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, handle_tool_error: Optional[Union[bool, str, Callable[[ToolException], str]]] = False, api_wrapper: MetaphorSearchAPIWrapper)[source]¶ Bases: BaseTool Tool that has capability to query the Metaphor Search API and get 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.metaphor_search.MetaphorSearchAPIWrapper [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 Metaphor Search. Input should be a Metaphor-optimized query. Output is a JSON array of the query results'¶ 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.metaphor_search.tool.MetaphorSearchResults.html
32c7925001eb-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 name: str = 'metaphor_search_results_json'¶ 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 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 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, **kwargs: Any) → Any¶ Run the tool asynchronously. 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, **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.metaphor_search.tool.MetaphorSearchResults.html
730970706ab4-0
langchain.tools.playwright.click.ClickTool¶ class langchain.tools.playwright.click.ClickTool(*, name: str = 'click_element', description: str = 'Click on an element with the given CSS selector', args_schema: ~typing.Type[~pydantic.main.BaseModel] = <class 'langchain.tools.playwright.click.ClickToolInput'>, 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, 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, visible_only: bool = True, playwright_strict: bool = False, playwright_timeout: float = 1000)[source]¶ Bases: BaseBrowserTool 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 'langchain.tools.playwright.click.ClickToolInput'>¶ 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 = 'Click on an element with the given CSS selector'¶ Used to tell the model how/when/why to use the tool.
https://api.python.langchain.com/en/latest/tools/langchain.tools.playwright.click.ClickTool.html
730970706ab4-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 name: str = 'click_element'¶ The unique name of the tool that clearly communicates its purpose. param playwright_strict: bool = False¶ Whether to employ Playwright’s strict mode when clicking on elements. param playwright_timeout: float = 1000¶ Timeout (in ms) for Playwright to wait for element to be ready. 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 verbose: bool = False¶ Whether to log the tool’s progress. param visible_only: bool = True¶ Whether to consider only visible elements. __call__(tool_input: str, callbacks: Optional[Union[List[BaseCallbackHandler], BaseCallbackManager]] = None) → str¶ Make tool callable. 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, **kwargs: Any) → Any¶ Run the tool asynchronously. classmethod from_browser(sync_browser: Optional[SyncBrowser] = None, async_browser: Optional[AsyncBrowser] = None) → BaseBrowserTool¶ Instantiate the tool. validator raise_deprecation  »  all fields¶ Raise deprecation warning if callback_manager is used.
https://api.python.langchain.com/en/latest/tools/langchain.tools.playwright.click.ClickTool.html
730970706ab4-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, **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.click.ClickTool.html
89403e9bc8bf-0
langchain.tools.json.tool.JsonGetValueTool¶ class langchain.tools.json.tool.JsonGetValueTool(*, name: str = 'json_spec_get_value', description: str = '\n    Can be used to see value in string format 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, handle_tool_error: Optional[Union[bool, str, Callable[[ToolException], str]]] = False, spec: JsonSpec)[source]¶ Bases: BaseTool Tool for getting a value 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. param description: str = '\n    Can be used to see value in string format 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    '¶
https://api.python.langchain.com/en/latest/tools/langchain.tools.json.tool.JsonGetValueTool.html
89403e9bc8bf-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 name: str = 'json_spec_get_value'¶ 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 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 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, **kwargs: Any) → Any¶ Run the tool asynchronously. 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, **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.
https://api.python.langchain.com/en/latest/tools/langchain.tools.json.tool.JsonGetValueTool.html
89403e9bc8bf-2
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.JsonGetValueTool.html
cb9ea32bfcba-0
langchain.tools.openapi.utils.api_models.APIProperty¶ class langchain.tools.openapi.utils.api_models.APIProperty(*, name: str, required: bool, type: Union[str, Type, tuple, None, Enum] = None, default: Optional[Any] = None, description: Optional[str] = None, location: APIPropertyLocation)[source]¶ Bases: APIPropertyBase A model for a property in the query, path, header, or cookie params. 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 default: Optional[Any] = None¶ The default value of the property. param description: Optional[str] = None¶ The description of the property. param location: langchain.tools.openapi.utils.api_models.APIPropertyLocation [Required]¶ The path/how it’s being passed to the endpoint. param name: str [Required]¶ The name of the property. param required: bool [Required]¶ Whether the property is required. param type: Union[str, Type, tuple, None, enum.Enum] = None¶ The type of the property. Either a primitive type, a component/parameter type, or an array or ‘object’ (dict) of the above. classmethod from_parameter(parameter: Parameter, spec: OpenAPISpec) → APIProperty[source]¶ Instantiate from an OpenAPI Parameter. static is_supported_location(location: str) → bool[source]¶ Return whether the provided location is supported.
https://api.python.langchain.com/en/latest/tools/langchain.tools.openapi.utils.api_models.APIProperty.html
82d6e1df5a60-0
langchain.tools.shell.tool.ShellTool¶ class langchain.tools.shell.tool.ShellTool(*, name: str = 'terminal', description: str = 'Run shell commands on this Linux machine.', args_schema: ~typing.Type[~pydantic.main.BaseModel] = <class 'langchain.tools.shell.tool.ShellInput'>, 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, handle_tool_error: ~typing.Optional[~typing.Union[bool, str, ~typing.Callable[[~langchain.tools.base.ToolException], str]]] = False, process: ~langchain.utilities.bash.BashProcess = None)[source]¶ Bases: BaseTool Tool to run shell commands. 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.shell.tool.ShellInput'>¶ Schema for 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 = 'Run shell commands on this Linux machine.'¶ Description of tool. param handle_tool_error: Optional[Union[bool, str, Callable[[ToolException], str]]] = False¶ Handle the content of the ToolException thrown. param name: str = 'terminal'¶ Name of tool. param process: langchain.utilities.bash.BashProcess [Optional]¶
https://api.python.langchain.com/en/latest/tools/langchain.tools.shell.tool.ShellTool.html
82d6e1df5a60-1
param process: langchain.utilities.bash.BashProcess [Optional]¶ Bash process to run commands. 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 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 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, **kwargs: Any) → Any¶ Run the tool asynchronously. 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, **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.shell.tool.ShellTool.html
84e7d1762288-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, 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'¶ 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.playwright.navigate_back.NavigateBackTool.html
84e7d1762288-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 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 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 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, **kwargs: Any) → Any¶ Run the tool asynchronously. classmethod from_browser(sync_browser: Optional[SyncBrowser] = None, async_browser: Optional[AsyncBrowser] = None) → BaseBrowserTool¶ Instantiate the tool. 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, **kwargs: Any) → Any¶ Run the tool. validator validate_browser_provided  »  all fields¶ Check that the arguments are valid.
https://api.python.langchain.com/en/latest/tools/langchain.tools.playwright.navigate_back.NavigateBackTool.html
84e7d1762288-2
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
0150e1f35ebc-0
langchain.tools.searx_search.tool.SearxSearchResults¶ class langchain.tools.searx_search.tool.SearxSearchResults(*, name: str = 'Searx Search Results', description: str = 'A meta search engine.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, handle_tool_error: Optional[Union[bool, str, Callable[[ToolException], str]]] = False, wrapper: SearxSearchWrapper, num_results: int = 4, kwargs: dict = None, **extra_data: Any)[source]¶ Bases: BaseTool Tool that has the capability to query a Searx instance and get 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 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 meta search engine.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. You can provide few-shot examples as a part of the description.
https://api.python.langchain.com/en/latest/tools/langchain.tools.searx_search.tool.SearxSearchResults.html
0150e1f35ebc-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 kwargs: dict [Optional]¶ param name: str = 'Searx Search Results'¶ 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 verbose: bool = False¶ Whether to log the tool’s progress. param wrapper: langchain.utilities.searx_search.SearxSearchWrapper [Required]¶ __call__(tool_input: str, callbacks: Optional[Union[List[BaseCallbackHandler], BaseCallbackManager]] = None) → str¶ Make tool callable. 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, **kwargs: Any) → Any¶ Run the tool asynchronously. 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, **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]¶
https://api.python.langchain.com/en/latest/tools/langchain.tools.searx_search.tool.SearxSearchResults.html
0150e1f35ebc-2
Whether the tool only accepts a single input. model Config[source]¶ Bases: object Pydantic config. extra = 'allow'¶
https://api.python.langchain.com/en/latest/tools/langchain.tools.searx_search.tool.SearxSearchResults.html
4b674f6b815e-0
langchain.tools.office365.utils.authenticate¶ langchain.tools.office365.utils.authenticate() → Account[source]¶ Authenticate using the Microsoft Grah API
https://api.python.langchain.com/en/latest/tools/langchain.tools.office365.utils.authenticate.html
e1ccd9131523-0
langchain.tools.gmail.search.SearchArgsSchema¶ class langchain.tools.gmail.search.SearchArgsSchema(*, query: str, resource: Resource = Resource.MESSAGES, max_results: int = 10)[source]¶ Bases: BaseModel 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 max_results: int = 10¶ The maximum number of results to return. param query: str [Required]¶ The Gmail query. Example filters include from:sender, to:recipient, subject:subject, -filtered_term, in:folder, is:important|read|starred, after:year/mo/date, before:year/mo/date, label:label_name “exact phrase”. Search newer/older than using d (day), m (month), and y (year): newer_than:2d, older_than:1y. Attachments with extension example: filename:pdf. Multiple term matching example: from:amy OR from:david. param resource: langchain.tools.gmail.search.Resource = Resource.MESSAGES¶ Whether to search for threads or messages.
https://api.python.langchain.com/en/latest/tools/langchain.tools.gmail.search.SearchArgsSchema.html
a5485d183132-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, 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. You can provide few-shot examples as a part of the description.
https://api.python.langchain.com/en/latest/tools/langchain.tools.python.tool.PythonAstREPLTool.html
a5485d183132-1
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 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 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 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, **kwargs: Any) → Any¶ Run the tool asynchronously. 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, **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¶
https://api.python.langchain.com/en/latest/tools/langchain.tools.python.tool.PythonAstREPLTool.html
a5485d183132-2
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
dcf900c6e1a4-0
langchain.tools.python.tool.PythonREPLTool¶ class langchain.tools.python.tool.PythonREPLTool(*, name: str = 'Python_REPL', description: str = 'A Python shell. Use this to execute python commands. Input should be a valid python command. If you want to see the output of a value, you should print it out with `print(...)`.', 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, handle_tool_error: Optional[Union[bool, str, Callable[[ToolException], str]]] = False, python_repl: PythonREPL = 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. If you want to see the output of a value, you should print it out with `print(...)`.'¶ 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.python.tool.PythonREPLTool.html
dcf900c6e1a4-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 name: str = 'Python_REPL'¶ The unique name of the tool that clearly communicates its purpose. param python_repl: langchain.utilities.python.PythonREPL [Optional]¶ 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 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 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, **kwargs: Any) → Any¶ Run the tool asynchronously. 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, **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.
https://api.python.langchain.com/en/latest/tools/langchain.tools.python.tool.PythonREPLTool.html
dcf900c6e1a4-2
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.PythonREPLTool.html
f625f7b900c0-0
langchain.tools.ddg_search.tool.DuckDuckGoSearchTool¶ langchain.tools.ddg_search.tool.DuckDuckGoSearchTool(*args: Any, **kwargs: Any) → DuckDuckGoSearchRun[source]¶ Deprecated. Use DuckDuckGoSearchRun instead. Parameters *args – **kwargs – Returns DuckDuckGoSearchRun
https://api.python.langchain.com/en/latest/tools/langchain.tools.ddg_search.tool.DuckDuckGoSearchTool.html
bb26435ecae9-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
bb26435ecae9-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
bb26435ecae9-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
bb26435ecae9-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
bb26435ecae9-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
bb26435ecae9-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
bb26435ecae9-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
bb26435ecae9-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
bb26435ecae9-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
bb26435ecae9-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
fd38e8d5ae13-0
langchain.tools.ddg_search.tool.DuckDuckGoSearchResults¶ class langchain.tools.ddg_search.tool.DuckDuckGoSearchResults(*, name: str = 'DuckDuckGo Results JSON', description: str = 'A wrapper around Duck Duck Go 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, handle_tool_error: Optional[Union[bool, str, Callable[[ToolException], str]]] = False, num_results: int = 4, api_wrapper: DuckDuckGoSearchAPIWrapper = None)[source]¶ Bases: BaseTool Tool that queries the Duck Duck Go Search API and get 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.duckduckgo_search.DuckDuckGoSearchAPIWrapper [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 wrapper around Duck Duck Go 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.ddg_search.tool.DuckDuckGoSearchResults.html
fd38e8d5ae13-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 name: str = 'DuckDuckGo 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 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 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, **kwargs: Any) → Any¶ Run the tool asynchronously. 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, **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.
https://api.python.langchain.com/en/latest/tools/langchain.tools.ddg_search.tool.DuckDuckGoSearchResults.html
fd38e8d5ae13-2
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.ddg_search.tool.DuckDuckGoSearchResults.html
d71f6b6e0033-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, 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
d71f6b6e0033-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 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 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 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, **kwargs: Any) → Any¶ Run the tool asynchronously. validator raise_deprecation  »  all fields¶ Raise deprecation warning if callback_manager is used.
https://api.python.langchain.com/en/latest/tools/langchain.tools.azure_cognitive_services.speech2text.AzureCogsSpeech2TextTool.html
d71f6b6e0033-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, **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
7a7b95307c68-0
langchain.tools.playwright.extract_text.ExtractTextTool¶ class langchain.tools.playwright.extract_text.ExtractTextTool(*, name: str = 'extract_text', description: str = 'Extract all the text on the current webpage', 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, 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 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 = 'Extract all the text on the current webpage'¶ 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.playwright.extract_text.ExtractTextTool.html
7a7b95307c68-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 name: str = 'extract_text'¶ 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 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 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, **kwargs: Any) → Any¶ Run the tool asynchronously. validator check_acheck_bs_importrgs  »  all fields[source]¶ Check that the arguments are valid. classmethod from_browser(sync_browser: Optional[SyncBrowser] = None, async_browser: Optional[AsyncBrowser] = None) → BaseBrowserTool¶ Instantiate the tool. 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, **kwargs: Any) → Any¶
https://api.python.langchain.com/en/latest/tools/langchain.tools.playwright.extract_text.ExtractTextTool.html
7a7b95307c68-2
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.extract_text.ExtractTextTool.html
2ffd37c1bfb2-0
langchain.tools.vectorstore.tool.BaseVectorStoreTool¶ class langchain.tools.vectorstore.tool.BaseVectorStoreTool(*, vectorstore: VectorStore, llm: BaseLanguageModel = None)[source]¶ Bases: BaseModel Base class for tools that use a VectorStore. 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 llm: langchain.base_language.BaseLanguageModel [Optional]¶ param vectorstore: langchain.vectorstores.base.VectorStore [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.vectorstore.tool.BaseVectorStoreTool.html
e26cb54516a5-0
langchain.tools.azure_cognitive_services.utils.download_audio_from_url¶ langchain.tools.azure_cognitive_services.utils.download_audio_from_url(audio_url: str) → str[source]¶ Download audio from url to local.
https://api.python.langchain.com/en/latest/tools/langchain.tools.azure_cognitive_services.utils.download_audio_from_url.html
3a117cf4c9e4-0
langchain.tools.gmail.get_thread.GmailGetThread¶ class langchain.tools.gmail.get_thread.GmailGetThread(*, name: str = 'get_gmail_thread', description: str = 'Use this tool to search for email messages. The input must be a valid Gmail query. The output is a JSON list of messages.', args_schema: ~typing.Type[~langchain.tools.gmail.get_thread.GetThreadSchema] = <class 'langchain.tools.gmail.get_thread.GetThreadSchema'>, 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, handle_tool_error: ~typing.Optional[~typing.Union[bool, str, ~typing.Callable[[~langchain.tools.base.ToolException], str]]] = False, api_resource: Resource = None)[source]¶ Bases: GmailBaseTool 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.get_thread.GetThreadSchema] = <class 'langchain.tools.gmail.get_thread.GetThreadSchema'>¶ 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 = 'Use this tool to search for email messages. The input must be a valid Gmail query. The output is a JSON list of messages.'¶
https://api.python.langchain.com/en/latest/tools/langchain.tools.gmail.get_thread.GmailGetThread.html
3a117cf4c9e4-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 name: str = 'get_gmail_thread'¶ 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 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 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, **kwargs: Any) → Any¶ Run the tool asynchronously. classmethod from_api_resource(api_resource: Resource) → GmailBaseTool¶ 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, **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
https://api.python.langchain.com/en/latest/tools/langchain.tools.gmail.get_thread.GmailGetThread.html
3a117cf4c9e4-2
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.get_thread.GmailGetThread.html