id stringlengths 14 16 | text stringlengths 13 2.7k | source stringlengths 57 178 |
|---|---|---|
23d8a5a6e8b1-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.office365.create_draft_message.O365CreateDraftMessage.html |
a46b4accc8e3-0 | langchain.tools.render.render_text_description_and_args¶
langchain.tools.render.render_text_description_and_args(tools: List[BaseTool]) → str[source]¶
Render the tool name, description, and args in plain text.
Output will be in the format of:
search: This tool is used for search, args: {"query": {"type": "string"}}
cal... | lang/api.python.langchain.com/en/latest/tools/langchain.tools.render.render_text_description_and_args.html |
1772f5699601-0 | langchain.tools.openapi.utils.api_models.APIPropertyBase¶
class langchain.tools.openapi.utils.api_models.APIPropertyBase[source]¶
Bases: BaseModel
Base model for an API property.
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.openapi.utils.api_models.APIPropertyBase.html |
1772f5699601-1 | 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(*, include: Optional[Union[AbstractSetIntStr, MappingIntStrAny]] = None, exclude: Optional[Union[AbstractSetIntStr, MappingIntStrAny]] = None, by_alias: bool = False, skip_defaults: Optional[boo... | lang/api.python.langchain.com/en/latest/tools/langchain.tools.openapi.utils.api_models.APIPropertyBase.html |
1772f5699601-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.openapi.utils.api_models.APIPropertyBase.html |
ff411bdaff75-0 | langchain.tools.openapi.utils.api_models.APIPropertyLocation¶
class langchain.tools.openapi.utils.api_models.APIPropertyLocation(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]¶
The location of the property.
QUERY = 'query'¶
PATH = 'path'¶
HEADER = 'header'¶
COOKIE = 'cookie... | lang/api.python.langchain.com/en/latest/tools/langchain.tools.openapi.utils.api_models.APIPropertyLocation.html |
fb1487d9286b-0 | langchain.tools.json.tool.JsonListKeysTool¶
class langchain.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 form a valid model.
par... | lang/api.python.langchain.com/en/latest/tools/langchain.tools.json.tool.JsonListKeysTool.html |
fb1487d9286b-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.JsonListKeysTool.html |
fb1487d9286b-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.JsonListKeysTool.html |
fb1487d9286b-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.JsonListKeysTool.html |
fb1487d9286b-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.JsonListKeysTool.html |
fb1487d9286b-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.JsonListKeysTool.html |
fb1487d9286b-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.JsonListKeysTool.html |
fb1487d9286b-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.JsonListKeysTool.html |
fb1487d9286b-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.JsonListKeysTool.html |
fb1487d9286b-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.JsonListKeysTool.html |
3b3bac67a808-0 | langchain.tools.bearly.tool.head_file¶
langchain.tools.bearly.tool.head_file(path: str, n: int) → List[str][source]¶
Get the first n lines of a file. | lang/api.python.langchain.com/en/latest/tools/langchain.tools.bearly.tool.head_file.html |
c7a853f37aa2-0 | langchain.tools.youtube.search.YouTubeSearchTool¶
class langchain.tools.youtube.search.YouTubeSearchTool[source]¶
Bases: BaseTool
Tool that queries YouTube.
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.
pa... | lang/api.python.langchain.com/en/latest/tools/langchain.tools.youtube.search.YouTubeSearchTool.html |
c7a853f37aa2-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.youtube.search.YouTubeSearchTool.html |
c7a853f37aa2-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.youtube.search.YouTubeSearchTool.html |
c7a853f37aa2-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.youtube.search.YouTubeSearchTool.html |
c7a853f37aa2-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.youtube.search.YouTubeSearchTool.html |
c7a853f37aa2-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.youtube.search.YouTubeSearchTool.html |
c7a853f37aa2-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.youtube.search.YouTubeSearchTool.html |
c7a853f37aa2-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.youtube.search.YouTubeSearchTool.html |
c7a853f37aa2-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.youtube.search.YouTubeSearchTool.html |
c7a853f37aa2-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.youtube.search.YouTubeSearchTool.html |
aab8c5c6e050-0 | langchain.tools.scenexplain.tool.SceneXplainTool¶
class langchain.tools.scenexplain.tool.SceneXplainTool[source]¶
Bases: BaseTool
Tool that explains images.
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.
pa... | lang/api.python.langchain.com/en/latest/tools/langchain.tools.scenexplain.tool.SceneXplainTool.html |
aab8c5c6e050-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.scenexplain.tool.SceneXplainTool.html |
aab8c5c6e050-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.scenexplain.tool.SceneXplainTool.html |
aab8c5c6e050-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.scenexplain.tool.SceneXplainTool.html |
aab8c5c6e050-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.scenexplain.tool.SceneXplainTool.html |
aab8c5c6e050-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.scenexplain.tool.SceneXplainTool.html |
aab8c5c6e050-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.scenexplain.tool.SceneXplainTool.html |
aab8c5c6e050-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.scenexplain.tool.SceneXplainTool.html |
aab8c5c6e050-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.scenexplain.tool.SceneXplainTool.html |
aab8c5c6e050-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.scenexplain.tool.SceneXplainTool.html |
405aed6cf18f-0 | langchain.tools.ainetwork.base.AINBaseTool¶
class langchain.tools.ainetwork.base.AINBaseTool[source]¶
Bases: BaseTool
Base class for the AINetwork tools.
Create a new model by parsing and validating input data from keyword arguments.
Raises ValidationError if the input data cannot be parsed to form a valid model.
param... | lang/api.python.langchain.com/en/latest/tools/langchain.tools.ainetwork.base.AINBaseTool.html |
405aed6cf18f-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... | lang/api.python.langchain.com/en/latest/tools/langchain.tools.ainetwork.base.AINBaseTool.html |
405aed6cf18f-2 | Run the tool asynchronously.
async astream(input: Input, config: Optional[RunnableConfig] = None, **kwargs: Optional[Any]) → AsyncIterator[Output]¶
Default implementation of astream, which calls ainvoke.
Subclasses should override this method if they support streaming output.
async astream_log(input: Any, config: Optio... | lang/api.python.langchain.com/en/latest/tools/langchain.tools.ainetwork.base.AINBaseTool.html |
405aed6cf18f-3 | Default implementation runs invoke in parallel using a thread pool executor.
The default implementation of batch works well for IO bound runnables.
Subclasses should override this method if they can batch more efficiently;
e.g., if the underlying runnable uses an API which supports a batch mode.
bind(**kwargs: Any) → R... | lang/api.python.langchain.com/en/latest/tools/langchain.tools.ainetwork.base.AINBaseTool.html |
405aed6cf18f-4 | Duplicate a model, optionally choose which fields to include, exclude and change.
Parameters
include – fields to include in new model
exclude – fields to exclude from new model, as with values this takes precedence over include
update – values to change/add in the new model. Note: the data is not validated before creat... | lang/api.python.langchain.com/en/latest/tools/langchain.tools.ainetwork.base.AINBaseTool.html |
405aed6cf18f-5 | 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... | lang/api.python.langchain.com/en/latest/tools/langchain.tools.ainetwork.base.AINBaseTool.html |
405aed6cf18f-6 | 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... | lang/api.python.langchain.com/en/latest/tools/langchain.tools.ainetwork.base.AINBaseTool.html |
405aed6cf18f-7 | 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... | lang/api.python.langchain.com/en/latest/tools/langchain.tools.ainetwork.base.AINBaseTool.html |
405aed6cf18f-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... | lang/api.python.langchain.com/en/latest/tools/langchain.tools.ainetwork.base.AINBaseTool.html |
405aed6cf18f-9 | A map of constructor argument names to secret ids.
For example,{“openai_api_key”: “OPENAI_API_KEY”}
property output_schema: Type[pydantic.main.BaseModel]¶
The type of output this runnable produces specified as a pydantic model. | lang/api.python.langchain.com/en/latest/tools/langchain.tools.ainetwork.base.AINBaseTool.html |
da27fa6551b2-0 | langchain.tools.openapi.utils.api_models.APIProperty¶
class langchain.tools.openapi.utils.api_models.APIProperty[source]¶
Bases: APIPropertyBase
A model for a property in the query, path, header, or cookie params.
Create a new model by parsing and validating input data from keyword arguments.
Raises ValidationError if ... | lang/api.python.langchain.com/en/latest/tools/langchain.tools.openapi.utils.api_models.APIProperty.html |
da27fa6551b2-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... | lang/api.python.langchain.com/en/latest/tools/langchain.tools.openapi.utils.api_models.APIProperty.html |
da27fa6551b2-2 | 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 = None, encoding: unicode = 'utf8', proto... | lang/api.python.langchain.com/en/latest/tools/langchain.tools.openapi.utils.api_models.APIProperty.html |
e3f86428ad72-0 | langchain.tools.base.create_schema_from_function¶
langchain.tools.base.create_schema_from_function(model_name: str, func: Callable) → Type[BaseModel][source]¶
Create a pydantic schema from a function’s signature.
:param model_name: Name to assign to the generated pydandic schema
:param func: Function to generate the sc... | lang/api.python.langchain.com/en/latest/tools/langchain.tools.base.create_schema_from_function.html |
804f8567d9d6-0 | langchain_experimental.tools.python.tool.PythonREPLTool¶
class langchain_experimental.tools.python.tool.PythonREPLTool[source]¶
Bases: BaseTool
A tool for running python code in a REPL.
Create a new model by parsing and validating input data from keyword arguments.
Raises ValidationError if the input data cannot be par... | lang/api.python.langchain.com/en/latest/tools/langchain_experimental.tools.python.tool.PythonREPLTool.html |
804f8567d9d6-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 sanitize_input: bool = True¶
param tags: Optional[List[str]] = None¶
Optional list of tags associated with the tool. Defaults to None
Thes... | lang/api.python.langchain.com/en/latest/tools/langchain_experimental.tools.python.tool.PythonREPLTool.html |
804f8567d9d6-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_experimental.tools.python.tool.PythonREPLTool.html |
804f8567d9d6-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_experimental.tools.python.tool.PythonREPLTool.html |
804f8567d9d6-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_experimental.tools.python.tool.PythonREPLTool.html |
804f8567d9d6-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_experimental.tools.python.tool.PythonREPLTool.html |
804f8567d9d6-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_experimental.tools.python.tool.PythonREPLTool.html |
804f8567d9d6-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_experimental.tools.python.tool.PythonREPLTool.html |
804f8567d9d6-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_experimental.tools.python.tool.PythonREPLTool.html |
804f8567d9d6-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_experimental.tools.python.tool.PythonREPLTool.html |
bc2d89916d6d-0 | langchain.tools.playwright.click.ClickToolInput¶
class langchain.tools.playwright.click.ClickToolInput[source]¶
Bases: BaseModel
Input for ClickTool.
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 sel... | lang/api.python.langchain.com/en/latest/tools/langchain.tools.playwright.click.ClickToolInput.html |
bc2d89916d6d-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.click.ClickToolInput.html |
bc2d89916d6d-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.click.ClickToolInput.html |
e0ea959ec5cd-0 | langchain.tools.file_management.list_dir.DirectoryListingInput¶
class langchain.tools.file_management.list_dir.DirectoryListingInput[source]¶
Bases: BaseModel
Input for ListDirectoryTool.
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.file_management.list_dir.DirectoryListingInput.html |
e0ea959ec5cd-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.list_dir.DirectoryListingInput.html |
e0ea959ec5cd-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.list_dir.DirectoryListingInput.html |
6432c0e07b59-0 | langchain.tools.file_management.utils.BaseFileToolMixin¶
class langchain.tools.file_management.utils.BaseFileToolMixin[source]¶
Bases: BaseModel
Mixin for file system tools.
Create a new model by parsing and validating input data from keyword arguments.
Raises ValidationError if the input data cannot be parsed to form ... | lang/api.python.langchain.com/en/latest/tools/langchain.tools.file_management.utils.BaseFileToolMixin.html |
6432c0e07b59-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.utils.BaseFileToolMixin.html |
6432c0e07b59-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... | lang/api.python.langchain.com/en/latest/tools/langchain.tools.file_management.utils.BaseFileToolMixin.html |
349ce3d17ded-0 | langchain.tools.azure_cognitive_services.form_recognizer.AzureCogsFormRecognizerTool¶
class langchain.tools.azure_cognitive_services.form_recognizer.AzureCogsFormRecognizerTool[source]¶
Bases: BaseTool
Tool that queries the Azure Cognitive Services Form Recognizer API.
In order to set this up, follow instructions at:
h... | lang/api.python.langchain.com/en/latest/tools/langchain.tools.azure_cognitive_services.form_recognizer.AzureCogsFormRecognizerTool.html |
349ce3d17ded-1 | You can use these to eg identify a specific instance of a tool with its use case.
param name: str = 'azure_cognitive_services_form_recognizer'¶
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
t... | lang/api.python.langchain.com/en/latest/tools/langchain.tools.azure_cognitive_services.form_recognizer.AzureCogsFormRecognizerTool.html |
349ce3d17ded-2 | Subclasses should override this method if they can run asynchronously.
async arun(tool_input: Union[str, Dict], verbose: Optional[bool] = None, start_color: Optional[str] = 'green', color: Optional[str] = 'green', callbacks: Optional[Union[List[BaseCallbackHandler], BaseCallbackManager]] = None, *, tags: Optional[List[... | lang/api.python.langchain.com/en/latest/tools/langchain.tools.azure_cognitive_services.form_recognizer.AzureCogsFormRecognizerTool.html |
349ce3d17ded-3 | The jsonpatch ops can be applied in order to construct state.
async atransform(input: AsyncIterator[Input], config: Optional[RunnableConfig] = None, **kwargs: Optional[Any]) → AsyncIterator[Output]¶
Default implementation of atransform, which buffers input and calls astream.
Subclasses should override this method if th... | lang/api.python.langchain.com/en/latest/tools/langchain.tools.azure_cognitive_services.form_recognizer.AzureCogsFormRecognizerTool.html |
349ce3d17ded-4 | classmethod construct(_fields_set: Optional[SetStr] = None, **values: Any) → Model¶
Creates a new model setting __dict__ and __fields_set__ from trusted or pre-validated data.
Default values are respected, but no other validation is performed.
Behaves as if Config.extra = ‘allow’ was set since it adds all passed values... | lang/api.python.langchain.com/en/latest/tools/langchain.tools.azure_cognitive_services.form_recognizer.AzureCogsFormRecognizerTool.html |
349ce3d17ded-5 | Get the namespace of the langchain object.
For example, if the class is langchain.llms.openai.OpenAI, then the
namespace is [“langchain”, “llms”, “openai”]
get_output_schema(config: Optional[RunnableConfig] = None) → Type[BaseModel]¶
Get a pydantic model that can be used to validate output to the runnable.
Runnables th... | lang/api.python.langchain.com/en/latest/tools/langchain.tools.azure_cognitive_services.form_recognizer.AzureCogsFormRecognizerTool.html |
349ce3d17ded-6 | classmethod is_lc_serializable() → bool¶
Is this class serializable?
json(*, include: Optional[Union[AbstractSetIntStr, MappingIntStrAny]] = None, exclude: Optional[Union[AbstractSetIntStr, MappingIntStrAny]] = None, by_alias: bool = False, skip_defaults: Optional[bool] = None, exclude_unset: bool = False, exclude_defa... | lang/api.python.langchain.com/en/latest/tools/langchain.tools.azure_cognitive_services.form_recognizer.AzureCogsFormRecognizerTool.html |
349ce3d17ded-7 | run(tool_input: Union[str, Dict], verbose: Optional[bool] = None, start_color: Optional[str] = 'green', color: Optional[str] = 'green', callbacks: Optional[Union[List[BaseCallbackHandler], BaseCallbackManager]] = None, *, tags: Optional[List[str]] = None, metadata: Optional[Dict[str, Any]] = None, run_name: Optional[st... | lang/api.python.langchain.com/en/latest/tools/langchain.tools.azure_cognitive_services.form_recognizer.AzureCogsFormRecognizerTool.html |
349ce3d17ded-8 | Bind config to a Runnable, returning a new Runnable.
with_fallbacks(fallbacks: Sequence[Runnable[Input, Output]], *, exceptions_to_handle: Tuple[Type[BaseException], ...] = (<class 'Exception'>,)) → RunnableWithFallbacksT[Input, Output]¶
Add fallbacks to a runnable, returning a new Runnable.
Parameters
fallbacks – A se... | lang/api.python.langchain.com/en/latest/tools/langchain.tools.azure_cognitive_services.form_recognizer.AzureCogsFormRecognizerTool.html |
349ce3d17ded-9 | between retries
stop_after_attempt – The maximum number of attempts to make before giving up
Returns
A new Runnable that retries the original runnable on exceptions.
with_types(*, input_type: Optional[Type[Input]] = None, output_type: Optional[Type[Output]] = None) → Runnable[Input, Output]¶
Bind input and output types... | lang/api.python.langchain.com/en/latest/tools/langchain.tools.azure_cognitive_services.form_recognizer.AzureCogsFormRecognizerTool.html |
12b6d54eff4c-0 | langchain.tools.ainetwork.owner.RuleSchema¶
class langchain.tools.ainetwork.owner.RuleSchema[source]¶
Bases: BaseModel
Schema for owner 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.
param addre... | lang/api.python.langchain.com/en/latest/tools/langchain.tools.ainetwork.owner.RuleSchema.html |
12b6d54eff4c-1 | 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... | lang/api.python.langchain.com/en/latest/tools/langchain.tools.ainetwork.owner.RuleSchema.html |
12b6d54eff4c-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... | lang/api.python.langchain.com/en/latest/tools/langchain.tools.ainetwork.owner.RuleSchema.html |
0ea030f4dc5a-0 | langchain.tools.ddg_search.tool.DDGInput¶
class langchain.tools.ddg_search.tool.DDGInput[source]¶
Bases: BaseModel
Create a new model by parsing and validating input data from keyword arguments.
Raises ValidationError if the input data cannot be parsed to form a valid model.
param query: str [Required]¶
search query to... | lang/api.python.langchain.com/en/latest/tools/langchain.tools.ddg_search.tool.DDGInput.html |
0ea030f4dc5a-1 | Generate a dictionary representation of the model, optionally specifying which fields to include or exclude.
classmethod from_orm(obj: Any) → Model¶
json(*, include: Optional[Union[AbstractSetIntStr, MappingIntStrAny]] = None, exclude: Optional[Union[AbstractSetIntStr, MappingIntStrAny]] = None, by_alias: bool = False,... | lang/api.python.langchain.com/en/latest/tools/langchain.tools.ddg_search.tool.DDGInput.html |
2b52c521c39e-0 | langchain.tools.bearly.tool.BearlyInterpreterTool¶
class langchain.tools.bearly.tool.BearlyInterpreterTool(api_key: str)[source]¶
Tool for evaluating python code in a sandbox environment.
Attributes
description
endpoint
file_description
files
name
api_key
Methods
__init__(api_key)
add_file(source_path, target_path, des... | lang/api.python.langchain.com/en/latest/tools/langchain.tools.bearly.tool.BearlyInterpreterTool.html |
51f735a7f45e-0 | langchain.tools.office365.utils.authenticate¶
langchain.tools.office365.utils.authenticate() → Account[source]¶
Authenticate using the Microsoft Grah API | lang/api.python.langchain.com/en/latest/tools/langchain.tools.office365.utils.authenticate.html |
8b00859abf4d-0 | langchain.tools.file_management.read.ReadFileInput¶
class langchain.tools.file_management.read.ReadFileInput[source]¶
Bases: BaseModel
Input for ReadFileTool.
Create a new model by parsing and validating input data from keyword arguments.
Raises ValidationError if the input data cannot be parsed to form a valid model.
... | lang/api.python.langchain.com/en/latest/tools/langchain.tools.file_management.read.ReadFileInput.html |
8b00859abf4d-1 | Generate a dictionary representation of the model, optionally specifying which fields to include or exclude.
classmethod from_orm(obj: Any) → Model¶
json(*, include: Optional[Union[AbstractSetIntStr, MappingIntStrAny]] = None, exclude: Optional[Union[AbstractSetIntStr, MappingIntStrAny]] = None, by_alias: bool = False,... | lang/api.python.langchain.com/en/latest/tools/langchain.tools.file_management.read.ReadFileInput.html |
8b62efe80887-0 | langchain.tools.bing_search.tool.BingSearchResults¶
class langchain.tools.bing_search.tool.BingSearchResults[source]¶
Bases: BaseTool
Tool that queries the Bing Search API and gets back json.
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.bing_search.tool.BingSearchResults.html |
8b62efe80887-1 | param num_results: int = 4¶
param return_direct: bool = False¶
Whether to return the tool’s output directly. Setting this to True means
that after the tool is called, the AgentExecutor will stop looping.
param tags: Optional[List[str]] = None¶
Optional list of tags associated with the tool. Defaults to None
These tags ... | lang/api.python.langchain.com/en/latest/tools/langchain.tools.bing_search.tool.BingSearchResults.html |
8b62efe80887-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.bing_search.tool.BingSearchResults.html |
8b62efe80887-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.bing_search.tool.BingSearchResults.html |
8b62efe80887-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.bing_search.tool.BingSearchResults.html |
8b62efe80887-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.bing_search.tool.BingSearchResults.html |
8b62efe80887-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.bing_search.tool.BingSearchResults.html |
8b62efe80887-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.bing_search.tool.BingSearchResults.html |
8b62efe80887-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.bing_search.tool.BingSearchResults.html |
8b62efe80887-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.bing_search.tool.BingSearchResults.html |
eb707600df49-0 | langchain.tools.ddg_search.tool.DuckDuckGoSearchTool¶
langchain.tools.ddg_search.tool.DuckDuckGoSearchTool(*args: Any, **kwargs: Any) → DuckDuckGoSearchRun[source]¶
Deprecated. Use DuckDuckGoSearchRun instead.
Parameters
*args –
**kwargs –
Returns
DuckDuckGoSearchRun | lang/api.python.langchain.com/en/latest/tools/langchain.tools.ddg_search.tool.DuckDuckGoSearchTool.html |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.