Tony20100/langchain_full huggingface dataset:
Parameters
include (Optional[Union[AbstractSetIntStr, MappingIntStrAny]]) – 
exclude (Optional[Union[AbstractSetIntStr, MappingIntStrAny]]) – 
by_alias (bool) – 
skip_defaults (Optional[bool]) – 
exclude_unset (bool) – 
exclude_defaults (bool) – 
exclude_none (bool) – 
encoder (Optional[Callable[[Any], Any]]) – 
models_as_dict (bool) – 
dumps_kwargs (Any) – 
Return type
unicode
classmethod parse_file(path: Union[str, Path], *, content_type: unicode = None, encoding: unicode = 'utf8', proto: Protocol = None, allow_pickle: bool = False) → Model¶
Parameters
path (Union[str, Path]) – 
content_type (unicode) – 
encoding (unicode) – 
proto (Protocol) – 
allow_pickle (bool) – 
Return type
Model
classmethod parse_obj(obj: Any) → Model¶
Parameters
obj (Any) – 
Return type
Model
classmethod parse_raw(b: Union[str, bytes], *, content_type: unicode = None, encoding: unicode = 'utf8', proto: Protocol = None, allow_pickle: bool = False) → Model¶
Parameters
b (Union[str, bytes]) – 
content_type (unicode) – 
encoding (unicode) – 
proto (Protocol) – 
allow_pickle (bool) – 
Return type
Model
raw_results(query: str, **kwargs: Any) → Dict[source]¶
Run query through you.com Search and return hits.
Parameters
query (str) – The query to search for.
num_web_results – The maximum number of results to return.
safesearch – Safesearch settings,
safesearch – Safesearch settings,
one of off, moderate, strict, defaults to moderate
country – Country code
kwargs (Any) – 
Return type
Dict
Returns: YouAPIOutput
async raw_results_async(query: str, **kwargs: Any) → Dict[source]¶
Get results from the you.com Search API asynchronously.
Parameters
query (str) – 
kwargs (Any) – 
Return type
Dict
results(query: str, **kwargs: Any) → List[Document][source]¶
Run query through you.com Search and parses results into Documents.
Parameters
query (str) – 
kwargs (Any) – 
Return type
List[Document]
async results_async(query: str, **kwargs: Any) → List[Document][source]¶
Parameters
query (str) – 
kwargs (Any) – 
Return type
List[Document]
classmethod schema(by_alias: bool = True, ref_template: unicode = '#/definitions/{model}') → DictStrAny¶
Parameters
by_alias (bool) – 
ref_template (unicode) – 
Return type
DictStrAny
classmethod schema_json(*, by_alias: bool = True, ref_template: unicode = '#/definitions/{model}', **dumps_kwargs: Any) → unicode¶
Parameters
by_alias (bool) – 
ref_template (unicode) – 
dumps_kwargs (Any) – 
Return type
unicode
classmethod update_forward_refs(**localns: Any) → None¶
Try to update ForwardRefs on fields based on this Model, globalns and localns.
Parameters
localns (Any) – 
Return type
None
classmethod validate(value: Any) → Model¶
Parameters
value (Any) – 
Return type
Model
Examples using YouSearchAPIWrapper¶
You.com
langchain_community.utilities.clickup.Task¶
class langchain_community.utilities.clickup.Task(id: int, name: str, text_content: str, description: str, status: str, creator_id: int, creator_username: str, creator_email: str, assignees: List[Dict[str, Any]], watchers: List[Dict[str, Any]], priority: Optional[str], due_date: Optional[str], start_date: Optional[str], points: int, team_id: int, project_id: int)[source]¶
Class for a task.
Attributes
id
name
text_content
description
status
creator_id
creator_username
creator_email
assignees
watchers
priority
due_date
start_date
points
team_id
project_id
Methods
__init__(id, name, text_content, ...)
from_data(data)
Parameters
id (int) – 
name (str) – 
text_content (str) – 
description (str) – 
status (str) – 
creator_id (int) – 
creator_username (str) – 
creator_email (str) – 
assignees (List[Dict[str, Any]]) – 
watchers (List[Dict[str, Any]]) – 
priority (Optional[str]) – 
due_date (Optional[str]) – 
start_date (Optional[str]) – 
points (int) – 
team_id (int) – 
project_id (int) –
team_id (int) – 
project_id (int) – 
__init__(id: int, name: str, text_content: str, description: str, status: str, creator_id: int, creator_username: str, creator_email: str, assignees: List[Dict[str, Any]], watchers: List[Dict[str, Any]], priority: Optional[str], due_date: Optional[str], start_date: Optional[str], points: int, team_id: int, project_id: int) → None¶
Parameters
id (int) – 
name (str) – 
text_content (str) – 
description (str) – 
status (str) – 
creator_id (int) – 
creator_username (str) – 
creator_email (str) – 
assignees (List[Dict[str, Any]]) – 
watchers (List[Dict[str, Any]]) – 
priority (Optional[str]) – 
due_date (Optional[str]) – 
start_date (Optional[str]) – 
points (int) – 
team_id (int) – 
project_id (int) – 
Return type
None
classmethod from_data(data: Dict[str, Any]) → Task[source]¶
Parameters
data (Dict[str, Any]) – 
Return type
Task
langchain_community.utilities.requests.GenericRequestsWrapper¶
class langchain_community.utilities.requests.GenericRequestsWrapper[source]¶
Bases: BaseModel
Lightweight wrapper around requests library.
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 aiosession: Optional[ClientSession] = None¶
param auth: Optional[Any] = None¶
param headers: Optional[Dict[str, str]] = None¶
param response_content_type: Literal['text', 'json'] = 'text'¶
async adelete(url: str, **kwargs: Any) → Union[str, Dict[str, Any]][source]¶
DELETE the URL and return the text asynchronously.
Parameters
url (str) – 
kwargs (Any) – 
Return type
Union[str, Dict[str, Any]]
async aget(url: str, **kwargs: Any) → Union[str, Dict[str, Any]][source]¶
GET the URL and return the text asynchronously.
Parameters
url (str) – 
kwargs (Any) – 
Return type
Union[str, Dict[str, Any]]
async apatch(url: str, data: Dict[str, Any], **kwargs: Any) → Union[str, Dict[str, Any]][source]¶
PATCH the URL and return the text asynchronously.
Parameters
url (str) – 
data (Dict[str, Any]) – 
kwargs (Any) – 
Return type
Union[str, Dict[str, Any]]
async apost(url: str, data: Dict[str, Any], **kwargs: Any) → Union[str, Dict[str, Any]][source]¶
POST to the URL and return the text asynchronously.
Parameters
url (str) – 
data (Dict[str, Any]) – 
kwargs (Any) – 
Return type
data (Dict[str, Any]) – 
kwargs (Any) – 
Return type
Union[str, Dict[str, Any]]
async aput(url: str, data: Dict[str, Any], **kwargs: Any) → Union[str, Dict[str, Any]][source]¶
PUT the URL and return the text asynchronously.
Parameters
url (str) – 
data (Dict[str, Any]) – 
kwargs (Any) – 
Return type
Union[str, Dict[str, Any]]
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
Parameters
_fields_set (Optional[SetStr]) – 
values (Any) – 
Return type
Model
copy(*, include: Optional[Union[AbstractSetIntStr, MappingIntStrAny]] = None, exclude: Optional[Union[AbstractSetIntStr, MappingIntStrAny]] = None, update: Optional[DictStrAny] = None, deep: bool = False) → Model¶
Duplicate a model, optionally choose which fields to include, exclude and change.
Parameters
include (Optional[Union[AbstractSetIntStr, MappingIntStrAny]]) – fields to include in new model
exclude (Optional[Union[AbstractSetIntStr, MappingIntStrAny]]) – fields to exclude from new model, as with values this takes precedence over include
update (Optional[DictStrAny]) – values to change/add in the new model. Note: the data is not validated before creating
the new model: you should trust this data
the new model: you should trust this data
deep (bool) – set to True to make a deep copy of the model
self (Model) – 
Returns
new model instance
Return type
Model
delete(url: str, **kwargs: Any) → Union[str, Dict[str, Any]][source]¶
DELETE the URL and return the text.
Parameters
url (str) – 
kwargs (Any) – 
Return type
Union[str, Dict[str, Any]]
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, exclude_defaults: bool = False, exclude_none: bool = False) → DictStrAny¶
Generate a dictionary representation of the model, optionally specifying which fields to include or exclude.
Parameters
include (Optional[Union[AbstractSetIntStr, MappingIntStrAny]]) – 
exclude (Optional[Union[AbstractSetIntStr, MappingIntStrAny]]) – 
by_alias (bool) – 
skip_defaults (Optional[bool]) – 
exclude_unset (bool) – 
exclude_defaults (bool) – 
exclude_none (bool) – 
Return type
DictStrAny
classmethod from_orm(obj: Any) → Model¶
Parameters
obj (Any) – 
Return type
Model
get(url: str, **kwargs: Any) → Union[str, Dict[str, Any]][source]¶
GET the URL and return the text.
Parameters
url (str) – 
kwargs (Any) – 
Return type
Union[str, Dict[str, Any]]
Parameters
obj (Any) – 
Return type
Model
classmethod parse_raw(b: Union[str, bytes], *, content_type: unicode = None, encoding: unicode = 'utf8', proto: Protocol = None, allow_pickle: bool = False) → Model¶
Parameters
b (Union[str, bytes]) – 
content_type (unicode) – 
encoding (unicode) – 
proto (Protocol) – 
allow_pickle (bool) – 
Return type
Model
patch(url: str, data: Dict[str, Any], **kwargs: Any) → Union[str, Dict[str, Any]][source]¶
PATCH the URL and return the text.
Parameters
url (str) – 
data (Dict[str, Any]) – 
kwargs (Any) – 
Return type
Union[str, Dict[str, Any]]
post(url: str, data: Dict[str, Any], **kwargs: Any) → Union[str, Dict[str, Any]][source]¶
POST to the URL and return the text.
Parameters
url (str) – 
data (Dict[str, Any]) – 
kwargs (Any) – 
Return type
Union[str, Dict[str, Any]]
put(url: str, data: Dict[str, Any], **kwargs: Any) → Union[str, Dict[str, Any]][source]¶
PUT the URL and return the text.
Parameters
url (str) – 
data (Dict[str, Any]) – 
kwargs (Any) – 
Return type
Union[str, Dict[str, Any]]
classmethod schema(by_alias: bool = True, ref_template: unicode = '#/definitions/{model}') → DictStrAny¶
Parameters
by_alias (bool) – 
ref_template (unicode) – 
Return type
DictStrAny
ref_template (unicode) – 
Return type
DictStrAny
classmethod schema_json(*, by_alias: bool = True, ref_template: unicode = '#/definitions/{model}', **dumps_kwargs: Any) → unicode¶
Parameters
by_alias (bool) – 
ref_template (unicode) – 
dumps_kwargs (Any) – 
Return type
unicode
classmethod update_forward_refs(**localns: Any) → None¶
Try to update ForwardRefs on fields based on this Model, globalns and localns.
Parameters
localns (Any) – 
Return type
None
classmethod validate(value: Any) → Model¶
Parameters
value (Any) – 
Return type
Model
property requests: Requests¶
langchain_community.utilities.pebblo.App¶
class langchain_community.utilities.pebblo.App[source]¶
Bases: BaseModel
Pebblo AI application.
Parameters
name (str) – Name of the app.
owner (str) – Owner of the app.
description (Optional[str]) – Description of the app.
load_id (str) – Unique load_id of the app instance.
runtime (Runtime) – Runtime details of app.
framework (Framework) – Framework details of the app
plugin_version (str) – Plugin version used for the app.
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 description: Optional[str] = None¶
param framework: Framework [Required]¶
param load_id: str [Required]¶
param name: str [Required]¶
param owner: str [Required]¶
param plugin_version: str [Required]¶
param runtime: Runtime [Required]¶
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
Parameters
_fields_set (Optional[SetStr]) – 
values (Any) – 
Return type
Model
copy(*, include: Optional[Union[AbstractSetIntStr, MappingIntStrAny]] = None, exclude: Optional[Union[AbstractSetIntStr, MappingIntStrAny]] = None, update: Optional[DictStrAny] = None, deep: bool = False) → Model¶
Duplicate a model, optionally choose which fields to include, exclude and change.
Parameters
langchain_community.utilities.duckduckgo_search.DuckDuckGoSearchAPIWrapper¶
class langchain_community.utilities.duckduckgo_search.DuckDuckGoSearchAPIWrapper[source]¶
Bases: BaseModel
Wrapper for DuckDuckGo Search API.
Free and does not require any setup.
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 backend: str = 'api'¶
Options: api, html, lite
param max_results: int = 5¶
param region: Optional[str] = 'wt-wt'¶
See https://pypi.org/project/duckduckgo-search/#regions
param safesearch: str = 'moderate'¶
Options: strict, moderate, off
param source: str = 'text'¶
Options: text, news
param time: Optional[str] = 'y'¶
Options: d, w, m, y
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
Parameters
_fields_set (Optional[SetStr]) – 
values (Any) – 
Return type
Model
copy(*, include: Optional[Union[AbstractSetIntStr, MappingIntStrAny]] = None, exclude: Optional[Union[AbstractSetIntStr, MappingIntStrAny]] = None, update: Optional[DictStrAny] = None, deep: bool = False) → Model¶
Duplicate a model, optionally choose which fields to include, exclude and change.
Parameters
Parameters
obj (Any) – 
Return type
Model
classmethod parse_raw(b: Union[str, bytes], *, content_type: unicode = None, encoding: unicode = 'utf8', proto: Protocol = None, allow_pickle: bool = False) → Model¶
Parameters
b (Union[str, bytes]) – 
content_type (unicode) – 
encoding (unicode) – 
proto (Protocol) – 
allow_pickle (bool) – 
Return type
Model
results(query: str, max_results: int, source: Optional[str] = None) → List[Dict[str, str]][source]¶
Run query through DuckDuckGo and return metadata.
Parameters
query (str) – The query to search for.
max_results (int) – The number of results to return.
source (Optional[str]) – The source to look from.
Returns
snippet - The description of the result.
title - The title of the result.
link - The link to the result.
Return type
A list of dictionaries with the following keys
run(query: str) → str[source]¶
Run query through DuckDuckGo and return concatenated results.
Parameters
query (str) – 
Return type
str
classmethod schema(by_alias: bool = True, ref_template: unicode = '#/definitions/{model}') → DictStrAny¶
Parameters
by_alias (bool) – 
ref_template (unicode) – 
Return type
DictStrAny
classmethod schema_json(*, by_alias: bool = True, ref_template: unicode = '#/definitions/{model}', **dumps_kwargs: Any) → unicode¶
Parameters
by_alias (bool) – 
ref_template (unicode) – 
dumps_kwargs (Any) – 
Return type
unicode
classmethod update_forward_refs(**localns: Any) → None¶
Return type
unicode
classmethod update_forward_refs(**localns: Any) → None¶
Try to update ForwardRefs on fields based on this Model, globalns and localns.
Parameters
localns (Any) – 
Return type
None
classmethod validate(value: Any) → Model¶
Parameters
value (Any) – 
Return type
Model
Examples using DuckDuckGoSearchAPIWrapper¶
DuckDuckGo Search
langchain_community.utilities.awslambda.LambdaWrapper¶
class langchain_community.utilities.awslambda.LambdaWrapper[source]¶
Bases: BaseModel
Wrapper for AWS Lambda SDK.
To use, you should have the boto3 package installed
and a lambda functions built from the AWS Console or
CLI. Set up your AWS credentials with aws configure
Example
pip install boto3
aws configure
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 awslambda_tool_description: Optional[str] = None¶
If passing to an agent as a tool, the description
param awslambda_tool_name: Optional[str] = None¶
If passing to an agent as a tool, the tool name
param function_name: Optional[str] = None¶
The name of your lambda function
param lambda_client: Any = None¶
The configured boto3 client
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
Parameters
_fields_set (Optional[SetStr]) – 
values (Any) – 
Return type
Model
copy(*, include: Optional[Union[AbstractSetIntStr, MappingIntStrAny]] = None, exclude: Optional[Union[AbstractSetIntStr, MappingIntStrAny]] = None, update: Optional[DictStrAny] = None, deep: bool = False) → Model¶
Duplicate a model, optionally choose which fields to include, exclude and change.
Parameters
Parameters
obj (Any) – 
Return type
Model
classmethod parse_raw(b: Union[str, bytes], *, content_type: unicode = None, encoding: unicode = 'utf8', proto: Protocol = None, allow_pickle: bool = False) → Model¶
Parameters
b (Union[str, bytes]) – 
content_type (unicode) – 
encoding (unicode) – 
proto (Protocol) – 
allow_pickle (bool) – 
Return type
Model
run(query: str) → str[source]¶
Invokes the lambda function and returns the
result.
Parameters
query (str) – an input to passed to the lambda
function as the body of a JSON
object.
Return type
str
classmethod schema(by_alias: bool = True, ref_template: unicode = '#/definitions/{model}') → DictStrAny¶
Parameters
by_alias (bool) – 
ref_template (unicode) – 
Return type
DictStrAny
classmethod schema_json(*, by_alias: bool = True, ref_template: unicode = '#/definitions/{model}', **dumps_kwargs: Any) → unicode¶
Parameters
by_alias (bool) – 
ref_template (unicode) – 
dumps_kwargs (Any) – 
Return type
unicode
classmethod update_forward_refs(**localns: Any) → None¶
Try to update ForwardRefs on fields based on this Model, globalns and localns.
Parameters
localns (Any) – 
Return type
None
classmethod validate(value: Any) → Model¶
Parameters
value (Any) – 
Return type
Model
langchain_community.utilities.you.YouHit¶
class langchain_community.utilities.you.YouHit[source]¶
Bases: YouHitMetadata
A single hit from you.com, which may contain multiple snippets
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 description: str [Required]¶
Details about the result
param snippets: List[str] [Required]¶
One or snippets of text
param thumbnail_url: str [Required]¶
Thumbnail associated with the result
param title: str [Required]¶
The title of the result
param url: str [Required]¶
The url of the result
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
Parameters
_fields_set (Optional[SetStr]) – 
values (Any) – 
Return type
Model
copy(*, include: Optional[Union[AbstractSetIntStr, MappingIntStrAny]] = None, exclude: Optional[Union[AbstractSetIntStr, MappingIntStrAny]] = None, update: Optional[DictStrAny] = None, deep: bool = False) → Model¶
Duplicate a model, optionally choose which fields to include, exclude and change.
Parameters
include (Optional[Union[AbstractSetIntStr, MappingIntStrAny]]) – fields to include in new model
exclude (Optional[Union[AbstractSetIntStr, MappingIntStrAny]]) – fields to exclude from new model, as with values this takes precedence over include
langchain_community.utilities.openapi.OpenAPISpec¶
class langchain_community.utilities.openapi.OpenAPISpec[source]¶
OpenAPI Model that removes mis-formatted parts of the spec.
Attributes
base_url
Get the base url.
openapi
Methods
__init__()
from_file(path)
Get an OpenAPI spec from a file path.
from_spec_dict(spec_dict)
Get an OpenAPI spec from a dict.
from_text(text)
Get an OpenAPI spec from a text.
from_url(url)
Get an OpenAPI spec from a URL.
get_cleaned_operation_id(operation, path, method)
Get a cleaned operation id from an operation id.
get_methods_for_path(path)
Return a list of valid methods for the specified path.
get_operation(path, method)
Get the operation object for a given path and HTTP method.
get_parameters_for_operation(operation)
Get the components for a given operation.
get_parameters_for_path(path)
get_referenced_schema(ref)
Get a schema (or nested reference) or err.
get_request_body_for_operation(operation)
Get the request body for a given operation.
get_schema(schema)
parse_obj(obj)
__init__()¶
classmethod from_file(path: Union[str, Path]) → OpenAPISpec[source]¶
Get an OpenAPI spec from a file path.
Parameters
path (Union[str, Path]) – 
Return type
OpenAPISpec
classmethod from_spec_dict(spec_dict: dict) → OpenAPISpec[source]¶
Get an OpenAPI spec from a dict.
Parameters
spec_dict (dict) – 
Return type
OpenAPISpec
classmethod from_text(text: str) → OpenAPISpec[source]¶
Get an OpenAPI spec from a text.
Parameters
text (str) – 
Return type
OpenAPISpec
Parameters
text (str) – 
Return type
OpenAPISpec
classmethod from_url(url: str) → OpenAPISpec[source]¶
Get an OpenAPI spec from a URL.
Parameters
url (str) – 
Return type
OpenAPISpec
static get_cleaned_operation_id(operation: Operation, path: str, method: str) → str[source]¶
Get a cleaned operation id from an operation id.
Parameters
operation (Operation) – 
path (str) – 
method (str) – 
Return type
str
get_methods_for_path(path: str) → List[str][source]¶
Return a list of valid methods for the specified path.
Parameters
path (str) – 
Return type
List[str]
get_operation(path: str, method: str) → Operation[source]¶
Get the operation object for a given path and HTTP method.
Parameters
path (str) – 
method (str) – 
Return type
Operation
get_parameters_for_operation(operation: Operation) → List[Parameter][source]¶
Get the components for a given operation.
Parameters
operation (Operation) – 
Return type
List[Parameter]
get_parameters_for_path(path: str) → List[Parameter][source]¶
Parameters
path (str) – 
Return type
List[Parameter]
get_referenced_schema(ref: Reference) → Schema[source]¶
Get a schema (or nested reference) or err.
Parameters
ref (Reference) – 
Return type
Schema
get_request_body_for_operation(operation: Operation) → Optional[RequestBody][source]¶
Get the request body for a given operation.
Parameters
operation (Operation) – 
Return type
Optional[RequestBody]
get_schema(schema: Union[Reference, Schema]) → Schema[source]¶
Parameters
langchain_community.utilities.vertexai.raise_vertex_import_error¶
langchain_community.utilities.vertexai.raise_vertex_import_error(minimum_expected_version: str = '1.38.0') → None[source]¶
Raise ImportError related to Vertex SDK being not available.
Parameters
minimum_expected_version (str) – The lowest expected version of the SDK.
Raises
ImportError – an ImportError that mentions a required version of the SDK.
Return type
None