id stringlengths 14 16 | text stringlengths 13 2.7k | source stringlengths 57 178 |
|---|---|---|
27d7cf9f91ff-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.sql_database.tool.QuerySQLDataBaseTool.html |
27d7cf9f91ff-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.sql_database.tool.QuerySQLDataBaseTool.html |
27d7cf9f91ff-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.sql_database.tool.QuerySQLDataBaseTool.html |
27d7cf9f91ff-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.sql_database.tool.QuerySQLDataBaseTool.html |
27d7cf9f91ff-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.sql_database.tool.QuerySQLDataBaseTool.html |
27d7cf9f91ff-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.sql_database.tool.QuerySQLDataBaseTool.html |
39a9a20d3081-0 | langchain.tools.gmail.utils.get_gmail_credentials¶
langchain.tools.gmail.utils.get_gmail_credentials(token_file: Optional[str] = None, client_secrets_file: Optional[str] = None, scopes: Optional[List[str]] = None) → Credentials[source]¶
Get credentials.
Examples using get_gmail_credentials¶
Gmail | lang/api.python.langchain.com/en/latest/tools/langchain.tools.gmail.utils.get_gmail_credentials.html |
decd4e35edb4-0 | langchain.tools.file_management.write.WriteFileInput¶
class langchain.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 parsed to form a valid mo... | lang/api.python.langchain.com/en/latest/tools/langchain.tools.file_management.write.WriteFileInput.html |
decd4e35edb4-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... | lang/api.python.langchain.com/en/latest/tools/langchain.tools.file_management.write.WriteFileInput.html |
decd4e35edb4-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... | lang/api.python.langchain.com/en/latest/tools/langchain.tools.file_management.write.WriteFileInput.html |
bc913db45efd-0 | langchain.tools.memorize.tool.TrainableLLM¶
class langchain.tools.memorize.tool.TrainableLLM(*args, **kwargs)[source]¶
Methods
__init__(*args, **kwargs)
atrain_unsupervised(inputs, **kwargs)
train_unsupervised(inputs, **kwargs)
__init__(*args, **kwargs)¶
abstract async atrain_unsupervised(inputs: Sequence[str], **kwarg... | lang/api.python.langchain.com/en/latest/tools/langchain.tools.memorize.tool.TrainableLLM.html |
c1900c190dda-0 | langchain.tools.file_management.utils.get_validated_relative_path¶
langchain.tools.file_management.utils.get_validated_relative_path(root: Path, user_path: str) → Path[source]¶
Resolve a relative path, raising an error if not within the root directory. | lang/api.python.langchain.com/en/latest/tools/langchain.tools.file_management.utils.get_validated_relative_path.html |
8f19ce495803-0 | langchain.tools.file_management.file_search.FileSearchInput¶
class langchain.tools.file_management.file_search.FileSearchInput[source]¶
Bases: BaseModel
Input for FileSearchTool.
Create a new model by parsing and validating input data from keyword arguments.
Raises ValidationError if the input data cannot be parsed to ... | lang/api.python.langchain.com/en/latest/tools/langchain.tools.file_management.file_search.FileSearchInput.html |
8f19ce495803-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... | lang/api.python.langchain.com/en/latest/tools/langchain.tools.file_management.file_search.FileSearchInput.html |
8f19ce495803-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... | lang/api.python.langchain.com/en/latest/tools/langchain.tools.file_management.file_search.FileSearchInput.html |
df71aade3f5b-0 | langchain.tools.playwright.navigate.NavigateTool¶
class langchain.tools.playwright.navigate.NavigateTool[source]¶
Bases: BaseBrowserTool
Tool for navigating a browser to a URL.
Security Note: This tool provides code to control web-browser navigation.
This tool can navigate to any URL, including internal network URLs, a... | lang/api.python.langchain.com/en/latest/tools/langchain.tools.playwright.navigate.NavigateTool.html |
df71aade3f5b-1 | param metadata: Optional[Dict[str, Any]] = None¶
Optional metadata associated with the tool. Defaults to None
This metadata will be associated with each call to this tool,
and passed as arguments to the handlers defined in callbacks.
You can use these to eg identify a specific instance of a tool with its use case.
para... | lang/api.python.langchain.com/en/latest/tools/langchain.tools.playwright.navigate.NavigateTool.html |
df71aade3f5b-2 | 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 default implementation allows usage of async code even if
the runnable did no... | lang/api.python.langchain.com/en/latest/tools/langchain.tools.playwright.navigate.NavigateTool.html |
df71aade3f5b-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... | lang/api.python.langchain.com/en/latest/tools/langchain.tools.playwright.navigate.NavigateTool.html |
df71aade3f5b-4 | Returns
A pydantic model that can be used to validate config.
configurable_alternatives(which: ConfigurableField, default_key: str = 'default', **kwargs: Union[Runnable[Input, Output], Callable[[], Runnable[Input, Output]]]) → RunnableSerializable[Input, Output]¶
configurable_fields(**kwargs: Union[ConfigurableField, C... | lang/api.python.langchain.com/en/latest/tools/langchain.tools.playwright.navigate.NavigateTool.html |
df71aade3f5b-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... | lang/api.python.langchain.com/en/latest/tools/langchain.tools.playwright.navigate.NavigateTool.html |
df71aade3f5b-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 ... | lang/api.python.langchain.com/en/latest/tools/langchain.tools.playwright.navigate.NavigateTool.html |
df71aade3f5b-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... | lang/api.python.langchain.com/en/latest/tools/langchain.tools.playwright.navigate.NavigateTool.html |
df71aade3f5b-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... | lang/api.python.langchain.com/en/latest/tools/langchain.tools.playwright.navigate.NavigateTool.html |
df71aade3f5b-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 ... | lang/api.python.langchain.com/en/latest/tools/langchain.tools.playwright.navigate.NavigateTool.html |
c62312b00767-0 | langchain.tools.json.tool.JsonGetValueTool¶
class langchain.tools.json.tool.JsonGetValueTool[source]¶
Bases: BaseTool
Tool for getting a value in a JSON spec.
Create a new model by parsing and validating input data from keyword arguments.
Raises ValidationError if the input data cannot be parsed to form a valid model.
... | lang/api.python.langchain.com/en/latest/tools/langchain.tools.json.tool.JsonGetValueTool.html |
c62312b00767-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 ... | lang/api.python.langchain.com/en/latest/tools/langchain.tools.json.tool.JsonGetValueTool.html |
c62312b00767-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.json.tool.JsonGetValueTool.html |
c62312b00767-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.json.tool.JsonGetValueTool.html |
c62312b00767-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.json.tool.JsonGetValueTool.html |
c62312b00767-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.json.tool.JsonGetValueTool.html |
c62312b00767-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.json.tool.JsonGetValueTool.html |
c62312b00767-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.json.tool.JsonGetValueTool.html |
c62312b00767-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.json.tool.JsonGetValueTool.html |
c62312b00767-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.json.tool.JsonGetValueTool.html |
96292d775078-0 | langchain.tools.google_cloud.texttospeech.GoogleCloudTextToSpeechTool¶
class langchain.tools.google_cloud.texttospeech.GoogleCloudTextToSpeechTool[source]¶
Bases: BaseTool
Tool that queries the Google Cloud Text to Speech API.
In order to set this up, follow instructions at:
https://cloud.google.com/text-to-speech/docs... | lang/api.python.langchain.com/en/latest/tools/langchain.tools.google_cloud.texttospeech.GoogleCloudTextToSpeechTool.html |
96292d775078-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... | lang/api.python.langchain.com/en/latest/tools/langchain.tools.google_cloud.texttospeech.GoogleCloudTextToSpeechTool.html |
96292d775078-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_cloud.texttospeech.GoogleCloudTextToSpeechTool.html |
96292d775078-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_cloud.texttospeech.GoogleCloudTextToSpeechTool.html |
96292d775078-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_cloud.texttospeech.GoogleCloudTextToSpeechTool.html |
96292d775078-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_cloud.texttospeech.GoogleCloudTextToSpeechTool.html |
96292d775078-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_cloud.texttospeech.GoogleCloudTextToSpeechTool.html |
96292d775078-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_cloud.texttospeech.GoogleCloudTextToSpeechTool.html |
96292d775078-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_cloud.texttospeech.GoogleCloudTextToSpeechTool.html |
96292d775078-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_cloud.texttospeech.GoogleCloudTextToSpeechTool.html |
4c2c15bfa9d9-0 | langchain.tools.wikipedia.tool.WikipediaQueryRun¶
class langchain.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 parsed to form a vali... | lang/api.python.langchain.com/en/latest/tools/langchain.tools.wikipedia.tool.WikipediaQueryRun.html |
4c2c15bfa9d9-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.wikipedia.tool.WikipediaQueryRun.html |
4c2c15bfa9d9-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.wikipedia.tool.WikipediaQueryRun.html |
4c2c15bfa9d9-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.wikipedia.tool.WikipediaQueryRun.html |
4c2c15bfa9d9-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.wikipedia.tool.WikipediaQueryRun.html |
4c2c15bfa9d9-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.wikipedia.tool.WikipediaQueryRun.html |
4c2c15bfa9d9-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.wikipedia.tool.WikipediaQueryRun.html |
4c2c15bfa9d9-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.wikipedia.tool.WikipediaQueryRun.html |
4c2c15bfa9d9-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.wikipedia.tool.WikipediaQueryRun.html |
4c2c15bfa9d9-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.wikipedia.tool.WikipediaQueryRun.html |
013ce5f7ef6f-0 | langchain.tools.metaphor_search.tool.MetaphorSearchResults¶
class langchain.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 ValidationError if th... | lang/api.python.langchain.com/en/latest/tools/langchain.tools.metaphor_search.tool.MetaphorSearchResults.html |
013ce5f7ef6f-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.metaphor_search.tool.MetaphorSearchResults.html |
013ce5f7ef6f-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.metaphor_search.tool.MetaphorSearchResults.html |
013ce5f7ef6f-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.metaphor_search.tool.MetaphorSearchResults.html |
013ce5f7ef6f-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.metaphor_search.tool.MetaphorSearchResults.html |
013ce5f7ef6f-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.metaphor_search.tool.MetaphorSearchResults.html |
013ce5f7ef6f-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.metaphor_search.tool.MetaphorSearchResults.html |
013ce5f7ef6f-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.metaphor_search.tool.MetaphorSearchResults.html |
013ce5f7ef6f-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.metaphor_search.tool.MetaphorSearchResults.html |
013ce5f7ef6f-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.metaphor_search.tool.MetaphorSearchResults.html |
4f04ee86e810-0 | langchain.tools.sql_database.tool.BaseSQLDatabaseTool¶
class langchain.tools.sql_database.tool.BaseSQLDatabaseTool[source]¶
Bases: BaseModel
Base tool for interacting with a SQL database.
Create a new model by parsing and validating input data from keyword arguments.
Raises ValidationError if the input data cannot be p... | lang/api.python.langchain.com/en/latest/tools/langchain.tools.sql_database.tool.BaseSQLDatabaseTool.html |
4f04ee86e810-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... | lang/api.python.langchain.com/en/latest/tools/langchain.tools.sql_database.tool.BaseSQLDatabaseTool.html |
4f04ee86e810-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... | lang/api.python.langchain.com/en/latest/tools/langchain.tools.sql_database.tool.BaseSQLDatabaseTool.html |
c5c8694e4e97-0 | langchain.tools.playwright.utils.run_async¶
langchain.tools.playwright.utils.run_async(coro: Coroutine[Any, Any, T]) → T[source]¶
Run an async coroutine.
Parameters
coro – The coroutine to run. Coroutine[Any, Any, T]
Returns
The result of the coroutine.
Return type
T | lang/api.python.langchain.com/en/latest/tools/langchain.tools.playwright.utils.run_async.html |
94bd8482cc59-0 | langchain.tools.render.format_tool_to_openai_tool¶
langchain.tools.render.format_tool_to_openai_tool(tool: BaseTool) → ToolDescription[source]¶
Format tool into the OpenAI function API. | lang/api.python.langchain.com/en/latest/tools/langchain.tools.render.format_tool_to_openai_tool.html |
726313636b8e-0 | langchain.tools.requests.tool.RequestsPutTool¶
class langchain.tools.requests.tool.RequestsPutTool[source]¶
Bases: BaseRequestsTool, BaseTool
Tool for making a PUT request to an API endpoint.
Create a new model by parsing and validating input data from keyword arguments.
Raises ValidationError if the input data cannot ... | lang/api.python.langchain.com/en/latest/tools/langchain.tools.requests.tool.RequestsPutTool.html |
726313636b8e-1 | You can use these to eg identify a specific instance of a tool with its use case.
param name: str = 'requests_put'¶
The unique name of the tool that clearly communicates its purpose.
param requests_wrapper: 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.RequestsPutTool.html |
726313636b8e-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.RequestsPutTool.html |
726313636b8e-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.RequestsPutTool.html |
726313636b8e-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.RequestsPutTool.html |
726313636b8e-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.RequestsPutTool.html |
726313636b8e-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.RequestsPutTool.html |
726313636b8e-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.RequestsPutTool.html |
726313636b8e-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.RequestsPutTool.html |
726313636b8e-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.RequestsPutTool.html |
262234b6bba7-0 | langchain.tools.playwright.navigate.NavigateToolInput¶
class langchain.tools.playwright.navigate.NavigateToolInput[source]¶
Bases: BaseModel
Input for NavigateToolInput.
Create a new model by parsing and validating input data from keyword arguments.
Raises ValidationError if the input data cannot be parsed to form a va... | lang/api.python.langchain.com/en/latest/tools/langchain.tools.playwright.navigate.NavigateToolInput.html |
262234b6bba7-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... | lang/api.python.langchain.com/en/latest/tools/langchain.tools.playwright.navigate.NavigateToolInput.html |
262234b6bba7-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... | lang/api.python.langchain.com/en/latest/tools/langchain.tools.playwright.navigate.NavigateToolInput.html |
b354c468c608-0 | langchain.tools.spark_sql.tool.BaseSparkSQLTool¶
class langchain.tools.spark_sql.tool.BaseSparkSQLTool[source]¶
Bases: BaseModel
Base tool for interacting with Spark SQL.
Create a new model by parsing and validating input data from keyword arguments.
Raises ValidationError if the input data cannot be parsed to form a v... | lang/api.python.langchain.com/en/latest/tools/langchain.tools.spark_sql.tool.BaseSparkSQLTool.html |
b354c468c608-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... | lang/api.python.langchain.com/en/latest/tools/langchain.tools.spark_sql.tool.BaseSparkSQLTool.html |
b354c468c608-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... | lang/api.python.langchain.com/en/latest/tools/langchain.tools.spark_sql.tool.BaseSparkSQLTool.html |
8e6135917686-0 | langchain.tools.sql_database.tool.InfoSQLDatabaseTool¶
class langchain.tools.sql_database.tool.InfoSQLDatabaseTool[source]¶
Bases: BaseSQLDatabaseTool, BaseTool
Tool for getting metadata about a SQL database.
Create a new model by parsing and validating input data from keyword arguments.
Raises ValidationError if the i... | lang/api.python.langchain.com/en/latest/tools/langchain.tools.sql_database.tool.InfoSQLDatabaseTool.html |
8e6135917686-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... | lang/api.python.langchain.com/en/latest/tools/langchain.tools.sql_database.tool.InfoSQLDatabaseTool.html |
8e6135917686-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.sql_database.tool.InfoSQLDatabaseTool.html |
8e6135917686-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.sql_database.tool.InfoSQLDatabaseTool.html |
8e6135917686-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.sql_database.tool.InfoSQLDatabaseTool.html |
8e6135917686-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.sql_database.tool.InfoSQLDatabaseTool.html |
8e6135917686-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.sql_database.tool.InfoSQLDatabaseTool.html |
8e6135917686-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.sql_database.tool.InfoSQLDatabaseTool.html |
8e6135917686-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.sql_database.tool.InfoSQLDatabaseTool.html |
8e6135917686-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.sql_database.tool.InfoSQLDatabaseTool.html |
70c0de522e7f-0 | langchain.tools.e2b_data_analysis.tool.E2BDataAnalysisToolArguments¶
class langchain.tools.e2b_data_analysis.tool.E2BDataAnalysisToolArguments[source]¶
Bases: BaseModel
Arguments for the E2BDataAnalysisTool.
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.e2b_data_analysis.tool.E2BDataAnalysisToolArguments.html |
70c0de522e7f-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... | lang/api.python.langchain.com/en/latest/tools/langchain.tools.e2b_data_analysis.tool.E2BDataAnalysisToolArguments.html |
70c0de522e7f-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... | lang/api.python.langchain.com/en/latest/tools/langchain.tools.e2b_data_analysis.tool.E2BDataAnalysisToolArguments.html |
427f1b438eda-0 | langchain.tools.multion.close_session.CloseSessionSchema¶
class langchain.tools.multion.close_session.CloseSessionSchema[source]¶
Bases: BaseModel
Input for UpdateSessionTool.
Create a new model by parsing and validating input data from keyword arguments.
Raises ValidationError if the input data cannot be parsed to for... | lang/api.python.langchain.com/en/latest/tools/langchain.tools.multion.close_session.CloseSessionSchema.html |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.