id
stringlengths
14
16
text
stringlengths
13
2.7k
source
stringlengths
57
178
47931b386666-2
Subclasses should override this method if they can run asynchronously. async arun(tool_input: Union[str, Dict], verbose: Optional[bool] = None, start_color: Optional[str] = 'green', color: Optional[str] = 'green', callbacks: Optional[Union[List[BaseCallbackHandler], BaseCallbackManager]] = None, *, tags: Optional[List[...
lang/api.python.langchain.com/en/latest/tools/langchain.tools.file_management.read.ReadFileTool.html
47931b386666-3
The jsonpatch ops can be applied in order to construct state. async atransform(input: AsyncIterator[Input], config: Optional[RunnableConfig] = None, **kwargs: Optional[Any]) → AsyncIterator[Output]¶ Default implementation of atransform, which buffers input and calls astream. Subclasses should override this method if th...
lang/api.python.langchain.com/en/latest/tools/langchain.tools.file_management.read.ReadFileTool.html
47931b386666-4
classmethod construct(_fields_set: Optional[SetStr] = None, **values: Any) → Model¶ Creates a new model setting __dict__ and __fields_set__ from trusted or pre-validated data. Default values are respected, but no other validation is performed. Behaves as if Config.extra = ‘allow’ was set since it adds all passed values...
lang/api.python.langchain.com/en/latest/tools/langchain.tools.file_management.read.ReadFileTool.html
47931b386666-5
Get the namespace of the langchain object. For example, if the class is langchain.llms.openai.OpenAI, then the namespace is [“langchain”, “llms”, “openai”] get_output_schema(config: Optional[RunnableConfig] = None) → Type[BaseModel]¶ Get a pydantic model that can be used to validate output to the runnable. Runnables th...
lang/api.python.langchain.com/en/latest/tools/langchain.tools.file_management.read.ReadFileTool.html
47931b386666-6
classmethod is_lc_serializable() → bool¶ Is this class serializable? json(*, include: Optional[Union[AbstractSetIntStr, MappingIntStrAny]] = None, exclude: Optional[Union[AbstractSetIntStr, MappingIntStrAny]] = None, by_alias: bool = False, skip_defaults: Optional[bool] = None, exclude_unset: bool = False, exclude_defa...
lang/api.python.langchain.com/en/latest/tools/langchain.tools.file_management.read.ReadFileTool.html
47931b386666-7
run(tool_input: Union[str, Dict], verbose: Optional[bool] = None, start_color: Optional[str] = 'green', color: Optional[str] = 'green', callbacks: Optional[Union[List[BaseCallbackHandler], BaseCallbackManager]] = None, *, tags: Optional[List[str]] = None, metadata: Optional[Dict[str, Any]] = None, run_name: Optional[st...
lang/api.python.langchain.com/en/latest/tools/langchain.tools.file_management.read.ReadFileTool.html
47931b386666-8
Bind config to a Runnable, returning a new Runnable. with_fallbacks(fallbacks: Sequence[Runnable[Input, Output]], *, exceptions_to_handle: Tuple[Type[BaseException], ...] = (<class 'Exception'>,)) → RunnableWithFallbacksT[Input, Output]¶ Add fallbacks to a runnable, returning a new Runnable. Parameters fallbacks – A se...
lang/api.python.langchain.com/en/latest/tools/langchain.tools.file_management.read.ReadFileTool.html
47931b386666-9
between retries stop_after_attempt – The maximum number of attempts to make before giving up Returns A new Runnable that retries the original runnable on exceptions. with_types(*, input_type: Optional[Type[Input]] = None, output_type: Optional[Type[Output]] = None) → Runnable[Input, Output]¶ Bind input and output types...
lang/api.python.langchain.com/en/latest/tools/langchain.tools.file_management.read.ReadFileTool.html
5ffbba165ff0-0
langchain.tools.requests.tool.RequestsPostTool¶ class langchain.tools.requests.tool.RequestsPostTool[source]¶ Bases: BaseRequestsTool, BaseTool Tool for making a POST request to an API endpoint. Create a new model by parsing and validating input data from keyword arguments. Raises ValidationError if the input data cann...
lang/api.python.langchain.com/en/latest/tools/langchain.tools.requests.tool.RequestsPostTool.html
5ffbba165ff0-1
You can use these to eg identify a specific instance of a tool with its use case. param name: str = 'requests_post'¶ The unique name of the tool that clearly communicates its purpose. param requests_wrapper: TextRequestsWrapper [Required]¶ param return_direct: bool = False¶ Whether to return the tool’s output directly....
lang/api.python.langchain.com/en/latest/tools/langchain.tools.requests.tool.RequestsPostTool.html
5ffbba165ff0-2
Subclasses should override this method if they can run asynchronously. async arun(tool_input: Union[str, Dict], verbose: Optional[bool] = None, start_color: Optional[str] = 'green', color: Optional[str] = 'green', callbacks: Optional[Union[List[BaseCallbackHandler], BaseCallbackManager]] = None, *, tags: Optional[List[...
lang/api.python.langchain.com/en/latest/tools/langchain.tools.requests.tool.RequestsPostTool.html
5ffbba165ff0-3
The jsonpatch ops can be applied in order to construct state. async atransform(input: AsyncIterator[Input], config: Optional[RunnableConfig] = None, **kwargs: Optional[Any]) → AsyncIterator[Output]¶ Default implementation of atransform, which buffers input and calls astream. Subclasses should override this method if th...
lang/api.python.langchain.com/en/latest/tools/langchain.tools.requests.tool.RequestsPostTool.html
5ffbba165ff0-4
classmethod construct(_fields_set: Optional[SetStr] = None, **values: Any) → Model¶ Creates a new model setting __dict__ and __fields_set__ from trusted or pre-validated data. Default values are respected, but no other validation is performed. Behaves as if Config.extra = ‘allow’ was set since it adds all passed values...
lang/api.python.langchain.com/en/latest/tools/langchain.tools.requests.tool.RequestsPostTool.html
5ffbba165ff0-5
Get the namespace of the langchain object. For example, if the class is langchain.llms.openai.OpenAI, then the namespace is [“langchain”, “llms”, “openai”] get_output_schema(config: Optional[RunnableConfig] = None) → Type[BaseModel]¶ Get a pydantic model that can be used to validate output to the runnable. Runnables th...
lang/api.python.langchain.com/en/latest/tools/langchain.tools.requests.tool.RequestsPostTool.html
5ffbba165ff0-6
classmethod is_lc_serializable() → bool¶ Is this class serializable? json(*, include: Optional[Union[AbstractSetIntStr, MappingIntStrAny]] = None, exclude: Optional[Union[AbstractSetIntStr, MappingIntStrAny]] = None, by_alias: bool = False, skip_defaults: Optional[bool] = None, exclude_unset: bool = False, exclude_defa...
lang/api.python.langchain.com/en/latest/tools/langchain.tools.requests.tool.RequestsPostTool.html
5ffbba165ff0-7
run(tool_input: Union[str, Dict], verbose: Optional[bool] = None, start_color: Optional[str] = 'green', color: Optional[str] = 'green', callbacks: Optional[Union[List[BaseCallbackHandler], BaseCallbackManager]] = None, *, tags: Optional[List[str]] = None, metadata: Optional[Dict[str, Any]] = None, run_name: Optional[st...
lang/api.python.langchain.com/en/latest/tools/langchain.tools.requests.tool.RequestsPostTool.html
5ffbba165ff0-8
Bind config to a Runnable, returning a new Runnable. with_fallbacks(fallbacks: Sequence[Runnable[Input, Output]], *, exceptions_to_handle: Tuple[Type[BaseException], ...] = (<class 'Exception'>,)) → RunnableWithFallbacksT[Input, Output]¶ Add fallbacks to a runnable, returning a new Runnable. Parameters fallbacks – A se...
lang/api.python.langchain.com/en/latest/tools/langchain.tools.requests.tool.RequestsPostTool.html
5ffbba165ff0-9
between retries stop_after_attempt – The maximum number of attempts to make before giving up Returns A new Runnable that retries the original runnable on exceptions. with_types(*, input_type: Optional[Type[Input]] = None, output_type: Optional[Type[Output]] = None) → Runnable[Input, Output]¶ Bind input and output types...
lang/api.python.langchain.com/en/latest/tools/langchain.tools.requests.tool.RequestsPostTool.html
83b5c61d2d4f-0
langchain.tools.azure_cognitive_services.speech2text.AzureCogsSpeech2TextTool¶ class langchain.tools.azure_cognitive_services.speech2text.AzureCogsSpeech2TextTool[source]¶ Bases: BaseTool Tool that queries the Azure Cognitive Services Speech2Text API. In order to set this up, follow instructions at: https://learn.micro...
lang/api.python.langchain.com/en/latest/tools/langchain.tools.azure_cognitive_services.speech2text.AzureCogsSpeech2TextTool.html
83b5c61d2d4f-1
param name: str = 'azure_cognitive_services_speech2text'¶ The unique name of the tool that clearly communicates its purpose. param return_direct: bool = False¶ Whether to return the tool’s output directly. Setting this to True means that after the tool is called, the AgentExecutor will stop looping. param tags: Optiona...
lang/api.python.langchain.com/en/latest/tools/langchain.tools.azure_cognitive_services.speech2text.AzureCogsSpeech2TextTool.html
83b5c61d2d4f-2
Subclasses should override this method if they can run asynchronously. async arun(tool_input: Union[str, Dict], verbose: Optional[bool] = None, start_color: Optional[str] = 'green', color: Optional[str] = 'green', callbacks: Optional[Union[List[BaseCallbackHandler], BaseCallbackManager]] = None, *, tags: Optional[List[...
lang/api.python.langchain.com/en/latest/tools/langchain.tools.azure_cognitive_services.speech2text.AzureCogsSpeech2TextTool.html
83b5c61d2d4f-3
The jsonpatch ops can be applied in order to construct state. async atransform(input: AsyncIterator[Input], config: Optional[RunnableConfig] = None, **kwargs: Optional[Any]) → AsyncIterator[Output]¶ Default implementation of atransform, which buffers input and calls astream. Subclasses should override this method if th...
lang/api.python.langchain.com/en/latest/tools/langchain.tools.azure_cognitive_services.speech2text.AzureCogsSpeech2TextTool.html
83b5c61d2d4f-4
classmethod construct(_fields_set: Optional[SetStr] = None, **values: Any) → Model¶ Creates a new model setting __dict__ and __fields_set__ from trusted or pre-validated data. Default values are respected, but no other validation is performed. Behaves as if Config.extra = ‘allow’ was set since it adds all passed values...
lang/api.python.langchain.com/en/latest/tools/langchain.tools.azure_cognitive_services.speech2text.AzureCogsSpeech2TextTool.html
83b5c61d2d4f-5
Get the namespace of the langchain object. For example, if the class is langchain.llms.openai.OpenAI, then the namespace is [“langchain”, “llms”, “openai”] get_output_schema(config: Optional[RunnableConfig] = None) → Type[BaseModel]¶ Get a pydantic model that can be used to validate output to the runnable. Runnables th...
lang/api.python.langchain.com/en/latest/tools/langchain.tools.azure_cognitive_services.speech2text.AzureCogsSpeech2TextTool.html
83b5c61d2d4f-6
classmethod is_lc_serializable() → bool¶ Is this class serializable? json(*, include: Optional[Union[AbstractSetIntStr, MappingIntStrAny]] = None, exclude: Optional[Union[AbstractSetIntStr, MappingIntStrAny]] = None, by_alias: bool = False, skip_defaults: Optional[bool] = None, exclude_unset: bool = False, exclude_defa...
lang/api.python.langchain.com/en/latest/tools/langchain.tools.azure_cognitive_services.speech2text.AzureCogsSpeech2TextTool.html
83b5c61d2d4f-7
run(tool_input: Union[str, Dict], verbose: Optional[bool] = None, start_color: Optional[str] = 'green', color: Optional[str] = 'green', callbacks: Optional[Union[List[BaseCallbackHandler], BaseCallbackManager]] = None, *, tags: Optional[List[str]] = None, metadata: Optional[Dict[str, Any]] = None, run_name: Optional[st...
lang/api.python.langchain.com/en/latest/tools/langchain.tools.azure_cognitive_services.speech2text.AzureCogsSpeech2TextTool.html
83b5c61d2d4f-8
Bind config to a Runnable, returning a new Runnable. with_fallbacks(fallbacks: Sequence[Runnable[Input, Output]], *, exceptions_to_handle: Tuple[Type[BaseException], ...] = (<class 'Exception'>,)) → RunnableWithFallbacksT[Input, Output]¶ Add fallbacks to a runnable, returning a new Runnable. Parameters fallbacks – A se...
lang/api.python.langchain.com/en/latest/tools/langchain.tools.azure_cognitive_services.speech2text.AzureCogsSpeech2TextTool.html
83b5c61d2d4f-9
between retries stop_after_attempt – The maximum number of attempts to make before giving up Returns A new Runnable that retries the original runnable on exceptions. with_types(*, input_type: Optional[Type[Input]] = None, output_type: Optional[Type[Output]] = None) → Runnable[Input, Output]¶ Bind input and output types...
lang/api.python.langchain.com/en/latest/tools/langchain.tools.azure_cognitive_services.speech2text.AzureCogsSpeech2TextTool.html
94f26ad67833-0
langchain.tools.wolfram_alpha.tool.WolframAlphaQueryRun¶ class langchain.tools.wolfram_alpha.tool.WolframAlphaQueryRun[source]¶ Bases: BaseTool Tool that queries using the Wolfram Alpha SDK. Create a new model by parsing and validating input data from keyword arguments. Raises ValidationError if the input data cannot b...
lang/api.python.langchain.com/en/latest/tools/langchain.tools.wolfram_alpha.tool.WolframAlphaQueryRun.html
94f26ad67833-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 tags: Optional[List[str]] = None¶ Optional list of tags associated with the tool. Defaults to None These tags will be associated with each...
lang/api.python.langchain.com/en/latest/tools/langchain.tools.wolfram_alpha.tool.WolframAlphaQueryRun.html
94f26ad67833-2
Subclasses should override this method if they can run asynchronously. async arun(tool_input: Union[str, Dict], verbose: Optional[bool] = None, start_color: Optional[str] = 'green', color: Optional[str] = 'green', callbacks: Optional[Union[List[BaseCallbackHandler], BaseCallbackManager]] = None, *, tags: Optional[List[...
lang/api.python.langchain.com/en/latest/tools/langchain.tools.wolfram_alpha.tool.WolframAlphaQueryRun.html
94f26ad67833-3
The jsonpatch ops can be applied in order to construct state. async atransform(input: AsyncIterator[Input], config: Optional[RunnableConfig] = None, **kwargs: Optional[Any]) → AsyncIterator[Output]¶ Default implementation of atransform, which buffers input and calls astream. Subclasses should override this method if th...
lang/api.python.langchain.com/en/latest/tools/langchain.tools.wolfram_alpha.tool.WolframAlphaQueryRun.html
94f26ad67833-4
classmethod construct(_fields_set: Optional[SetStr] = None, **values: Any) → Model¶ Creates a new model setting __dict__ and __fields_set__ from trusted or pre-validated data. Default values are respected, but no other validation is performed. Behaves as if Config.extra = ‘allow’ was set since it adds all passed values...
lang/api.python.langchain.com/en/latest/tools/langchain.tools.wolfram_alpha.tool.WolframAlphaQueryRun.html
94f26ad67833-5
Get the namespace of the langchain object. For example, if the class is langchain.llms.openai.OpenAI, then the namespace is [“langchain”, “llms”, “openai”] get_output_schema(config: Optional[RunnableConfig] = None) → Type[BaseModel]¶ Get a pydantic model that can be used to validate output to the runnable. Runnables th...
lang/api.python.langchain.com/en/latest/tools/langchain.tools.wolfram_alpha.tool.WolframAlphaQueryRun.html
94f26ad67833-6
classmethod is_lc_serializable() → bool¶ Is this class serializable? json(*, include: Optional[Union[AbstractSetIntStr, MappingIntStrAny]] = None, exclude: Optional[Union[AbstractSetIntStr, MappingIntStrAny]] = None, by_alias: bool = False, skip_defaults: Optional[bool] = None, exclude_unset: bool = False, exclude_defa...
lang/api.python.langchain.com/en/latest/tools/langchain.tools.wolfram_alpha.tool.WolframAlphaQueryRun.html
94f26ad67833-7
run(tool_input: Union[str, Dict], verbose: Optional[bool] = None, start_color: Optional[str] = 'green', color: Optional[str] = 'green', callbacks: Optional[Union[List[BaseCallbackHandler], BaseCallbackManager]] = None, *, tags: Optional[List[str]] = None, metadata: Optional[Dict[str, Any]] = None, run_name: Optional[st...
lang/api.python.langchain.com/en/latest/tools/langchain.tools.wolfram_alpha.tool.WolframAlphaQueryRun.html
94f26ad67833-8
Bind config to a Runnable, returning a new Runnable. with_fallbacks(fallbacks: Sequence[Runnable[Input, Output]], *, exceptions_to_handle: Tuple[Type[BaseException], ...] = (<class 'Exception'>,)) → RunnableWithFallbacksT[Input, Output]¶ Add fallbacks to a runnable, returning a new Runnable. Parameters fallbacks – A se...
lang/api.python.langchain.com/en/latest/tools/langchain.tools.wolfram_alpha.tool.WolframAlphaQueryRun.html
94f26ad67833-9
between retries stop_after_attempt – The maximum number of attempts to make before giving up Returns A new Runnable that retries the original runnable on exceptions. with_types(*, input_type: Optional[Type[Input]] = None, output_type: Optional[Type[Output]] = None) → Runnable[Input, Output]¶ Bind input and output types...
lang/api.python.langchain.com/en/latest/tools/langchain.tools.wolfram_alpha.tool.WolframAlphaQueryRun.html
5151f90e3b94-0
langchain.tools.gmail.utils.clean_email_body¶ langchain.tools.gmail.utils.clean_email_body(body: str) → str[source]¶ Clean email body.
lang/api.python.langchain.com/en/latest/tools/langchain.tools.gmail.utils.clean_email_body.html
f67ed35b694b-0
langchain.tools.playwright.utils.create_sync_playwright_browser¶ langchain.tools.playwright.utils.create_sync_playwright_browser(headless: bool = True) → SyncBrowser[source]¶ Create a playwright browser. Parameters headless – Whether to run the browser in headless mode. Defaults to True. Returns The playwright browser....
lang/api.python.langchain.com/en/latest/tools/langchain.tools.playwright.utils.create_sync_playwright_browser.html
c71e6a677727-0
langchain.tools.gmail.base.GmailBaseTool¶ class langchain.tools.gmail.base.GmailBaseTool[source]¶ Bases: BaseTool Base class for Gmail tools. Create a new model by parsing and validating input data from keyword arguments. Raises ValidationError if the input data cannot be parsed to form a valid model. param api_resourc...
lang/api.python.langchain.com/en/latest/tools/langchain.tools.gmail.base.GmailBaseTool.html
c71e6a677727-1
These tags will be associated with each call to this tool, and passed as arguments to the handlers defined in callbacks. You can use these to eg identify a specific instance of a tool with its use case. param verbose: bool = False¶ Whether to log the tool’s progress. __call__(tool_input: str, callbacks: Optional[Union[...
lang/api.python.langchain.com/en/latest/tools/langchain.tools.gmail.base.GmailBaseTool.html
c71e6a677727-2
Run the tool asynchronously. async astream(input: Input, config: Optional[RunnableConfig] = None, **kwargs: Optional[Any]) → AsyncIterator[Output]¶ Default implementation of astream, which calls ainvoke. Subclasses should override this method if they support streaming output. async astream_log(input: Any, config: Optio...
lang/api.python.langchain.com/en/latest/tools/langchain.tools.gmail.base.GmailBaseTool.html
c71e6a677727-3
Default implementation runs invoke in parallel using a thread pool executor. The default implementation of batch works well for IO bound runnables. Subclasses should override this method if they can batch more efficiently; e.g., if the underlying runnable uses an API which supports a batch mode. bind(**kwargs: Any) → R...
lang/api.python.langchain.com/en/latest/tools/langchain.tools.gmail.base.GmailBaseTool.html
c71e6a677727-4
Duplicate a model, optionally choose which fields to include, exclude and change. Parameters include – fields to include in new model exclude – fields to exclude from new model, as with values this takes precedence over include update – values to change/add in the new model. Note: the data is not validated before creat...
lang/api.python.langchain.com/en/latest/tools/langchain.tools.gmail.base.GmailBaseTool.html
c71e6a677727-5
Runnables that leverage the configurable_fields and configurable_alternatives methods will have a dynamic output schema that depends on which configuration the runnable is invoked with. This method allows to get an output schema for a specific configuration. Parameters config – A config to use when generating the schem...
lang/api.python.langchain.com/en/latest/tools/langchain.tools.gmail.base.GmailBaseTool.html
c71e6a677727-6
The unique identifier is a list of strings that describes the path to the object. map() → Runnable[List[Input], List[Output]]¶ Return a new Runnable that maps a list of inputs to a list of outputs, by calling invoke() with each input. classmethod parse_file(path: Union[str, Path], *, content_type: unicode = None, encod...
lang/api.python.langchain.com/en/latest/tools/langchain.tools.gmail.base.GmailBaseTool.html
c71e6a677727-7
to_json_not_implemented() → SerializedNotImplemented¶ transform(input: Iterator[Input], config: Optional[RunnableConfig] = None, **kwargs: Optional[Any]) → Iterator[Output]¶ Default implementation of transform, which buffers input and then calls stream. Subclasses should override this method if they can start producing...
lang/api.python.langchain.com/en/latest/tools/langchain.tools.gmail.base.GmailBaseTool.html
c71e6a677727-8
The Run object contains information about the run, including its id, type, input, output, error, start_time, end_time, and any tags or metadata added to the run. with_retry(*, retry_if_exception_type: ~typing.Tuple[~typing.Type[BaseException], ...] = (<class 'Exception'>,), wait_exponential_jitter: bool = True, stop_af...
lang/api.python.langchain.com/en/latest/tools/langchain.tools.gmail.base.GmailBaseTool.html
c71e6a677727-9
These attributes must be accepted by the constructor. property lc_secrets: Dict[str, str]¶ A map of constructor argument names to secret ids. For example,{“openai_api_key”: “OPENAI_API_KEY”} property output_schema: Type[pydantic.main.BaseModel]¶ The type of output this runnable produces specified as a pydantic model.
lang/api.python.langchain.com/en/latest/tools/langchain.tools.gmail.base.GmailBaseTool.html
64debaf7bdc7-0
langchain.tools.openapi.utils.api_models.APIRequestBodyProperty¶ class langchain.tools.openapi.utils.api_models.APIRequestBodyProperty[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 ...
lang/api.python.langchain.com/en/latest/tools/langchain.tools.openapi.utils.api_models.APIRequestBodyProperty.html
64debaf7bdc7-1
Duplicate a model, optionally choose which fields to include, exclude and change. Parameters include – fields to include in new model exclude – fields to exclude from new model, as with values this takes precedence over include update – values to change/add in the new model. Note: the data is not validated before creat...
lang/api.python.langchain.com/en/latest/tools/langchain.tools.openapi.utils.api_models.APIRequestBodyProperty.html
64debaf7bdc7-2
Generate a JSON representation of the model, include and exclude arguments as per dict(). encoder is an optional function to supply as default to json.dumps(), other arguments as per json.dumps(). classmethod parse_file(path: Union[str, Path], *, content_type: unicode = None, encoding: unicode = 'utf8', proto: Protocol...
lang/api.python.langchain.com/en/latest/tools/langchain.tools.openapi.utils.api_models.APIRequestBodyProperty.html
281316d94047-0
langchain.tools.google_serper.tool.GoogleSerperRun¶ class langchain.tools.google_serper.tool.GoogleSerperRun[source]¶ Bases: BaseTool Tool that queries 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 par...
lang/api.python.langchain.com/en/latest/tools/langchain.tools.google_serper.tool.GoogleSerperRun.html
281316d94047-1
that after the tool is called, the AgentExecutor will stop looping. param tags: Optional[List[str]] = None¶ Optional list of tags associated with the tool. Defaults to None These tags will be associated with each call to this tool, and passed as arguments to the handlers defined in callbacks. You can use these to eg id...
lang/api.python.langchain.com/en/latest/tools/langchain.tools.google_serper.tool.GoogleSerperRun.html
281316d94047-2
Subclasses should override this method if they can run asynchronously. async arun(tool_input: Union[str, Dict], verbose: Optional[bool] = None, start_color: Optional[str] = 'green', color: Optional[str] = 'green', callbacks: Optional[Union[List[BaseCallbackHandler], BaseCallbackManager]] = None, *, tags: Optional[List[...
lang/api.python.langchain.com/en/latest/tools/langchain.tools.google_serper.tool.GoogleSerperRun.html
281316d94047-3
The jsonpatch ops can be applied in order to construct state. async atransform(input: AsyncIterator[Input], config: Optional[RunnableConfig] = None, **kwargs: Optional[Any]) → AsyncIterator[Output]¶ Default implementation of atransform, which buffers input and calls astream. Subclasses should override this method if th...
lang/api.python.langchain.com/en/latest/tools/langchain.tools.google_serper.tool.GoogleSerperRun.html
281316d94047-4
classmethod construct(_fields_set: Optional[SetStr] = None, **values: Any) → Model¶ Creates a new model setting __dict__ and __fields_set__ from trusted or pre-validated data. Default values are respected, but no other validation is performed. Behaves as if Config.extra = ‘allow’ was set since it adds all passed values...
lang/api.python.langchain.com/en/latest/tools/langchain.tools.google_serper.tool.GoogleSerperRun.html
281316d94047-5
Get the namespace of the langchain object. For example, if the class is langchain.llms.openai.OpenAI, then the namespace is [“langchain”, “llms”, “openai”] get_output_schema(config: Optional[RunnableConfig] = None) → Type[BaseModel]¶ Get a pydantic model that can be used to validate output to the runnable. Runnables th...
lang/api.python.langchain.com/en/latest/tools/langchain.tools.google_serper.tool.GoogleSerperRun.html
281316d94047-6
classmethod is_lc_serializable() → bool¶ Is this class serializable? json(*, include: Optional[Union[AbstractSetIntStr, MappingIntStrAny]] = None, exclude: Optional[Union[AbstractSetIntStr, MappingIntStrAny]] = None, by_alias: bool = False, skip_defaults: Optional[bool] = None, exclude_unset: bool = False, exclude_defa...
lang/api.python.langchain.com/en/latest/tools/langchain.tools.google_serper.tool.GoogleSerperRun.html
281316d94047-7
run(tool_input: Union[str, Dict], verbose: Optional[bool] = None, start_color: Optional[str] = 'green', color: Optional[str] = 'green', callbacks: Optional[Union[List[BaseCallbackHandler], BaseCallbackManager]] = None, *, tags: Optional[List[str]] = None, metadata: Optional[Dict[str, Any]] = None, run_name: Optional[st...
lang/api.python.langchain.com/en/latest/tools/langchain.tools.google_serper.tool.GoogleSerperRun.html
281316d94047-8
Bind config to a Runnable, returning a new Runnable. with_fallbacks(fallbacks: Sequence[Runnable[Input, Output]], *, exceptions_to_handle: Tuple[Type[BaseException], ...] = (<class 'Exception'>,)) → RunnableWithFallbacksT[Input, Output]¶ Add fallbacks to a runnable, returning a new Runnable. Parameters fallbacks – A se...
lang/api.python.langchain.com/en/latest/tools/langchain.tools.google_serper.tool.GoogleSerperRun.html
281316d94047-9
between retries stop_after_attempt – The maximum number of attempts to make before giving up Returns A new Runnable that retries the original runnable on exceptions. with_types(*, input_type: Optional[Type[Input]] = None, output_type: Optional[Type[Output]] = None) → Runnable[Input, Output]¶ Bind input and output types...
lang/api.python.langchain.com/en/latest/tools/langchain.tools.google_serper.tool.GoogleSerperRun.html
7519a5f0838d-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
lang/api.python.langchain.com/en/latest/tools/langchain.tools.plugin.marshal_spec.html
d62234dd2650-0
langchain.tools.playwright.extract_text.ExtractTextTool¶ class langchain.tools.playwright.extract_text.ExtractTextTool[source]¶ Bases: BaseBrowserTool Tool for extracting all the text on the current webpage. Create a new model by parsing and validating input data from keyword arguments. Raises ValidationError if the in...
lang/api.python.langchain.com/en/latest/tools/langchain.tools.playwright.extract_text.ExtractTextTool.html
d62234dd2650-1
param sync_browser: Optional['SyncBrowser'] = None¶ param tags: Optional[List[str]] = None¶ Optional list of tags associated with the tool. Defaults to None These tags will be associated with each call to this tool, and passed as arguments to the handlers defined in callbacks. You can use these to eg identify a specifi...
lang/api.python.langchain.com/en/latest/tools/langchain.tools.playwright.extract_text.ExtractTextTool.html
d62234dd2650-2
Subclasses should override this method if they can run asynchronously. async arun(tool_input: Union[str, Dict], verbose: Optional[bool] = None, start_color: Optional[str] = 'green', color: Optional[str] = 'green', callbacks: Optional[Union[List[BaseCallbackHandler], BaseCallbackManager]] = None, *, tags: Optional[List[...
lang/api.python.langchain.com/en/latest/tools/langchain.tools.playwright.extract_text.ExtractTextTool.html
d62234dd2650-3
The jsonpatch ops can be applied in order to construct state. async atransform(input: AsyncIterator[Input], config: Optional[RunnableConfig] = None, **kwargs: Optional[Any]) → AsyncIterator[Output]¶ Default implementation of atransform, which buffers input and calls astream. Subclasses should override this method if th...
lang/api.python.langchain.com/en/latest/tools/langchain.tools.playwright.extract_text.ExtractTextTool.html
d62234dd2650-4
classmethod construct(_fields_set: Optional[SetStr] = None, **values: Any) → Model¶ Creates a new model setting __dict__ and __fields_set__ from trusted or pre-validated data. Default values are respected, but no other validation is performed. Behaves as if Config.extra = ‘allow’ was set since it adds all passed values...
lang/api.python.langchain.com/en/latest/tools/langchain.tools.playwright.extract_text.ExtractTextTool.html
d62234dd2650-5
Instantiate the tool. classmethod from_orm(obj: Any) → Model¶ get_input_schema(config: Optional[RunnableConfig] = None) → Type[BaseModel]¶ The tool’s input schema. classmethod get_lc_namespace() → List[str]¶ Get the namespace of the langchain object. For example, if the class is langchain.llms.openai.OpenAI, then the n...
lang/api.python.langchain.com/en/latest/tools/langchain.tools.playwright.extract_text.ExtractTextTool.html
d62234dd2650-6
classmethod is_lc_serializable() → bool¶ Is this class serializable? json(*, include: Optional[Union[AbstractSetIntStr, MappingIntStrAny]] = None, exclude: Optional[Union[AbstractSetIntStr, MappingIntStrAny]] = None, by_alias: bool = False, skip_defaults: Optional[bool] = None, exclude_unset: bool = False, exclude_defa...
lang/api.python.langchain.com/en/latest/tools/langchain.tools.playwright.extract_text.ExtractTextTool.html
d62234dd2650-7
run(tool_input: Union[str, Dict], verbose: Optional[bool] = None, start_color: Optional[str] = 'green', color: Optional[str] = 'green', callbacks: Optional[Union[List[BaseCallbackHandler], BaseCallbackManager]] = None, *, tags: Optional[List[str]] = None, metadata: Optional[Dict[str, Any]] = None, run_name: Optional[st...
lang/api.python.langchain.com/en/latest/tools/langchain.tools.playwright.extract_text.ExtractTextTool.html
d62234dd2650-8
Bind config to a Runnable, returning a new Runnable. with_fallbacks(fallbacks: Sequence[Runnable[Input, Output]], *, exceptions_to_handle: Tuple[Type[BaseException], ...] = (<class 'Exception'>,)) → RunnableWithFallbacksT[Input, Output]¶ Add fallbacks to a runnable, returning a new Runnable. Parameters fallbacks – A se...
lang/api.python.langchain.com/en/latest/tools/langchain.tools.playwright.extract_text.ExtractTextTool.html
d62234dd2650-9
between retries stop_after_attempt – The maximum number of attempts to make before giving up Returns A new Runnable that retries the original runnable on exceptions. with_types(*, input_type: Optional[Type[Input]] = None, output_type: Optional[Type[Output]] = None) → Runnable[Input, Output]¶ Bind input and output types...
lang/api.python.langchain.com/en/latest/tools/langchain.tools.playwright.extract_text.ExtractTextTool.html
3254f6b0f44e-0
langchain.tools.ddg_search.tool.DuckDuckGoSearchResults¶ class langchain.tools.ddg_search.tool.DuckDuckGoSearchResults[source]¶ Bases: BaseTool Tool that queries the DuckDuckGo search API and gets back json. Create a new model by parsing and validating input data from keyword arguments. Raises ValidationError if the in...
lang/api.python.langchain.com/en/latest/tools/langchain.tools.ddg_search.tool.DuckDuckGoSearchResults.html
3254f6b0f44e-1
You can use these to eg identify a specific instance of a tool with its use case. 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 T...
lang/api.python.langchain.com/en/latest/tools/langchain.tools.ddg_search.tool.DuckDuckGoSearchResults.html
3254f6b0f44e-2
the runnable did not implement a native async version of invoke. Subclasses should override this method if they can run asynchronously. async arun(tool_input: Union[str, Dict], verbose: Optional[bool] = None, start_color: Optional[str] = 'green', color: Optional[str] = 'green', callbacks: Optional[Union[List[BaseCallba...
lang/api.python.langchain.com/en/latest/tools/langchain.tools.ddg_search.tool.DuckDuckGoSearchResults.html
3254f6b0f44e-3
The jsonpatch ops can be applied in order to construct state. async atransform(input: AsyncIterator[Input], config: Optional[RunnableConfig] = None, **kwargs: Optional[Any]) → AsyncIterator[Output]¶ Default implementation of atransform, which buffers input and calls astream. Subclasses should override this method if th...
lang/api.python.langchain.com/en/latest/tools/langchain.tools.ddg_search.tool.DuckDuckGoSearchResults.html
3254f6b0f44e-4
classmethod construct(_fields_set: Optional[SetStr] = None, **values: Any) → Model¶ Creates a new model setting __dict__ and __fields_set__ from trusted or pre-validated data. Default values are respected, but no other validation is performed. Behaves as if Config.extra = ‘allow’ was set since it adds all passed values...
lang/api.python.langchain.com/en/latest/tools/langchain.tools.ddg_search.tool.DuckDuckGoSearchResults.html
3254f6b0f44e-5
Get the namespace of the langchain object. For example, if the class is langchain.llms.openai.OpenAI, then the namespace is [“langchain”, “llms”, “openai”] get_output_schema(config: Optional[RunnableConfig] = None) → Type[BaseModel]¶ Get a pydantic model that can be used to validate output to the runnable. Runnables th...
lang/api.python.langchain.com/en/latest/tools/langchain.tools.ddg_search.tool.DuckDuckGoSearchResults.html
3254f6b0f44e-6
classmethod is_lc_serializable() → bool¶ Is this class serializable? json(*, include: Optional[Union[AbstractSetIntStr, MappingIntStrAny]] = None, exclude: Optional[Union[AbstractSetIntStr, MappingIntStrAny]] = None, by_alias: bool = False, skip_defaults: Optional[bool] = None, exclude_unset: bool = False, exclude_defa...
lang/api.python.langchain.com/en/latest/tools/langchain.tools.ddg_search.tool.DuckDuckGoSearchResults.html
3254f6b0f44e-7
run(tool_input: Union[str, Dict], verbose: Optional[bool] = None, start_color: Optional[str] = 'green', color: Optional[str] = 'green', callbacks: Optional[Union[List[BaseCallbackHandler], BaseCallbackManager]] = None, *, tags: Optional[List[str]] = None, metadata: Optional[Dict[str, Any]] = None, run_name: Optional[st...
lang/api.python.langchain.com/en/latest/tools/langchain.tools.ddg_search.tool.DuckDuckGoSearchResults.html
3254f6b0f44e-8
Bind config to a Runnable, returning a new Runnable. with_fallbacks(fallbacks: Sequence[Runnable[Input, Output]], *, exceptions_to_handle: Tuple[Type[BaseException], ...] = (<class 'Exception'>,)) → RunnableWithFallbacksT[Input, Output]¶ Add fallbacks to a runnable, returning a new Runnable. Parameters fallbacks – A se...
lang/api.python.langchain.com/en/latest/tools/langchain.tools.ddg_search.tool.DuckDuckGoSearchResults.html
3254f6b0f44e-9
between retries stop_after_attempt – The maximum number of attempts to make before giving up Returns A new Runnable that retries the original runnable on exceptions. with_types(*, input_type: Optional[Type[Input]] = None, output_type: Optional[Type[Output]] = None) → Runnable[Input, Output]¶ Bind input and output types...
lang/api.python.langchain.com/en/latest/tools/langchain.tools.ddg_search.tool.DuckDuckGoSearchResults.html
a24f31ea1d2b-0
langchain.tools.ainetwork.app.AppOperationType¶ class langchain.tools.ainetwork.app.AppOperationType(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]¶ Type of app operation as enumerator. SET_ADMIN = 'SET_ADMIN'¶ GET_CONFIG = 'GET_CONFIG'¶
lang/api.python.langchain.com/en/latest/tools/langchain.tools.ainetwork.app.AppOperationType.html
afdad22ff750-0
langchain.tools.yahoo_finance_news.YahooFinanceNewsTool¶ class langchain.tools.yahoo_finance_news.YahooFinanceNewsTool[source]¶ Bases: BaseTool Tool that searches financial news on Yahoo Finance. Create a new model by parsing and validating input data from keyword arguments. Raises ValidationError if the input data can...
lang/api.python.langchain.com/en/latest/tools/langchain.tools.yahoo_finance_news.YahooFinanceNewsTool.html
afdad22ff750-1
that after the tool is called, the AgentExecutor will stop looping. param tags: Optional[List[str]] = None¶ Optional list of tags associated with the tool. Defaults to None These tags will be associated with each call to this tool, and passed as arguments to the handlers defined in callbacks. You can use these to eg id...
lang/api.python.langchain.com/en/latest/tools/langchain.tools.yahoo_finance_news.YahooFinanceNewsTool.html
afdad22ff750-2
Subclasses should override this method if they can run asynchronously. async arun(tool_input: Union[str, Dict], verbose: Optional[bool] = None, start_color: Optional[str] = 'green', color: Optional[str] = 'green', callbacks: Optional[Union[List[BaseCallbackHandler], BaseCallbackManager]] = None, *, tags: Optional[List[...
lang/api.python.langchain.com/en/latest/tools/langchain.tools.yahoo_finance_news.YahooFinanceNewsTool.html
afdad22ff750-3
The jsonpatch ops can be applied in order to construct state. async atransform(input: AsyncIterator[Input], config: Optional[RunnableConfig] = None, **kwargs: Optional[Any]) → AsyncIterator[Output]¶ Default implementation of atransform, which buffers input and calls astream. Subclasses should override this method if th...
lang/api.python.langchain.com/en/latest/tools/langchain.tools.yahoo_finance_news.YahooFinanceNewsTool.html
afdad22ff750-4
classmethod construct(_fields_set: Optional[SetStr] = None, **values: Any) → Model¶ Creates a new model setting __dict__ and __fields_set__ from trusted or pre-validated data. Default values are respected, but no other validation is performed. Behaves as if Config.extra = ‘allow’ was set since it adds all passed values...
lang/api.python.langchain.com/en/latest/tools/langchain.tools.yahoo_finance_news.YahooFinanceNewsTool.html
afdad22ff750-5
Get the namespace of the langchain object. For example, if the class is langchain.llms.openai.OpenAI, then the namespace is [“langchain”, “llms”, “openai”] get_output_schema(config: Optional[RunnableConfig] = None) → Type[BaseModel]¶ Get a pydantic model that can be used to validate output to the runnable. Runnables th...
lang/api.python.langchain.com/en/latest/tools/langchain.tools.yahoo_finance_news.YahooFinanceNewsTool.html
afdad22ff750-6
classmethod is_lc_serializable() → bool¶ Is this class serializable? json(*, include: Optional[Union[AbstractSetIntStr, MappingIntStrAny]] = None, exclude: Optional[Union[AbstractSetIntStr, MappingIntStrAny]] = None, by_alias: bool = False, skip_defaults: Optional[bool] = None, exclude_unset: bool = False, exclude_defa...
lang/api.python.langchain.com/en/latest/tools/langchain.tools.yahoo_finance_news.YahooFinanceNewsTool.html
afdad22ff750-7
run(tool_input: Union[str, Dict], verbose: Optional[bool] = None, start_color: Optional[str] = 'green', color: Optional[str] = 'green', callbacks: Optional[Union[List[BaseCallbackHandler], BaseCallbackManager]] = None, *, tags: Optional[List[str]] = None, metadata: Optional[Dict[str, Any]] = None, run_name: Optional[st...
lang/api.python.langchain.com/en/latest/tools/langchain.tools.yahoo_finance_news.YahooFinanceNewsTool.html
afdad22ff750-8
Bind config to a Runnable, returning a new Runnable. with_fallbacks(fallbacks: Sequence[Runnable[Input, Output]], *, exceptions_to_handle: Tuple[Type[BaseException], ...] = (<class 'Exception'>,)) → RunnableWithFallbacksT[Input, Output]¶ Add fallbacks to a runnable, returning a new Runnable. Parameters fallbacks – A se...
lang/api.python.langchain.com/en/latest/tools/langchain.tools.yahoo_finance_news.YahooFinanceNewsTool.html
afdad22ff750-9
between retries stop_after_attempt – The maximum number of attempts to make before giving up Returns A new Runnable that retries the original runnable on exceptions. with_types(*, input_type: Optional[Type[Input]] = None, output_type: Optional[Type[Output]] = None) → Runnable[Input, Output]¶ Bind input and output types...
lang/api.python.langchain.com/en/latest/tools/langchain.tools.yahoo_finance_news.YahooFinanceNewsTool.html
d728cdc22cf0-0
langchain.tools.playwright.base.lazy_import_playwright_browsers¶ langchain.tools.playwright.base.lazy_import_playwright_browsers() → Tuple[Type[AsyncBrowser], Type[SyncBrowser]][source]¶ Lazy import playwright browsers. Returns AsyncBrowser and SyncBrowser classes. Return type Tuple[Type[AsyncBrowser], Type[SyncBrowser...
lang/api.python.langchain.com/en/latest/tools/langchain.tools.playwright.base.lazy_import_playwright_browsers.html
662821bff215-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]¶ Supported Image Models for generation. DALL_E = 'dall-e'¶ STABLE_DIFFUSION = 'stable-diffusion'¶
lang/api.python.langchain.com/en/latest/tools/langchain.tools.steamship_image_generation.tool.ModelName.html
5c427f0b3846-0
langchain.tools.base.Tool¶ class langchain.tools.base.Tool[source]¶ Bases: BaseTool Tool that takes in function or coroutine directly. Initialize tool. param args_schema: Optional[Type[pydantic.main.BaseModel]] = None¶ Pydantic model class to validate and parse the tool’s input arguments. param callback_manager: Option...
lang/api.python.langchain.com/en/latest/tools/langchain.tools.base.Tool.html
5c427f0b3846-1
that after the tool is called, the AgentExecutor will stop looping. param tags: Optional[List[str]] = None¶ Optional list of tags associated with the tool. Defaults to None These tags will be associated with each call to this tool, and passed as arguments to the handlers defined in callbacks. You can use these to eg id...
lang/api.python.langchain.com/en/latest/tools/langchain.tools.base.Tool.html
5c427f0b3846-2
Subclasses should override this method if they can run asynchronously. async arun(tool_input: Union[str, Dict], verbose: Optional[bool] = None, start_color: Optional[str] = 'green', color: Optional[str] = 'green', callbacks: Optional[Union[List[BaseCallbackHandler], BaseCallbackManager]] = None, *, tags: Optional[List[...
lang/api.python.langchain.com/en/latest/tools/langchain.tools.base.Tool.html