id stringlengths 14 15 | text stringlengths 13 2.7k | source stringlengths 60 181 |
|---|---|---|
1439ec506e7e-0 | langchain_community.tools.edenai.image_explicitcontent.EdenAiExplicitImageTool¶
class langchain_community.tools.edenai.image_explicitcontent.EdenAiExplicitImageTool[source]¶
Bases: EdenaiTool
Tool that queries the Eden AI Explicit image detection.
for api reference check edenai documentation:
https://docs.edenai.co/ref... | https://api.python.langchain.com/en/latest/tools/langchain_community.tools.edenai.image_explicitcontent.EdenAiExplicitImageTool.html |
1439ec506e7e-1 | Handle the content of the ToolException thrown.
param is_async: bool = False¶
param metadata: Optional[Dict[str, Any]] = None¶
Optional metadata associated with the tool. Defaults to None
This metadata will be associated with each call to this tool,
and passed as arguments to the handlers defined in callbacks.
You can ... | https://api.python.langchain.com/en/latest/tools/langchain_community.tools.edenai.image_explicitcontent.EdenAiExplicitImageTool.html |
1439ec506e7e-2 | 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¶
Default implementation of ainvoke, calls invoke from a thread.
The de... | https://api.python.langchain.com/en/latest/tools/langchain_community.tools.edenai.image_explicitcontent.EdenAiExplicitImageTool.html |
1439ec506e7e-3 | Stream all output from a runnable, as reported to the callback system.
This includes all inner runs of LLMs, Retrievers, Tools, etc.
Output is streamed as Log objects, which include a list of
jsonpatch ops that describe how the state of the run has changed in each
step, and the final state of the run.
The jsonpatch ops... | https://api.python.langchain.com/en/latest/tools/langchain_community.tools.edenai.image_explicitcontent.EdenAiExplicitImageTool.html |
1439ec506e7e-4 | bind(**kwargs: Any) → Runnable[Input, Output]¶
Bind arguments to a Runnable, returning a new Runnable.
config_schema(*, include: Optional[Sequence[str]] = None) → Type[BaseModel]¶
The type of config this runnable accepts specified as a pydantic model.
To mark a field as configurable, see the configurable_fields
and con... | https://api.python.langchain.com/en/latest/tools/langchain_community.tools.edenai.image_explicitcontent.EdenAiExplicitImageTool.html |
1439ec506e7e-5 | 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 copy of the model
Returns
new model instance
dict(*, i... | https://api.python.langchain.com/en/latest/tools/langchain_community.tools.edenai.image_explicitcontent.EdenAiExplicitImageTool.html |
1439ec506e7e-6 | static get_user_agent() → str¶
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 runnable.
config – A config to use when invoking the runnable.
The config supports standard ke... | https://api.python.langchain.com/en/latest/tools/langchain_community.tools.edenai.image_explicitcontent.EdenAiExplicitImageTool.html |
1439ec506e7e-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_community.tools.edenai.image_explicitcontent.EdenAiExplicitImageTool.html |
1439ec506e7e-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_community.tools.edenai.image_explicitcontent.EdenAiExplicitImageTool.html |
1439ec506e7e-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_community.tools.edenai.image_explicitcontent.EdenAiExplicitImageTool.html |
1439ec506e7e-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 EdenAiExplicitImageTool¶
Eden AI | https://api.python.langchain.com/en/latest/tools/langchain_community.tools.edenai.image_explicitcontent.EdenAiExplicitImageTool.html |
051f5f8fe1c9-0 | langchain_community.tools.playwright.extract_hyperlinks.ExtractHyperlinksToolInput¶
class langchain_community.tools.playwright.extract_hyperlinks.ExtractHyperlinksToolInput[source]¶
Bases: BaseModel
Input for ExtractHyperlinksTool.
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.playwright.extract_hyperlinks.ExtractHyperlinksToolInput.html |
051f5f8fe1c9-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.playwright.extract_hyperlinks.ExtractHyperlinksToolInput.html |
051f5f8fe1c9-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.playwright.extract_hyperlinks.ExtractHyperlinksToolInput.html |
365c7d3ea8bf-0 | langchain_community.tools.bearly.tool.FileInfo¶
class langchain_community.tools.bearly.tool.FileInfo[source]¶
Bases: BaseModel
Information about a file to be uploaded.
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 vali... | https://api.python.langchain.com/en/latest/tools/langchain_community.tools.bearly.tool.FileInfo.html |
365c7d3ea8bf-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.bearly.tool.FileInfo.html |
365c7d3ea8bf-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.bearly.tool.FileInfo.html |
8795120a5da9-0 | langchain_community.tools.gmail.base.GmailBaseTool¶
class langchain_community.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 mode... | https://api.python.langchain.com/en/latest/tools/langchain_community.tools.gmail.base.GmailBaseTool.html |
8795120a5da9-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[... | https://api.python.langchain.com/en/latest/tools/langchain_community.tools.gmail.base.GmailBaseTool.html |
8795120a5da9-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.gmail.base.GmailBaseTool.html |
8795120a5da9-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.gmail.base.GmailBaseTool.html |
8795120a5da9-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.gmail.base.GmailBaseTool.html |
8795120a5da9-5 | Create a tool from an api resource.
Parameters
api_resource – The api resource to use.
Returns
A 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 langch... | https://api.python.langchain.com/en/latest/tools/langchain_community.tools.gmail.base.GmailBaseTool.html |
8795120a5da9-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.gmail.base.GmailBaseTool.html |
8795120a5da9-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.gmail.base.GmailBaseTool.html |
8795120a5da9-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.gmail.base.GmailBaseTool.html |
8795120a5da9-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.gmail.base.GmailBaseTool.html |
dc357b2e363e-0 | langchain_community.tools.azure_cognitive_services.utils.download_audio_from_url¶
langchain_community.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_community.tools.azure_cognitive_services.utils.download_audio_from_url.html |
dfb1f07c170f-0 | langchain_community.tools.e2b_data_analysis.unparse.interleave¶
langchain_community.tools.e2b_data_analysis.unparse.interleave(inter, f, seq)[source]¶
Call f on each item in seq, calling inter() in between. | https://api.python.langchain.com/en/latest/tools/langchain_community.tools.e2b_data_analysis.unparse.interleave.html |
36afe8233438-0 | langchain_community.tools.json.tool.JsonListKeysTool¶
class langchain_community.tools.json.tool.JsonListKeysTool[source]¶
Bases: BaseTool
Tool for listing keys in a JSON spec.
Create a new model by parsing and validating input data from keyword arguments.
Raises ValidationError if the input data cannot be parsed to for... | https://api.python.langchain.com/en/latest/tools/langchain_community.tools.json.tool.JsonListKeysTool.html |
36afe8233438-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 spec: JsonSpec [Required]¶
param tags: Optional[List[str]] = None¶
Optional list of tags associated with the tool. Defaults to None
These ... | https://api.python.langchain.com/en/latest/tools/langchain_community.tools.json.tool.JsonListKeysTool.html |
36afe8233438-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.json.tool.JsonListKeysTool.html |
36afe8233438-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.json.tool.JsonListKeysTool.html |
36afe8233438-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.json.tool.JsonListKeysTool.html |
36afe8233438-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.json.tool.JsonListKeysTool.html |
36afe8233438-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.json.tool.JsonListKeysTool.html |
36afe8233438-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.json.tool.JsonListKeysTool.html |
36afe8233438-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.json.tool.JsonListKeysTool.html |
36afe8233438-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.json.tool.JsonListKeysTool.html |
28b9907b09cc-0 | langchain_community.tools.gmail.get_message.SearchArgsSchema¶
class langchain_community.tools.gmail.get_message.SearchArgsSchema[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 t... | https://api.python.langchain.com/en/latest/tools/langchain_community.tools.gmail.get_message.SearchArgsSchema.html |
28b9907b09cc-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_message.SearchArgsSchema.html |
28b9907b09cc-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_message.SearchArgsSchema.html |
5c690af31636-0 | langchain_community.tools.gmail.utils.get_gmail_credentials¶
langchain_community.tools.gmail.utils.get_gmail_credentials(token_file: Optional[str] = None, client_secrets_file: Optional[str] = None, scopes: Optional[List[str]] = None) → Credentials[source]¶
Get credentials.
Examples using get_gmail_credentials¶
Gmail | https://api.python.langchain.com/en/latest/tools/langchain_community.tools.gmail.utils.get_gmail_credentials.html |
5a36dfb34d30-0 | langchain_community.tools.ainetwork.app.AINAppOps¶
class langchain_community.tools.ainetwork.app.AINAppOps[source]¶
Bases: AINBaseTool
Tool for app operations.
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.... | https://api.python.langchain.com/en/latest/tools/langchain_community.tools.ainetwork.app.AINAppOps.html |
5a36dfb34d30-1 | param callbacks: Callbacks = None¶
Callbacks to be called during tool execution.
param description: str = "\nCreate an app in the AINetwork Blockchain database by creating the /apps/<appName> path.\nAn address set as `admin` can grant `owner` rights to other addresses (refer to `AINownerOps` for more details).\nAlso, `... | https://api.python.langchain.com/en/latest/tools/langchain_community.tools.ainetwork.app.AINAppOps.html |
5a36dfb34d30-2 | This metadata will be associated with each call to this tool,
and passed as arguments to the handlers defined in callbacks.
You can use these to eg identify a specific instance of a tool with its use case.
param name: str = 'AINappOps'¶
The unique name of the tool that clearly communicates its purpose.
param return_dir... | https://api.python.langchain.com/en/latest/tools/langchain_community.tools.ainetwork.app.AINAppOps.html |
5a36dfb34d30-3 | The default implementation allows usage of async code even if
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: Opti... | https://api.python.langchain.com/en/latest/tools/langchain_community.tools.ainetwork.app.AINAppOps.html |
5a36dfb34d30-4 | step, and the final state of the run.
The jsonpatch ops can be applied in order to construct state.
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_... | https://api.python.langchain.com/en/latest/tools/langchain_community.tools.ainetwork.app.AINAppOps.html |
5a36dfb34d30-5 | To mark a field as configurable, see the configurable_fields
and configurable_alternatives methods.
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', pr... | https://api.python.langchain.com/en/latest/tools/langchain_community.tools.ainetwork.app.AINAppOps.html |
5a36dfb34d30-6 | 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.ainetwork.app.AINAppOps.html |
5a36dfb34d30-7 | 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.ainetwork.app.AINAppOps.html |
5a36dfb34d30-8 | 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.ainetwork.app.AINAppOps.html |
5a36dfb34d30-9 | 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.ainetwork.app.AINAppOps.html |
5a36dfb34d30-10 | 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.ainetwork.app.AINAppOps.html |
15e8414e675d-0 | langchain_community.tools.yahoo_finance_news.YahooFinanceNewsTool¶
class langchain_community.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 i... | https://api.python.langchain.com/en/latest/tools/langchain_community.tools.yahoo_finance_news.YahooFinanceNewsTool.html |
15e8414e675d-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_community.tools.yahoo_finance_news.YahooFinanceNewsTool.html |
15e8414e675d-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.yahoo_finance_news.YahooFinanceNewsTool.html |
15e8414e675d-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.yahoo_finance_news.YahooFinanceNewsTool.html |
15e8414e675d-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.yahoo_finance_news.YahooFinanceNewsTool.html |
15e8414e675d-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.yahoo_finance_news.YahooFinanceNewsTool.html |
15e8414e675d-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.yahoo_finance_news.YahooFinanceNewsTool.html |
15e8414e675d-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.yahoo_finance_news.YahooFinanceNewsTool.html |
15e8414e675d-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.yahoo_finance_news.YahooFinanceNewsTool.html |
15e8414e675d-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.yahoo_finance_news.YahooFinanceNewsTool.html |
face566dbf40-0 | langchain_community.tools.gmail.utils.clean_email_body¶
langchain_community.tools.gmail.utils.clean_email_body(body: str) → str[source]¶
Clean email body. | https://api.python.langchain.com/en/latest/tools/langchain_community.tools.gmail.utils.clean_email_body.html |
802c701a5f62-0 | langchain_community.tools.render.format_tool_to_openai_function¶
langchain_community.tools.render.format_tool_to_openai_function(tool: BaseTool) → FunctionDescription[source]¶
Format tool into the OpenAI function API.
Examples using format_tool_to_openai_function¶
Tools as OpenAI Functions | https://api.python.langchain.com/en/latest/tools/langchain_community.tools.render.format_tool_to_openai_function.html |
8ca267ccaef3-0 | langchain_community.tools.convert_to_openai.format_tool_to_openai_function¶
langchain_community.tools.convert_to_openai.format_tool_to_openai_function(tool: BaseTool) → FunctionDescription[source]¶
Format tool into the OpenAI function API.
Examples using format_tool_to_openai_function¶
Tools as OpenAI Functions | https://api.python.langchain.com/en/latest/tools/langchain_community.tools.convert_to_openai.format_tool_to_openai_function.html |
86470336e6f6-0 | langchain_core.tools.BaseTool¶
class langchain_core.tools.BaseTool[source]¶
Bases: RunnableSerializable[Union[str, Dict], Any]
Interface LangChain tools must implement.
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 val... | https://api.python.langchain.com/en/latest/tools/langchain_core.tools.BaseTool.html |
86470336e6f6-1 | param tags: Optional[List[str]] = None¶
Optional list of tags associated with the tool. Defaults to None
These tags will be associated with each call to this tool,
and passed as arguments to the handlers defined in callbacks.
You can use these to eg identify a specific instance of a tool with its use case.
param verbos... | https://api.python.langchain.com/en/latest/tools/langchain_core.tools.BaseTool.html |
86470336e6f6-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.BaseTool.html |
86470336e6f6-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.BaseTool.html |
86470336e6f6-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.BaseTool.html |
86470336e6f6-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.BaseTool.html |
86470336e6f6-6 | Parameters
input – The input to the runnable.
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.
Retur... | https://api.python.langchain.com/en/latest/tools/langchain_core.tools.BaseTool.html |
86470336e6f6-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_core.tools.BaseTool.html |
86470336e6f6-8 | 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 Runnable.
with_fallbacks(fallbacks: Sequence[Runnable[Input, ... | https://api.python.langchain.com/en/latest/tools/langchain_core.tools.BaseTool.html |
86470336e6f6-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_core.tools.BaseTool.html |
86470336e6f6-10 | !pip install bs4
Defining Custom Tools
Combine agents and vector stores
Custom functions with OpenAI Functions Agent | https://api.python.langchain.com/en/latest/tools/langchain_core.tools.BaseTool.html |
82808c5c373f-0 | langchain_community.tools.file_management.delete.DeleteFileTool¶
class langchain_community.tools.file_management.delete.DeleteFileTool[source]¶
Bases: BaseFileToolMixin, BaseTool
Tool that deletes a file.
Create a new model by parsing and validating input data from keyword arguments.
Raises ValidationError if the input... | https://api.python.langchain.com/en/latest/tools/langchain_community.tools.file_management.delete.DeleteFileTool.html |
82808c5c373f-1 | The final path will be chosen relative to root_dir if specified.
param tags: Optional[List[str]] = None¶
Optional list of tags associated with the tool. Defaults to None
These tags will be associated with each call to this tool,
and passed as arguments to the handlers defined in callbacks.
You can use these to eg ident... | https://api.python.langchain.com/en/latest/tools/langchain_community.tools.file_management.delete.DeleteFileTool.html |
82808c5c373f-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.file_management.delete.DeleteFileTool.html |
82808c5c373f-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.file_management.delete.DeleteFileTool.html |
82808c5c373f-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.file_management.delete.DeleteFileTool.html |
82808c5c373f-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.file_management.delete.DeleteFileTool.html |
82808c5c373f-6 | Transform a single input into an output. Override to implement.
Parameters
input – The input to the runnable.
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 ... | https://api.python.langchain.com/en/latest/tools/langchain_community.tools.file_management.delete.DeleteFileTool.html |
82808c5c373f-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.file_management.delete.DeleteFileTool.html |
82808c5c373f-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.file_management.delete.DeleteFileTool.html |
82808c5c373f-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.file_management.delete.DeleteFileTool.html |
58f1e63b349d-0 | langchain_community.tools.plugin.ApiConfig¶
class langchain_community.tools.plugin.ApiConfig[source]¶
Bases: BaseModel
API Configuration.
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 has_user_authen... | https://api.python.langchain.com/en/latest/tools/langchain_community.tools.plugin.ApiConfig.html |
58f1e63b349d-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.plugin.ApiConfig.html |
58f1e63b349d-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.plugin.ApiConfig.html |
6c33e06156c5-0 | langchain_community.tools.steamship_image_generation.tool.ModelName¶
class langchain_community.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 = 'stabl... | https://api.python.langchain.com/en/latest/tools/langchain_community.tools.steamship_image_generation.tool.ModelName.html |
5155880eaa95-0 | langchain_community.tools.slack.base.SlackBaseTool¶
class langchain_community.tools.slack.base.SlackBaseTool[source]¶
Bases: BaseTool
Base class for Slack 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 mode... | https://api.python.langchain.com/en/latest/tools/langchain_community.tools.slack.base.SlackBaseTool.html |
5155880eaa95-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[... | https://api.python.langchain.com/en/latest/tools/langchain_community.tools.slack.base.SlackBaseTool.html |
5155880eaa95-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.slack.base.SlackBaseTool.html |
5155880eaa95-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.slack.base.SlackBaseTool.html |
5155880eaa95-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.slack.base.SlackBaseTool.html |
5155880eaa95-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.slack.base.SlackBaseTool.html |
5155880eaa95-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.slack.base.SlackBaseTool.html |
5155880eaa95-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.slack.base.SlackBaseTool.html |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.