id
stringlengths
14
15
text
stringlengths
13
2.7k
source
stringlengths
60
181
4942b231d795-7
classmethod update_forward_refs(**localns: Any) → None¶ Try to update ForwardRefs on fields based on this Model, globalns and localns. classmethod validate(value: Any) → Model¶ with_config(config: Optional[RunnableConfig] = None, **kwargs: Any) → Runnable[Input, Output]¶ Bind config to a Runnable, returning a new Runna...
https://api.python.langchain.com/en/latest/plan_and_execute/langchain_experimental.plan_and_execute.schema.PlanOutputParser.html
4942b231d795-8
added to the run. with_retry(*, retry_if_exception_type: ~typing.Tuple[~typing.Type[BaseException], ...] = (<class 'Exception'>,), wait_exponential_jitter: bool = True, stop_after_attempt: int = 3) → Runnable[Input, Output]¶ Create a new Runnable that retries the original runnable on exceptions. Parameters retry_if_exc...
https://api.python.langchain.com/en/latest/plan_and_execute/langchain_experimental.plan_and_execute.schema.PlanOutputParser.html
4942b231d795-9
property output_schema: Type[pydantic.main.BaseModel]¶ The type of output this runnable produces specified as a pydantic model.
https://api.python.langchain.com/en/latest/plan_and_execute/langchain_experimental.plan_and_execute.schema.PlanOutputParser.html
fa4e0bce7ccb-0
langchain_community.tools.edenai.audio_text_to_speech.EdenAiTextToSpeechTool¶ class langchain_community.tools.edenai.audio_text_to_speech.EdenAiTextToSpeechTool[source]¶ Bases: EdenaiTool Tool that queries the Eden AI Text to speech API. for api reference check edenai documentation: https://docs.edenai.co/reference/aud...
https://api.python.langchain.com/en/latest/tools/langchain_community.tools.edenai.audio_text_to_speech.EdenAiTextToSpeechTool.html
fa4e0bce7ccb-1
Handle the content of the ToolException thrown. param is_async: bool = False¶ param language: Optional[str] = 'en'¶ language of the text passed to the model. param metadata: Optional[Dict[str, Any]] = None¶ Optional metadata associated with the tool. Defaults to None This metadata will be associated with each call to t...
https://api.python.langchain.com/en/latest/tools/langchain_community.tools.edenai.audio_text_to_speech.EdenAiTextToSpeechTool.html
fa4e0bce7ccb-2
param volume: Optional[int] = None¶ __call__(tool_input: str, callbacks: Optional[Union[List[BaseCallbackHandler], BaseCallbackManager]] = None) → str¶ Make tool callable. async abatch(inputs: List[Input], config: Optional[Union[RunnableConfig, List[RunnableConfig]]] = None, *, return_exceptions: bool = False, **kwargs...
https://api.python.langchain.com/en/latest/tools/langchain_community.tools.edenai.audio_text_to_speech.EdenAiTextToSpeechTool.html
fa4e0bce7ccb-3
Subclasses should override this method if they support streaming output. async astream_log(input: Any, config: Optional[RunnableConfig] = None, *, diff: bool = True, with_streamed_output_list: bool = True, include_names: Optional[Sequence[str]] = None, include_types: Optional[Sequence[str]] = None, include_tags: Option...
https://api.python.langchain.com/en/latest/tools/langchain_community.tools.edenai.audio_text_to_speech.EdenAiTextToSpeechTool.html
fa4e0bce7ccb-4
Default implementation of atransform, which buffers input and calls astream. Subclasses should override this method if they can start producing output while input is still being generated. batch(inputs: List[Input], config: Optional[Union[RunnableConfig, List[RunnableConfig]]] = None, *, return_exceptions: bool = False...
https://api.python.langchain.com/en/latest/tools/langchain_community.tools.edenai.audio_text_to_speech.EdenAiTextToSpeechTool.html
fa4e0bce7ccb-5
Default values are respected, but no other validation is performed. Behaves as if Config.extra = ‘allow’ was set since it adds all passed values copy(*, include: Optional[Union[AbstractSetIntStr, MappingIntStrAny]] = None, exclude: Optional[Union[AbstractSetIntStr, MappingIntStrAny]] = None, update: Optional[DictStrAny...
https://api.python.langchain.com/en/latest/tools/langchain_community.tools.edenai.audio_text_to_speech.EdenAiTextToSpeechTool.html
fa4e0bce7ccb-6
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 that leverage the configurable_fields and configurable_alternatives methods will have a dynamic output schema tha...
https://api.python.langchain.com/en/latest/tools/langchain_community.tools.edenai.audio_text_to_speech.EdenAiTextToSpeechTool.html
fa4e0bce7ccb-7
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 lc_id() → List[str]¶ A unique identifier for this class for serialization purposes. The unique identifier is a ...
https://api.python.langchain.com/en/latest/tools/langchain_community.tools.edenai.audio_text_to_speech.EdenAiTextToSpeechTool.html
fa4e0bce7ccb-8
stream(input: Input, config: Optional[RunnableConfig] = None, **kwargs: Optional[Any]) → Iterator[Output]¶ Default implementation of stream, which calls invoke. Subclasses should override this method if they support streaming output. to_json() → Union[SerializedConstructor, SerializedNotImplemented]¶ to_json_not_implem...
https://api.python.langchain.com/en/latest/tools/langchain_community.tools.edenai.audio_text_to_speech.EdenAiTextToSpeechTool.html
fa4e0bce7ccb-9
Bind lifecycle listeners to a Runnable, returning a new Runnable. on_start: Called before the runnable starts running, with the Run object. on_end: Called after the runnable finishes running, with the Run object. on_error: Called if the runnable throws an error, with the Run object. The Run object contains information ...
https://api.python.langchain.com/en/latest/tools/langchain_community.tools.edenai.audio_text_to_speech.EdenAiTextToSpeechTool.html
fa4e0bce7ccb-10
property input_schema: Type[pydantic.main.BaseModel]¶ The type of input this runnable accepts specified as a pydantic model. property is_single_input: bool¶ Whether the tool only accepts a single input. property lc_attributes: Dict¶ List of attribute names that should be included in the serialized kwargs. These attribu...
https://api.python.langchain.com/en/latest/tools/langchain_community.tools.edenai.audio_text_to_speech.EdenAiTextToSpeechTool.html
77c2d4b52028-0
langchain_community.tools.metaphor_search.tool.MetaphorSearchResults¶ class langchain_community.tools.metaphor_search.tool.MetaphorSearchResults[source]¶ Bases: BaseTool Tool that queries the Metaphor Search API and gets back json. Create a new model by parsing and validating input data from keyword arguments. Raises V...
https://api.python.langchain.com/en/latest/tools/langchain_community.tools.metaphor_search.tool.MetaphorSearchResults.html
77c2d4b52028-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...
https://api.python.langchain.com/en/latest/tools/langchain_community.tools.metaphor_search.tool.MetaphorSearchResults.html
77c2d4b52028-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[...
https://api.python.langchain.com/en/latest/tools/langchain_community.tools.metaphor_search.tool.MetaphorSearchResults.html
77c2d4b52028-3
Parameters input – The input to the runnable. config – The config to use for the runnable. diff – Whether to yield diffs between each step, or the current state. with_streamed_output_list – Whether to yield the streamed_output list. include_names – Only include logs with these names. include_types – Only include logs w...
https://api.python.langchain.com/en/latest/tools/langchain_community.tools.metaphor_search.tool.MetaphorSearchResults.html
77c2d4b52028-4
Parameters include – A list of fields to include in the config schema. Returns A pydantic model that can be used to validate config. configurable_alternatives(which: ConfigurableField, *, default_key: str = 'default', prefix_keys: bool = False, **kwargs: Union[Runnable[Input, Output], Callable[[], Runnable[Input, Outpu...
https://api.python.langchain.com/en/latest/tools/langchain_community.tools.metaphor_search.tool.MetaphorSearchResults.html
77c2d4b52028-5
deep – set to True to make a deep copy of the model Returns new model instance dict(*, 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, ex...
https://api.python.langchain.com/en/latest/tools/langchain_community.tools.metaphor_search.tool.MetaphorSearchResults.html
77c2d4b52028-6
config – A config to use when invoking the runnable. The config supports standard keys like ‘tags’, ‘metadata’ for tracing purposes, ‘max_concurrency’ for controlling how much work to do in parallel, and other keys. Please refer to the RunnableConfig for more details. Returns The output of the runnable. classmethod is_...
https://api.python.langchain.com/en/latest/tools/langchain_community.tools.metaphor_search.tool.MetaphorSearchResults.html
77c2d4b52028-7
classmethod parse_obj(obj: Any) → Model¶ classmethod parse_raw(b: Union[str, bytes], *, content_type: unicode = None, encoding: unicode = 'utf8', proto: Protocol = None, allow_pickle: bool = False) → Model¶ run(tool_input: Union[str, Dict], verbose: Optional[bool] = None, start_color: Optional[str] = 'green', color: Op...
https://api.python.langchain.com/en/latest/tools/langchain_community.tools.metaphor_search.tool.MetaphorSearchResults.html
77c2d4b52028-8
classmethod validate(value: Any) → Model¶ with_config(config: Optional[RunnableConfig] = None, **kwargs: Any) → Runnable[Input, Output]¶ Bind config to a Runnable, returning a new Runnable. with_fallbacks(fallbacks: Sequence[Runnable[Input, Output]], *, exceptions_to_handle: Tuple[Type[BaseException], ...] = (<class 'E...
https://api.python.langchain.com/en/latest/tools/langchain_community.tools.metaphor_search.tool.MetaphorSearchResults.html
77c2d4b52028-9
Create a new Runnable that retries the original runnable on exceptions. Parameters retry_if_exception_type – A tuple of exception types to retry on wait_exponential_jitter – Whether to add jitter to the wait time between retries stop_after_attempt – The maximum number of attempts to make before giving up Returns A new ...
https://api.python.langchain.com/en/latest/tools/langchain_community.tools.metaphor_search.tool.MetaphorSearchResults.html
79acb1bcf336-0
langchain_community.tools.dataforseo_api_search.tool.DataForSeoAPISearchResults¶ class langchain_community.tools.dataforseo_api_search.tool.DataForSeoAPISearchResults[source]¶ Bases: BaseTool Tool that queries the DataForSeo Google Search API and get back json. Create a new model by parsing and validating input data fr...
https://api.python.langchain.com/en/latest/tools/langchain_community.tools.dataforseo_api_search.tool.DataForSeoAPISearchResults.html
79acb1bcf336-1
param name: str = 'DataForSeo-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 tags: Optional[List[str]] ...
https://api.python.langchain.com/en/latest/tools/langchain_community.tools.dataforseo_api_search.tool.DataForSeoAPISearchResults.html
79acb1bcf336-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[...
https://api.python.langchain.com/en/latest/tools/langchain_community.tools.dataforseo_api_search.tool.DataForSeoAPISearchResults.html
79acb1bcf336-3
Parameters input – The input to the runnable. config – The config to use for the runnable. diff – Whether to yield diffs between each step, or the current state. with_streamed_output_list – Whether to yield the streamed_output list. include_names – Only include logs with these names. include_types – Only include logs w...
https://api.python.langchain.com/en/latest/tools/langchain_community.tools.dataforseo_api_search.tool.DataForSeoAPISearchResults.html
79acb1bcf336-4
Parameters include – A list of fields to include in the config schema. Returns A pydantic model that can be used to validate config. configurable_alternatives(which: ConfigurableField, *, default_key: str = 'default', prefix_keys: bool = False, **kwargs: Union[Runnable[Input, Output], Callable[[], Runnable[Input, Outpu...
https://api.python.langchain.com/en/latest/tools/langchain_community.tools.dataforseo_api_search.tool.DataForSeoAPISearchResults.html
79acb1bcf336-5
deep – set to True to make a deep copy of the model Returns new model instance dict(*, 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, ex...
https://api.python.langchain.com/en/latest/tools/langchain_community.tools.dataforseo_api_search.tool.DataForSeoAPISearchResults.html
79acb1bcf336-6
config – A config to use when invoking the runnable. The config supports standard keys like ‘tags’, ‘metadata’ for tracing purposes, ‘max_concurrency’ for controlling how much work to do in parallel, and other keys. Please refer to the RunnableConfig for more details. Returns The output of the runnable. classmethod is_...
https://api.python.langchain.com/en/latest/tools/langchain_community.tools.dataforseo_api_search.tool.DataForSeoAPISearchResults.html
79acb1bcf336-7
classmethod parse_obj(obj: Any) → Model¶ classmethod parse_raw(b: Union[str, bytes], *, content_type: unicode = None, encoding: unicode = 'utf8', proto: Protocol = None, allow_pickle: bool = False) → Model¶ run(tool_input: Union[str, Dict], verbose: Optional[bool] = None, start_color: Optional[str] = 'green', color: Op...
https://api.python.langchain.com/en/latest/tools/langchain_community.tools.dataforseo_api_search.tool.DataForSeoAPISearchResults.html
79acb1bcf336-8
classmethod validate(value: Any) → Model¶ with_config(config: Optional[RunnableConfig] = None, **kwargs: Any) → Runnable[Input, Output]¶ Bind config to a Runnable, returning a new Runnable. with_fallbacks(fallbacks: Sequence[Runnable[Input, Output]], *, exceptions_to_handle: Tuple[Type[BaseException], ...] = (<class 'E...
https://api.python.langchain.com/en/latest/tools/langchain_community.tools.dataforseo_api_search.tool.DataForSeoAPISearchResults.html
79acb1bcf336-9
Create a new Runnable that retries the original runnable on exceptions. Parameters retry_if_exception_type – A tuple of exception types to retry on wait_exponential_jitter – Whether to add jitter to the wait time between retries stop_after_attempt – The maximum number of attempts to make before giving up Returns A new ...
https://api.python.langchain.com/en/latest/tools/langchain_community.tools.dataforseo_api_search.tool.DataForSeoAPISearchResults.html
65a444dd52ac-0
langchain_community.tools.office365.base.O365BaseTool¶ class langchain_community.tools.office365.base.O365BaseTool[source]¶ Bases: BaseTool Base class for the Office 365 tools. Create a new model by parsing and validating input data from keyword arguments. Raises ValidationError if the input data cannot be parsed to fo...
https://api.python.langchain.com/en/latest/tools/langchain_community.tools.office365.base.O365BaseTool.html
65a444dd52ac-1
Optional list of tags associated with the tool. Defaults to None These tags will be associated with each call to this tool, and passed as arguments to the handlers defined in callbacks. You can use these to eg identify a specific instance of a tool with its use case. param verbose: bool = False¶ Whether to log the tool...
https://api.python.langchain.com/en/latest/tools/langchain_community.tools.office365.base.O365BaseTool.html
65a444dd52ac-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...
https://api.python.langchain.com/en/latest/tools/langchain_community.tools.office365.base.O365BaseTool.html
65a444dd52ac-3
exclude_types – Exclude logs with these types. exclude_tags – Exclude logs with these tags. 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 sho...
https://api.python.langchain.com/en/latest/tools/langchain_community.tools.office365.base.O365BaseTool.html
65a444dd52ac-4
configurable_fields(**kwargs: Union[ConfigurableField, ConfigurableFieldSingleOption, ConfigurableFieldMultiOption]) → RunnableSerializable[Input, Output]¶ classmethod construct(_fields_set: Optional[SetStr] = None, **values: Any) → Model¶ Creates a new model setting __dict__ and __fields_set__ from trusted or pre-vali...
https://api.python.langchain.com/en/latest/tools/langchain_community.tools.office365.base.O365BaseTool.html
65a444dd52ac-5
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 namespace is [“langchai...
https://api.python.langchain.com/en/latest/tools/langchain_community.tools.office365.base.O365BaseTool.html
65a444dd52ac-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...
https://api.python.langchain.com/en/latest/tools/langchain_community.tools.office365.base.O365BaseTool.html
65a444dd52ac-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...
https://api.python.langchain.com/en/latest/tools/langchain_community.tools.office365.base.O365BaseTool.html
65a444dd52ac-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...
https://api.python.langchain.com/en/latest/tools/langchain_community.tools.office365.base.O365BaseTool.html
65a444dd52ac-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...
https://api.python.langchain.com/en/latest/tools/langchain_community.tools.office365.base.O365BaseTool.html
564a3d74fb3c-0
langchain_community.tools.wikipedia.tool.WikipediaQueryRun¶ class langchain_community.tools.wikipedia.tool.WikipediaQueryRun[source]¶ Bases: BaseTool Tool that searches the Wikipedia API. Create a new model by parsing and validating input data from keyword arguments. Raises ValidationError if the input data cannot be p...
https://api.python.langchain.com/en/latest/tools/langchain_community.tools.wikipedia.tool.WikipediaQueryRun.html
564a3d74fb3c-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 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 a...
https://api.python.langchain.com/en/latest/tools/langchain_community.tools.wikipedia.tool.WikipediaQueryRun.html
564a3d74fb3c-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[...
https://api.python.langchain.com/en/latest/tools/langchain_community.tools.wikipedia.tool.WikipediaQueryRun.html
564a3d74fb3c-3
Parameters input – The input to the runnable. config – The config to use for the runnable. diff – Whether to yield diffs between each step, or the current state. with_streamed_output_list – Whether to yield the streamed_output list. include_names – Only include logs with these names. include_types – Only include logs w...
https://api.python.langchain.com/en/latest/tools/langchain_community.tools.wikipedia.tool.WikipediaQueryRun.html
564a3d74fb3c-4
Parameters include – A list of fields to include in the config schema. Returns A pydantic model that can be used to validate config. configurable_alternatives(which: ConfigurableField, *, default_key: str = 'default', prefix_keys: bool = False, **kwargs: Union[Runnable[Input, Output], Callable[[], Runnable[Input, Outpu...
https://api.python.langchain.com/en/latest/tools/langchain_community.tools.wikipedia.tool.WikipediaQueryRun.html
564a3d74fb3c-5
deep – set to True to make a deep copy of the model Returns new model instance dict(*, 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, ex...
https://api.python.langchain.com/en/latest/tools/langchain_community.tools.wikipedia.tool.WikipediaQueryRun.html
564a3d74fb3c-6
config – A config to use when invoking the runnable. The config supports standard keys like ‘tags’, ‘metadata’ for tracing purposes, ‘max_concurrency’ for controlling how much work to do in parallel, and other keys. Please refer to the RunnableConfig for more details. Returns The output of the runnable. classmethod is_...
https://api.python.langchain.com/en/latest/tools/langchain_community.tools.wikipedia.tool.WikipediaQueryRun.html
564a3d74fb3c-7
classmethod parse_obj(obj: Any) → Model¶ classmethod parse_raw(b: Union[str, bytes], *, content_type: unicode = None, encoding: unicode = 'utf8', proto: Protocol = None, allow_pickle: bool = False) → Model¶ run(tool_input: Union[str, Dict], verbose: Optional[bool] = None, start_color: Optional[str] = 'green', color: Op...
https://api.python.langchain.com/en/latest/tools/langchain_community.tools.wikipedia.tool.WikipediaQueryRun.html
564a3d74fb3c-8
classmethod validate(value: Any) → Model¶ with_config(config: Optional[RunnableConfig] = None, **kwargs: Any) → Runnable[Input, Output]¶ Bind config to a Runnable, returning a new Runnable. with_fallbacks(fallbacks: Sequence[Runnable[Input, Output]], *, exceptions_to_handle: Tuple[Type[BaseException], ...] = (<class 'E...
https://api.python.langchain.com/en/latest/tools/langchain_community.tools.wikipedia.tool.WikipediaQueryRun.html
564a3d74fb3c-9
Create a new Runnable that retries the original runnable on exceptions. Parameters retry_if_exception_type – A tuple of exception types to retry on wait_exponential_jitter – Whether to add jitter to the wait time between retries stop_after_attempt – The maximum number of attempts to make before giving up Returns A new ...
https://api.python.langchain.com/en/latest/tools/langchain_community.tools.wikipedia.tool.WikipediaQueryRun.html
def33be2b6c7-0
langchain_community.tools.gmail.search.SearchArgsSchema¶ class langchain_community.tools.gmail.search.SearchArgsSchema[source]¶ Bases: BaseModel Input for SearchGmailTool. 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 ...
https://api.python.langchain.com/en/latest/tools/langchain_community.tools.gmail.search.SearchArgsSchema.html
def33be2b6c7-1
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 creating the new model: you should trust this data deep – set to True to make a deep co...
https://api.python.langchain.com/en/latest/tools/langchain_community.tools.gmail.search.SearchArgsSchema.html
def33be2b6c7-2
classmethod parse_obj(obj: Any) → Model¶ classmethod parse_raw(b: Union[str, bytes], *, content_type: unicode = None, encoding: unicode = 'utf8', proto: Protocol = None, allow_pickle: bool = False) → Model¶ classmethod schema(by_alias: bool = True, ref_template: unicode = '#/definitions/{model}') → DictStrAny¶ classmet...
https://api.python.langchain.com/en/latest/tools/langchain_community.tools.gmail.search.SearchArgsSchema.html
f5cab8bcbe79-0
langchain_community.tools.playwright.utils.aget_current_page¶ async langchain_community.tools.playwright.utils.aget_current_page(browser: AsyncBrowser) → AsyncPage[source]¶ Asynchronously get the current page of the browser. Parameters browser – The browser (AsyncBrowser) to get the current page from. Returns The curre...
https://api.python.langchain.com/en/latest/tools/langchain_community.tools.playwright.utils.aget_current_page.html
5bc33c292344-0
langchain_community.tools.spark_sql.tool.QueryCheckerTool¶ class langchain_community.tools.spark_sql.tool.QueryCheckerTool[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 ...
https://api.python.langchain.com/en/latest/tools/langchain_community.tools.spark_sql.tool.QueryCheckerTool.html
5bc33c292344-1
You can use these to eg identify a specific instance of a tool with its use case. 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 i...
https://api.python.langchain.com/en/latest/tools/langchain_community.tools.spark_sql.tool.QueryCheckerTool.html
5bc33c292344-2
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. async ainvoke(input: Union[str, Dict], config: Optional[RunnableConfig] = None, **kwargs: Any) → Any...
https://api.python.langchain.com/en/latest/tools/langchain_community.tools.spark_sql.tool.QueryCheckerTool.html
5bc33c292344-3
Subclasses should override this method if they support streaming output. async astream_log(input: Any, config: Optional[RunnableConfig] = None, *, diff: bool = True, with_streamed_output_list: bool = True, include_names: Optional[Sequence[str]] = None, include_types: Optional[Sequence[str]] = None, include_tags: Option...
https://api.python.langchain.com/en/latest/tools/langchain_community.tools.spark_sql.tool.QueryCheckerTool.html
5bc33c292344-4
Default implementation of atransform, which buffers input and calls astream. Subclasses should override this method if they can start producing output while input is still being generated. batch(inputs: List[Input], config: Optional[Union[RunnableConfig, List[RunnableConfig]]] = None, *, return_exceptions: bool = False...
https://api.python.langchain.com/en/latest/tools/langchain_community.tools.spark_sql.tool.QueryCheckerTool.html
5bc33c292344-5
Default values are respected, but no other validation is performed. Behaves as if Config.extra = ‘allow’ was set since it adds all passed values copy(*, include: Optional[Union[AbstractSetIntStr, MappingIntStrAny]] = None, exclude: Optional[Union[AbstractSetIntStr, MappingIntStrAny]] = None, update: Optional[DictStrAny...
https://api.python.langchain.com/en/latest/tools/langchain_community.tools.spark_sql.tool.QueryCheckerTool.html
5bc33c292344-6
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 that leverage the configurable_fields and configurable_alternatives methods will have a dynamic output schema tha...
https://api.python.langchain.com/en/latest/tools/langchain_community.tools.spark_sql.tool.QueryCheckerTool.html
5bc33c292344-7
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 lc_id() → List[str]¶ A unique identifier for this class for serialization purposes. The unique identifier is a ...
https://api.python.langchain.com/en/latest/tools/langchain_community.tools.spark_sql.tool.QueryCheckerTool.html
5bc33c292344-8
stream(input: Input, config: Optional[RunnableConfig] = None, **kwargs: Optional[Any]) → Iterator[Output]¶ Default implementation of stream, which calls invoke. Subclasses should override this method if they support streaming output. to_json() → Union[SerializedConstructor, SerializedNotImplemented]¶ to_json_not_implem...
https://api.python.langchain.com/en/latest/tools/langchain_community.tools.spark_sql.tool.QueryCheckerTool.html
5bc33c292344-9
Bind lifecycle listeners to a Runnable, returning a new Runnable. on_start: Called before the runnable starts running, with the Run object. on_end: Called after the runnable finishes running, with the Run object. on_error: Called if the runnable throws an error, with the Run object. The Run object contains information ...
https://api.python.langchain.com/en/latest/tools/langchain_community.tools.spark_sql.tool.QueryCheckerTool.html
5bc33c292344-10
property input_schema: Type[pydantic.main.BaseModel]¶ The type of input this runnable accepts specified as a pydantic model. property is_single_input: bool¶ Whether the tool only accepts a single input. property lc_attributes: Dict¶ List of attribute names that should be included in the serialized kwargs. These attribu...
https://api.python.langchain.com/en/latest/tools/langchain_community.tools.spark_sql.tool.QueryCheckerTool.html
4502ab1fbe48-0
langchain_community.tools.file_management.write.WriteFileInput¶ class langchain_community.tools.file_management.write.WriteFileInput[source]¶ Bases: BaseModel Input for WriteFileTool. Create a new model by parsing and validating input data from keyword arguments. Raises ValidationError if the input data cannot be parse...
https://api.python.langchain.com/en/latest/tools/langchain_community.tools.file_management.write.WriteFileInput.html
4502ab1fbe48-1
deep – set to True to make a deep copy of the model Returns new model instance dict(*, 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, ex...
https://api.python.langchain.com/en/latest/tools/langchain_community.tools.file_management.write.WriteFileInput.html
4502ab1fbe48-2
classmethod schema(by_alias: bool = True, ref_template: unicode = '#/definitions/{model}') → DictStrAny¶ classmethod schema_json(*, by_alias: bool = True, ref_template: unicode = '#/definitions/{model}', **dumps_kwargs: Any) → unicode¶ classmethod update_forward_refs(**localns: Any) → None¶ Try to update ForwardRefs on...
https://api.python.langchain.com/en/latest/tools/langchain_community.tools.file_management.write.WriteFileInput.html
89a17f1311e8-0
langchain_community.tools.human.tool.HumanInputRun¶ class langchain_community.tools.human.tool.HumanInputRun[source]¶ Bases: BaseTool Tool that asks user for input. 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 m...
https://api.python.langchain.com/en/latest/tools/langchain_community.tools.human.tool.HumanInputRun.html
89a17f1311e8-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 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 a...
https://api.python.langchain.com/en/latest/tools/langchain_community.tools.human.tool.HumanInputRun.html
89a17f1311e8-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[...
https://api.python.langchain.com/en/latest/tools/langchain_community.tools.human.tool.HumanInputRun.html
89a17f1311e8-3
Parameters input – The input to the runnable. config – The config to use for the runnable. diff – Whether to yield diffs between each step, or the current state. with_streamed_output_list – Whether to yield the streamed_output list. include_names – Only include logs with these names. include_types – Only include logs w...
https://api.python.langchain.com/en/latest/tools/langchain_community.tools.human.tool.HumanInputRun.html
89a17f1311e8-4
Parameters include – A list of fields to include in the config schema. Returns A pydantic model that can be used to validate config. configurable_alternatives(which: ConfigurableField, *, default_key: str = 'default', prefix_keys: bool = False, **kwargs: Union[Runnable[Input, Output], Callable[[], Runnable[Input, Outpu...
https://api.python.langchain.com/en/latest/tools/langchain_community.tools.human.tool.HumanInputRun.html
89a17f1311e8-5
deep – set to True to make a deep copy of the model Returns new model instance dict(*, 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, ex...
https://api.python.langchain.com/en/latest/tools/langchain_community.tools.human.tool.HumanInputRun.html
89a17f1311e8-6
config – A config to use when invoking the runnable. The config supports standard keys like ‘tags’, ‘metadata’ for tracing purposes, ‘max_concurrency’ for controlling how much work to do in parallel, and other keys. Please refer to the RunnableConfig for more details. Returns The output of the runnable. classmethod is_...
https://api.python.langchain.com/en/latest/tools/langchain_community.tools.human.tool.HumanInputRun.html
89a17f1311e8-7
classmethod parse_obj(obj: Any) → Model¶ classmethod parse_raw(b: Union[str, bytes], *, content_type: unicode = None, encoding: unicode = 'utf8', proto: Protocol = None, allow_pickle: bool = False) → Model¶ run(tool_input: Union[str, Dict], verbose: Optional[bool] = None, start_color: Optional[str] = 'green', color: Op...
https://api.python.langchain.com/en/latest/tools/langchain_community.tools.human.tool.HumanInputRun.html
89a17f1311e8-8
classmethod validate(value: Any) → Model¶ with_config(config: Optional[RunnableConfig] = None, **kwargs: Any) → Runnable[Input, Output]¶ Bind config to a Runnable, returning a new Runnable. with_fallbacks(fallbacks: Sequence[Runnable[Input, Output]], *, exceptions_to_handle: Tuple[Type[BaseException], ...] = (<class 'E...
https://api.python.langchain.com/en/latest/tools/langchain_community.tools.human.tool.HumanInputRun.html
89a17f1311e8-9
Create a new Runnable that retries the original runnable on exceptions. Parameters retry_if_exception_type – A tuple of exception types to retry on wait_exponential_jitter – Whether to add jitter to the wait time between retries stop_after_attempt – The maximum number of attempts to make before giving up Returns A new ...
https://api.python.langchain.com/en/latest/tools/langchain_community.tools.human.tool.HumanInputRun.html
f190f6d5212c-0
langchain_core.tools.Tool¶ class langchain_core.tools.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...
https://api.python.langchain.com/en/latest/tools/langchain_core.tools.Tool.html
f190f6d5212c-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...
https://api.python.langchain.com/en/latest/tools/langchain_core.tools.Tool.html
f190f6d5212c-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[...
https://api.python.langchain.com/en/latest/tools/langchain_core.tools.Tool.html
f190f6d5212c-3
Parameters input – The input to the runnable. config – The config to use for the runnable. diff – Whether to yield diffs between each step, or the current state. with_streamed_output_list – Whether to yield the streamed_output list. include_names – Only include logs with these names. include_types – Only include logs w...
https://api.python.langchain.com/en/latest/tools/langchain_core.tools.Tool.html
f190f6d5212c-4
Parameters include – A list of fields to include in the config schema. Returns A pydantic model that can be used to validate config. configurable_alternatives(which: ConfigurableField, *, default_key: str = 'default', prefix_keys: bool = False, **kwargs: Union[Runnable[Input, Output], Callable[[], Runnable[Input, Outpu...
https://api.python.langchain.com/en/latest/tools/langchain_core.tools.Tool.html
f190f6d5212c-5
deep – set to True to make a deep copy of the model Returns new model instance dict(*, 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, ex...
https://api.python.langchain.com/en/latest/tools/langchain_core.tools.Tool.html
f190f6d5212c-6
Parameters config – A config to use when generating the schema. Returns A pydantic model that can be used to validate output. invoke(input: Union[str, Dict], config: Optional[RunnableConfig] = None, **kwargs: Any) → Any¶ Transform a single input into an output. Override to implement. Parameters input – The input to the...
https://api.python.langchain.com/en/latest/tools/langchain_core.tools.Tool.html
f190f6d5212c-7
by calling invoke() with each input. classmethod parse_file(path: Union[str, Path], *, content_type: unicode = None, encoding: unicode = 'utf8', proto: Protocol = None, allow_pickle: bool = False) → Model¶ classmethod parse_obj(obj: Any) → Model¶ classmethod parse_raw(b: Union[str, bytes], *, content_type: unicode = No...
https://api.python.langchain.com/en/latest/tools/langchain_core.tools.Tool.html
f190f6d5212c-8
Default implementation of transform, which buffers input and then calls stream. Subclasses should override this method if they can start producing output while input is still being generated. classmethod update_forward_refs(**localns: Any) → None¶ Try to update ForwardRefs on fields based on this Model, globalns and lo...
https://api.python.langchain.com/en/latest/tools/langchain_core.tools.Tool.html
f190f6d5212c-9
added to the run. with_retry(*, retry_if_exception_type: ~typing.Tuple[~typing.Type[BaseException], ...] = (<class 'Exception'>,), wait_exponential_jitter: bool = True, stop_after_attempt: int = 3) → Runnable[Input, Output]¶ Create a new Runnable that retries the original runnable on exceptions. Parameters retry_if_exc...
https://api.python.langchain.com/en/latest/tools/langchain_core.tools.Tool.html
f190f6d5212c-10
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. Examples using Tool¶ DataForSeo Google Serper SerpAPI Google Search Zep Memory Dynamodb Chat...
https://api.python.langchain.com/en/latest/tools/langchain_core.tools.Tool.html
ec3da5b300f5-0
langchain_community.tools.gmail.get_thread.GetThreadSchema¶ class langchain_community.tools.gmail.get_thread.GetThreadSchema[source]¶ Bases: BaseModel Input for GetMessageTool. Create a new model by parsing and validating input data from keyword arguments. Raises ValidationError if the input data cannot be parsed to fo...
https://api.python.langchain.com/en/latest/tools/langchain_community.tools.gmail.get_thread.GetThreadSchema.html
ec3da5b300f5-1
deep – set to True to make a deep copy of the model Returns new model instance dict(*, 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, ex...
https://api.python.langchain.com/en/latest/tools/langchain_community.tools.gmail.get_thread.GetThreadSchema.html
ec3da5b300f5-2
classmethod schema(by_alias: bool = True, ref_template: unicode = '#/definitions/{model}') → DictStrAny¶ classmethod schema_json(*, by_alias: bool = True, ref_template: unicode = '#/definitions/{model}', **dumps_kwargs: Any) → unicode¶ classmethod update_forward_refs(**localns: Any) → None¶ Try to update ForwardRefs on...
https://api.python.langchain.com/en/latest/tools/langchain_community.tools.gmail.get_thread.GetThreadSchema.html
8b10476235eb-0
langchain_community.tools.gmail.create_draft.CreateDraftSchema¶ class langchain_community.tools.gmail.create_draft.CreateDraftSchema[source]¶ Bases: BaseModel Input for CreateDraftTool. Create a new model by parsing and validating input data from keyword arguments. Raises ValidationError if the input data cannot be par...
https://api.python.langchain.com/en/latest/tools/langchain_community.tools.gmail.create_draft.CreateDraftSchema.html
8b10476235eb-1
deep – set to True to make a deep copy of the model Returns new model instance dict(*, 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, ex...
https://api.python.langchain.com/en/latest/tools/langchain_community.tools.gmail.create_draft.CreateDraftSchema.html
8b10476235eb-2
classmethod schema(by_alias: bool = True, ref_template: unicode = '#/definitions/{model}') → DictStrAny¶ classmethod schema_json(*, by_alias: bool = True, ref_template: unicode = '#/definitions/{model}', **dumps_kwargs: Any) → unicode¶ classmethod update_forward_refs(**localns: Any) → None¶ Try to update ForwardRefs on...
https://api.python.langchain.com/en/latest/tools/langchain_community.tools.gmail.create_draft.CreateDraftSchema.html
32b29f78ba5e-0
langchain_community.tools.azure_cognitive_services.image_analysis.AzureCogsImageAnalysisTool¶ class langchain_community.tools.azure_cognitive_services.image_analysis.AzureCogsImageAnalysisTool[source]¶ Bases: BaseTool Tool that queries the Azure Cognitive Services Image Analysis API. In order to set this up, follow ins...
https://api.python.langchain.com/en/latest/tools/langchain_community.tools.azure_cognitive_services.image_analysis.AzureCogsImageAnalysisTool.html