id
stringlengths 14
15
| text
stringlengths 35
2.07k
| embedding
sequence | source
stringlengths 61
154
|
---|---|---|---|
7c53389c6f0e-1 | Asynchronously get documents relevant to a query.
:param query: string to find relevant documents for
:param callbacks: Callback manager or list of callbacks
Returns
List of relevant documents
get_relevant_documents(query: str, *, callbacks: Callbacks = None, **kwargs: Any) → List[Document]¶
Retrieve documents relevant to a query.
:param query: string to find relevant documents for
:param callbacks: Callback manager or list of callbacks
Returns
List of relevant documents | [
2170,
55294,
636,
9477,
9959,
311,
264,
3319,
627,
68416,
3319,
25,
925,
311,
1505,
9959,
9477,
369,
198,
68416,
27777,
25,
23499,
6783,
477,
1160,
315,
27777,
198,
16851,
198,
861,
315,
9959,
9477,
198,
456,
1311,
8532,
77027,
10974,
25,
610,
11,
12039,
27777,
25,
23499,
82,
284,
2290,
11,
3146,
9872,
25,
5884,
8,
11651,
1796,
58,
7676,
60,
55609,
198,
88765,
9477,
9959,
311,
264,
3319,
627,
68416,
3319,
25,
925,
311,
1505,
9959,
9477,
369,
198,
68416,
27777,
25,
23499,
6783,
477,
1160,
315,
27777,
198,
16851,
198,
861,
315,
9959,
9477
] | https://langchain.readthedocs.io/en/latest/retrievers/langchain.retrievers.kendra.AmazonKendraRetriever.html |
ec1c47f815e6-0 | langchain.retrievers.weaviate_hybrid_search.WeaviateHybridSearchRetriever¶
class langchain.retrievers.weaviate_hybrid_search.WeaviateHybridSearchRetriever(client: Any, index_name: str, text_key: str, alpha: float = 0.5, k: int = 4, attributes: Optional[List[str]] = None, create_schema_if_missing: bool = True)[source]¶
Bases: BaseRetriever
Methods
__init__(client, index_name, text_key[, ...])
add_documents(docs, **kwargs)
Upload documents to Weaviate.
aget_relevant_documents(query, *[, callbacks])
Asynchronously get documents relevant to a query.
get_relevant_documents(query, *[, callbacks])
Retrieve documents relevant to a query.
class Config[source]¶
Bases: object
Configuration for this pydantic object.
arbitrary_types_allowed = True¶
extra = 'forbid'¶
add_documents(docs: List[Document], **kwargs: Any) → List[str][source]¶
Upload documents to Weaviate.
async aget_relevant_documents(query: str, *, callbacks: Callbacks = None, **kwargs: Any) → List[Document]¶
Asynchronously get documents relevant to a query.
:param query: string to find relevant documents for
:param callbacks: Callback manager or list of callbacks
Returns
List of relevant documents
get_relevant_documents(query: str, *, callbacks: Callbacks = None, **kwargs: Any) → List[Document]¶
Retrieve documents relevant to a query.
:param query: string to find relevant documents for
:param callbacks: Callback manager or list of callbacks
Returns
List of relevant documents | [
5317,
8995,
1351,
9104,
3078,
31339,
6321,
349,
1552,
94490,
10947,
23210,
6321,
349,
31916,
16621,
6014,
12289,
462,
2099,
55609,
198,
1058,
8859,
8995,
1351,
9104,
3078,
31339,
6321,
349,
1552,
94490,
10947,
23210,
6321,
349,
31916,
16621,
6014,
12289,
462,
2099,
13097,
25,
5884,
11,
1963,
1292,
25,
610,
11,
1495,
3173,
25,
610,
11,
8451,
25,
2273,
284,
220,
15,
13,
20,
11,
597,
25,
528,
284,
220,
19,
11,
8365,
25,
12536,
53094,
17752,
5163,
284,
2290,
11,
1893,
26443,
11366,
41547,
25,
1845,
284,
3082,
6758,
2484,
60,
55609,
198,
33,
2315,
25,
5464,
12289,
462,
2099,
198,
18337,
198,
565,
2381,
3889,
3045,
11,
4194,
1275,
1292,
11,
4194,
1342,
3173,
38372,
4194,
1131,
2608,
723,
77027,
90519,
11,
4194,
334,
9872,
340,
14165,
9477,
311,
1226,
6321,
349,
627,
85163,
1311,
8532,
77027,
10974,
11,
4194,
9,
38372,
4194,
69411,
2608,
2170,
55294,
636,
9477,
9959,
311,
264,
3319,
627,
456,
1311,
8532,
77027,
10974,
11,
4194,
9,
38372,
4194,
69411,
2608,
88765,
9477,
9959,
311,
264,
3319,
627,
1058,
5649,
76747,
60,
55609,
198,
33,
2315,
25,
1665,
198,
7843,
369,
420,
4611,
67,
8322,
1665,
627,
277,
88951,
9962,
43255,
284,
3082,
55609,
198,
15824,
284,
364,
2000,
21301,
6,
55609,
198,
723,
77027,
90519,
25,
1796,
58,
7676,
1145,
3146,
9872,
25,
5884,
8,
11651,
1796,
17752,
1483,
2484,
60,
55609,
198,
14165,
9477,
311,
1226,
6321,
349,
627,
7847,
264,
456,
1311,
8532,
77027,
10974,
25,
610,
11,
12039,
27777,
25,
23499,
82,
284,
2290,
11,
3146,
9872,
25,
5884,
8,
11651,
1796,
58,
7676,
60,
55609,
198,
2170,
55294,
636,
9477,
9959,
311,
264,
3319,
627,
68416,
3319,
25,
925,
311,
1505,
9959,
9477,
369,
198,
68416,
27777,
25,
23499,
6783,
477,
1160,
315,
27777,
198,
16851,
198,
861,
315,
9959,
9477,
198,
456,
1311,
8532,
77027,
10974,
25,
610,
11,
12039,
27777,
25,
23499,
82,
284,
2290,
11,
3146,
9872,
25,
5884,
8,
11651,
1796,
58,
7676,
60,
55609,
198,
88765,
9477,
9959,
311,
264,
3319,
627,
68416,
3319,
25,
925,
311,
1505,
9959,
9477,
369,
198,
68416,
27777,
25,
23499,
6783,
477,
1160,
315,
27777,
198,
16851,
198,
861,
315,
9959,
9477
] | https://langchain.readthedocs.io/en/latest/retrievers/langchain.retrievers.weaviate_hybrid_search.WeaviateHybridSearchRetriever.html |
83437e1ba2df-0 | langchain.retrievers.kendra.RetrieveResultItem¶
class langchain.retrievers.kendra.RetrieveResultItem(*, Content: Optional[str] = None, DocumentAttributes: Optional[List[DocumentAttribute]] = [], DocumentId: Optional[str] = None, DocumentTitle: Optional[str] = None, DocumentURI: Optional[str] = None, Id: Optional[str] = None, **extra_data: Any)[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 Content: Optional[str] = None¶
param DocumentAttributes: Optional[List[langchain.retrievers.kendra.DocumentAttribute]] = []¶
param DocumentId: Optional[str] = None¶
param DocumentTitle: Optional[str] = None¶
param DocumentURI: Optional[str] = None¶
param Id: Optional[str] = None¶
get_excerpt() → str[source]¶
to_doc() → Document[source]¶ | [
5317,
8995,
1351,
9104,
3078,
5314,
61799,
53946,
46104,
2122,
1256,
55609,
198,
1058,
8859,
8995,
1351,
9104,
3078,
5314,
61799,
53946,
46104,
2122,
1256,
4163,
11,
9059,
25,
12536,
17752,
60,
284,
2290,
11,
12051,
10738,
25,
12536,
53094,
58,
7676,
3994,
5163,
284,
10277,
12051,
769,
25,
12536,
17752,
60,
284,
2290,
11,
12051,
3936,
25,
12536,
17752,
60,
284,
2290,
11,
12051,
10514,
25,
12536,
17752,
60,
284,
2290,
11,
5336,
25,
12536,
17752,
60,
284,
2290,
11,
3146,
15824,
1807,
25,
5884,
6758,
2484,
60,
55609,
198,
33,
2315,
25,
65705,
198,
4110,
264,
502,
1646,
555,
23115,
323,
69772,
1988,
828,
505,
16570,
6105,
627,
36120,
54129,
422,
279,
1988,
828,
4250,
387,
16051,
311,
1376,
264,
2764,
1646,
627,
913,
9059,
25,
12536,
17752,
60,
284,
2290,
55609,
198,
913,
12051,
10738,
25,
12536,
53094,
58,
5317,
8995,
1351,
9104,
3078,
5314,
61799,
27352,
3994,
5163,
284,
3132,
55609,
198,
913,
12051,
769,
25,
12536,
17752,
60,
284,
2290,
55609,
198,
913,
12051,
3936,
25,
12536,
17752,
60,
284,
2290,
55609,
198,
913,
12051,
10514,
25,
12536,
17752,
60,
284,
2290,
55609,
198,
913,
5336,
25,
12536,
17752,
60,
284,
2290,
55609,
198,
456,
68047,
368,
11651,
610,
76747,
60,
55609,
198,
998,
19401,
368,
11651,
12051,
76747,
60,
55609
] | https://langchain.readthedocs.io/en/latest/retrievers/langchain.retrievers.kendra.RetrieveResultItem.html |
9e069408469e-0 | langchain.retrievers.knn.KNNRetriever¶
class langchain.retrievers.knn.KNNRetriever(*, embeddings: Embeddings, index: Any = None, texts: List[str], k: int = 4, relevancy_threshold: Optional[float] = None)[source]¶
Bases: BaseRetriever, BaseModel
KNN Retriever.
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 embeddings: langchain.embeddings.base.Embeddings [Required]¶
param index: Any = None¶
param k: int = 4¶
param relevancy_threshold: Optional[float] = None¶
param texts: List[str] [Required]¶
async aget_relevant_documents(query: str, *, callbacks: Callbacks = None, **kwargs: Any) → List[Document]¶
Asynchronously get documents relevant to a query.
:param query: string to find relevant documents for
:param callbacks: Callback manager or list of callbacks
Returns
List of relevant documents
classmethod from_texts(texts: List[str], embeddings: Embeddings, **kwargs: Any) → KNNRetriever[source]¶
get_relevant_documents(query: str, *, callbacks: Callbacks = None, **kwargs: Any) → List[Document]¶
Retrieve documents relevant to a query.
:param query: string to find relevant documents for
:param callbacks: Callback manager or list of callbacks
Returns
List of relevant documents
model Config[source]¶
Bases: object
Configuration for this pydantic object.
arbitrary_types_allowed = True¶ | [
5317,
8995,
1351,
9104,
3078,
5314,
7521,
11606,
9944,
12289,
462,
2099,
55609,
198,
1058,
8859,
8995,
1351,
9104,
3078,
5314,
7521,
11606,
9944,
12289,
462,
2099,
4163,
11,
71647,
25,
38168,
25624,
11,
1963,
25,
5884,
284,
2290,
11,
22755,
25,
1796,
17752,
1145,
597,
25,
528,
284,
220,
19,
11,
79415,
6709,
22616,
25,
12536,
96481,
60,
284,
2290,
6758,
2484,
60,
55609,
198,
33,
2315,
25,
5464,
12289,
462,
2099,
11,
65705,
198,
42,
9944,
10608,
462,
2099,
627,
4110,
264,
502,
1646,
555,
23115,
323,
69772,
1988,
828,
505,
16570,
6105,
627,
36120,
54129,
422,
279,
1988,
828,
4250,
387,
16051,
311,
1376,
264,
2764,
1646,
627,
913,
71647,
25,
8859,
8995,
41541,
25624,
9105,
58955,
25624,
510,
8327,
60,
55609,
198,
913,
1963,
25,
5884,
284,
2290,
55609,
198,
913,
597,
25,
528,
284,
220,
19,
55609,
198,
913,
79415,
6709,
22616,
25,
12536,
96481,
60,
284,
2290,
55609,
198,
913,
22755,
25,
1796,
17752,
60,
510,
8327,
60,
55609,
198,
7847,
264,
456,
1311,
8532,
77027,
10974,
25,
610,
11,
12039,
27777,
25,
23499,
82,
284,
2290,
11,
3146,
9872,
25,
5884,
8,
11651,
1796,
58,
7676,
60,
55609,
198,
2170,
55294,
636,
9477,
9959,
311,
264,
3319,
627,
68416,
3319,
25,
925,
311,
1505,
9959,
9477,
369,
198,
68416,
27777,
25,
23499,
6783,
477,
1160,
315,
27777,
198,
16851,
198,
861,
315,
9959,
9477,
198,
27853,
505,
80746,
7383,
82,
25,
1796,
17752,
1145,
71647,
25,
38168,
25624,
11,
3146,
9872,
25,
5884,
8,
11651,
735,
9944,
12289,
462,
2099,
76747,
60,
55609,
198,
456,
1311,
8532,
77027,
10974,
25,
610,
11,
12039,
27777,
25,
23499,
82,
284,
2290,
11,
3146,
9872,
25,
5884,
8,
11651,
1796,
58,
7676,
60,
55609,
198,
88765,
9477,
9959,
311,
264,
3319,
627,
68416,
3319,
25,
925,
311,
1505,
9959,
9477,
369,
198,
68416,
27777,
25,
23499,
6783,
477,
1160,
315,
27777,
198,
16851,
198,
861,
315,
9959,
9477,
198,
2590,
5649,
76747,
60,
55609,
198,
33,
2315,
25,
1665,
198,
7843,
369,
420,
4611,
67,
8322,
1665,
627,
277,
88951,
9962,
43255,
284,
3082,
55609
] | https://langchain.readthedocs.io/en/latest/retrievers/langchain.retrievers.knn.KNNRetriever.html |
b4eb1363e8c5-0 | langchain.retrievers.kendra.TextWithHighLights¶
class langchain.retrievers.kendra.TextWithHighLights(*, Text: str, Highlights: Optional[Any] = None, **extra_data: Any)[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 Highlights: Optional[Any] = None¶
param Text: str [Required]¶ | [
5317,
8995,
1351,
9104,
3078,
5314,
61799,
2021,
2409,
12243,
75584,
55609,
198,
1058,
8859,
8995,
1351,
9104,
3078,
5314,
61799,
2021,
2409,
12243,
75584,
4163,
11,
2991,
25,
610,
11,
53300,
25,
12536,
71401,
60,
284,
2290,
11,
3146,
15824,
1807,
25,
5884,
6758,
2484,
60,
55609,
198,
33,
2315,
25,
65705,
198,
4110,
264,
502,
1646,
555,
23115,
323,
69772,
1988,
828,
505,
16570,
6105,
627,
36120,
54129,
422,
279,
1988,
828,
4250,
387,
16051,
311,
1376,
264,
2764,
1646,
627,
913,
53300,
25,
12536,
71401,
60,
284,
2290,
55609,
198,
913,
2991,
25,
610,
510,
8327,
60,
55609
] | https://langchain.readthedocs.io/en/latest/retrievers/langchain.retrievers.kendra.TextWithHighLights.html |
aac6beec7c27-0 | langchain.retrievers.databerry.DataberryRetriever¶
class langchain.retrievers.databerry.DataberryRetriever(datastore_url: str, top_k: Optional[int] = None, api_key: Optional[str] = None)[source]¶
Bases: BaseRetriever
Retriever that uses the Databerry API.
Methods
__init__(datastore_url[, top_k, api_key])
aget_relevant_documents(query, *[, callbacks])
Asynchronously get documents relevant to a query.
get_relevant_documents(query, *[, callbacks])
Retrieve documents relevant to a query.
Attributes
datastore_url
top_k
api_key
async aget_relevant_documents(query: str, *, callbacks: Callbacks = None, **kwargs: Any) → List[Document]¶
Asynchronously get documents relevant to a query.
:param query: string to find relevant documents for
:param callbacks: Callback manager or list of callbacks
Returns
List of relevant documents
get_relevant_documents(query: str, *, callbacks: Callbacks = None, **kwargs: Any) → List[Document]¶
Retrieve documents relevant to a query.
:param query: string to find relevant documents for
:param callbacks: Callback manager or list of callbacks
Returns
List of relevant documents
api_key: Optional[str]¶
datastore_url: str¶
top_k: Optional[int]¶ | [
5317,
8995,
1351,
9104,
3078,
32112,
5515,
920,
2143,
5515,
12289,
462,
2099,
55609,
198,
1058,
8859,
8995,
1351,
9104,
3078,
32112,
5515,
920,
2143,
5515,
12289,
462,
2099,
2657,
4412,
2975,
25,
610,
11,
1948,
4803,
25,
12536,
19155,
60,
284,
2290,
11,
6464,
3173,
25,
12536,
17752,
60,
284,
2290,
6758,
2484,
60,
55609,
198,
33,
2315,
25,
5464,
12289,
462,
2099,
198,
12289,
462,
2099,
430,
5829,
279,
423,
2143,
5515,
5446,
627,
18337,
198,
565,
2381,
3889,
695,
4412,
2975,
38372,
4194,
3565,
4803,
11,
4194,
2113,
3173,
2608,
85163,
1311,
8532,
77027,
10974,
11,
4194,
9,
38372,
4194,
69411,
2608,
2170,
55294,
636,
9477,
9959,
311,
264,
3319,
627,
456,
1311,
8532,
77027,
10974,
11,
4194,
9,
38372,
4194,
69411,
2608,
88765,
9477,
9959,
311,
264,
3319,
627,
10738,
198,
695,
4412,
2975,
198,
3565,
4803,
198,
2113,
3173,
198,
7847,
264,
456,
1311,
8532,
77027,
10974,
25,
610,
11,
12039,
27777,
25,
23499,
82,
284,
2290,
11,
3146,
9872,
25,
5884,
8,
11651,
1796,
58,
7676,
60,
55609,
198,
2170,
55294,
636,
9477,
9959,
311,
264,
3319,
627,
68416,
3319,
25,
925,
311,
1505,
9959,
9477,
369,
198,
68416,
27777,
25,
23499,
6783,
477,
1160,
315,
27777,
198,
16851,
198,
861,
315,
9959,
9477,
198,
456,
1311,
8532,
77027,
10974,
25,
610,
11,
12039,
27777,
25,
23499,
82,
284,
2290,
11,
3146,
9872,
25,
5884,
8,
11651,
1796,
58,
7676,
60,
55609,
198,
88765,
9477,
9959,
311,
264,
3319,
627,
68416,
3319,
25,
925,
311,
1505,
9959,
9477,
369,
198,
68416,
27777,
25,
23499,
6783,
477,
1160,
315,
27777,
198,
16851,
198,
861,
315,
9959,
9477,
198,
2113,
3173,
25,
12536,
17752,
60,
55609,
198,
695,
4412,
2975,
25,
610,
55609,
198,
3565,
4803,
25,
12536,
19155,
60,
55609
] | https://langchain.readthedocs.io/en/latest/retrievers/langchain.retrievers.databerry.DataberryRetriever.html |
a76b5ef76a5e-0 | langchain.retrievers.self_query.qdrant.QdrantTranslator¶
class langchain.retrievers.self_query.qdrant.QdrantTranslator(metadata_key: str)[source]¶
Bases: Visitor
Logic for converting internal query language elements to valid filters.
Methods
__init__(metadata_key)
visit_comparison(comparison)
Translate a Comparison.
visit_operation(operation)
Translate an Operation.
visit_structured_query(structured_query)
Translate a StructuredQuery.
Attributes
allowed_comparators
allowed_operators
visit_comparison(comparison: Comparison) → rest.FieldCondition[source]¶
Translate a Comparison.
visit_operation(operation: Operation) → rest.Filter[source]¶
Translate an Operation.
visit_structured_query(structured_query: StructuredQuery) → Tuple[str, dict][source]¶
Translate a StructuredQuery.
allowed_comparators: Optional[Sequence[Comparator]] = None¶
allowed_operators: Optional[Sequence[Operator]] = None¶ | [
5317,
8995,
1351,
9104,
3078,
28248,
5857,
11608,
3696,
519,
10208,
3696,
519,
52753,
55609,
198,
1058,
8859,
8995,
1351,
9104,
3078,
28248,
5857,
11608,
3696,
519,
10208,
3696,
519,
52753,
55536,
3173,
25,
610,
6758,
2484,
60,
55609,
198,
33,
2315,
25,
56982,
198,
27849,
369,
34537,
5419,
3319,
4221,
5540,
311,
2764,
13711,
627,
18337,
198,
565,
2381,
3889,
18103,
3173,
340,
28560,
91897,
14426,
36642,
340,
28573,
264,
43551,
627,
28560,
33665,
53447,
340,
28573,
459,
17145,
627,
28560,
15477,
3149,
5857,
6294,
3149,
5857,
340,
28573,
264,
16531,
3149,
2929,
627,
10738,
198,
21642,
3038,
1768,
3046,
198,
21642,
26716,
3046,
198,
28560,
91897,
14426,
36642,
25,
43551,
8,
11651,
2800,
17525,
10770,
76747,
60,
55609,
198,
28573,
264,
43551,
627,
28560,
33665,
53447,
25,
17145,
8,
11651,
2800,
32796,
76747,
60,
55609,
198,
28573,
459,
17145,
627,
28560,
15477,
3149,
5857,
6294,
3149,
5857,
25,
16531,
3149,
2929,
8,
11651,
25645,
17752,
11,
6587,
1483,
2484,
60,
55609,
198,
28573,
264,
16531,
3149,
2929,
627,
21642,
3038,
1768,
3046,
25,
12536,
58,
14405,
58,
39758,
5163,
284,
2290,
55609,
198,
21642,
26716,
3046,
25,
12536,
58,
14405,
58,
18968,
5163,
284,
2290,
55609
] | https://langchain.readthedocs.io/en/latest/retrievers/langchain.retrievers.self_query.qdrant.QdrantTranslator.html |
de6375f1e4ba-0 | langchain.retrievers.document_compressors.cohere_rerank.CohereRerank¶
class langchain.retrievers.document_compressors.cohere_rerank.CohereRerank(*, client: Client, top_n: int = 3, model: str = 'rerank-english-v2.0')[source]¶
Bases: BaseDocumentCompressor
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 client: Client [Required]¶
param model: str = 'rerank-english-v2.0'¶
param top_n: int = 3¶
async acompress_documents(documents: Sequence[Document], query: str, callbacks: Optional[Union[List[BaseCallbackHandler], BaseCallbackManager]] = None) → Sequence[Document][source]¶
Compress retrieved documents given the query context.
compress_documents(documents: Sequence[Document], query: str, callbacks: Optional[Union[List[BaseCallbackHandler], BaseCallbackManager]] = None) → Sequence[Document][source]¶
Compress retrieved documents given the query context.
validator validate_environment » all fields[source]¶
Validate that api key and python package exists in environment.
model Config[source]¶
Bases: object
Configuration for this pydantic object.
arbitrary_types_allowed = True¶
extra = 'forbid'¶ | [
5317,
8995,
1351,
9104,
3078,
17926,
88945,
1105,
522,
2319,
486,
1745,
261,
1201,
732,
2319,
486,
49,
261,
1201,
55609,
198,
1058,
8859,
8995,
1351,
9104,
3078,
17926,
88945,
1105,
522,
2319,
486,
1745,
261,
1201,
732,
2319,
486,
49,
261,
1201,
4163,
11,
3016,
25,
8589,
11,
1948,
1107,
25,
528,
284,
220,
18,
11,
1646,
25,
610,
284,
364,
38149,
1201,
12,
30220,
8437,
17,
13,
15,
13588,
2484,
60,
55609,
198,
33,
2315,
25,
5464,
7676,
1110,
57320,
198,
4110,
264,
502,
1646,
555,
23115,
323,
69772,
1988,
828,
505,
16570,
6105,
627,
36120,
54129,
422,
279,
1988,
828,
4250,
387,
16051,
311,
1376,
264,
2764,
1646,
627,
913,
3016,
25,
8589,
510,
8327,
60,
55609,
198,
913,
1646,
25,
610,
284,
364,
38149,
1201,
12,
30220,
8437,
17,
13,
15,
6,
55609,
198,
913,
1948,
1107,
25,
528,
284,
220,
18,
55609,
198,
7847,
264,
39460,
77027,
19702,
2901,
25,
29971,
58,
7676,
1145,
3319,
25,
610,
11,
27777,
25,
12536,
58,
33758,
53094,
58,
4066,
7646,
3126,
1145,
5464,
7646,
2087,
5163,
284,
2290,
8,
11651,
29971,
58,
7676,
1483,
2484,
60,
55609,
198,
1110,
1911,
31503,
9477,
2728,
279,
3319,
2317,
627,
39460,
77027,
19702,
2901,
25,
29971,
58,
7676,
1145,
3319,
25,
610,
11,
27777,
25,
12536,
58,
33758,
53094,
58,
4066,
7646,
3126,
1145,
5464,
7646,
2087,
5163,
284,
2290,
8,
11651,
29971,
58,
7676,
1483,
2484,
60,
55609,
198,
1110,
1911,
31503,
9477,
2728,
279,
3319,
2317,
627,
16503,
9788,
52874,
4194,
8345,
4194,
682,
5151,
76747,
60,
55609,
198,
18409,
430,
6464,
1401,
323,
10344,
6462,
6866,
304,
4676,
627,
2590,
5649,
76747,
60,
55609,
198,
33,
2315,
25,
1665,
198,
7843,
369,
420,
4611,
67,
8322,
1665,
627,
277,
88951,
9962,
43255,
284,
3082,
55609,
198,
15824,
284,
364,
2000,
21301,
6,
55609
] | https://langchain.readthedocs.io/en/latest/retrievers/langchain.retrievers.document_compressors.cohere_rerank.CohereRerank.html |
a13f1c6e2be7-0 | langchain.retrievers.kendra.RetrieveResult¶
class langchain.retrievers.kendra.RetrieveResult(*, QueryId: str, ResultItems: List[RetrieveResultItem], **extra_data: Any)[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 QueryId: str [Required]¶
param ResultItems: List[langchain.retrievers.kendra.RetrieveResultItem] [Required]¶
get_top_k_docs(top_n: int) → List[Document][source]¶ | [
5317,
8995,
1351,
9104,
3078,
5314,
61799,
53946,
46104,
2122,
55609,
198,
1058,
8859,
8995,
1351,
9104,
3078,
5314,
61799,
53946,
46104,
2122,
4163,
11,
11615,
769,
25,
610,
11,
5832,
4451,
25,
1796,
58,
88765,
2122,
1256,
1145,
3146,
15824,
1807,
25,
5884,
6758,
2484,
60,
55609,
198,
33,
2315,
25,
65705,
198,
4110,
264,
502,
1646,
555,
23115,
323,
69772,
1988,
828,
505,
16570,
6105,
627,
36120,
54129,
422,
279,
1988,
828,
4250,
387,
16051,
311,
1376,
264,
2764,
1646,
627,
913,
11615,
769,
25,
610,
510,
8327,
60,
55609,
198,
913,
5832,
4451,
25,
1796,
58,
5317,
8995,
1351,
9104,
3078,
5314,
61799,
53946,
46104,
2122,
1256,
60,
510,
8327,
60,
55609,
198,
456,
10643,
4803,
50792,
18100,
1107,
25,
528,
8,
11651,
1796,
58,
7676,
1483,
2484,
60,
55609
] | https://langchain.readthedocs.io/en/latest/retrievers/langchain.retrievers.kendra.RetrieveResult.html |
5c7aaba7a069-0 | langchain.retrievers.pinecone_hybrid_search.create_index¶
langchain.retrievers.pinecone_hybrid_search.create_index(contexts: List[str], index: Any, embeddings: Embeddings, sparse_encoder: Any, ids: Optional[List[str]] = None, metadatas: Optional[List[dict]] = None) → None[source]¶
Create a Pinecone index from a list of contexts.
Modifies the index argument in-place.
Parameters
contexts – List of contexts to embed.
index – Pinecone index to use.
embeddings – Embeddings model to use.
sparse_encoder – Sparse encoder to use.
ids – List of ids to use for the documents.
metadatas – List of metadata to use for the documents. | [
5317,
8995,
1351,
9104,
3078,
558,
483,
59182,
1552,
94490,
10947,
2581,
3644,
55609,
198,
5317,
8995,
1351,
9104,
3078,
558,
483,
59182,
1552,
94490,
10947,
2581,
3644,
5491,
82,
25,
1796,
17752,
1145,
1963,
25,
5884,
11,
71647,
25,
38168,
25624,
11,
34544,
40168,
25,
5884,
11,
14483,
25,
12536,
53094,
17752,
5163,
284,
2290,
11,
2322,
329,
19907,
25,
12536,
53094,
58,
8644,
5163,
284,
2290,
8,
11651,
2290,
76747,
60,
55609,
198,
4110,
264,
42609,
59182,
1963,
505,
264,
1160,
315,
38697,
627,
4559,
9803,
279,
1963,
5811,
304,
42761,
627,
9905,
198,
73027,
1389,
1796,
315,
38697,
311,
11840,
627,
1275,
1389,
42609,
59182,
1963,
311,
1005,
627,
12529,
25624,
1389,
38168,
25624,
1646,
311,
1005,
627,
99323,
40168,
1389,
72894,
24592,
311,
1005,
627,
3447,
1389,
1796,
315,
14483,
311,
1005,
369,
279,
9477,
627,
4150,
329,
19907,
1389,
1796,
315,
11408,
311,
1005,
369,
279,
9477,
13
] | https://langchain.readthedocs.io/en/latest/retrievers/langchain.retrievers.pinecone_hybrid_search.create_index.html |
175be8176b49-0 | langchain.retrievers.self_query.myscale.DEFAULT_COMPOSER¶
langchain.retrievers.self_query.myscale.DEFAULT_COMPOSER(op_name: str) → Callable[source]¶
Default composer for logical operators.
Parameters
op_name – Name of the operator.
Returns
Callable that takes a list of arguments and returns a string. | [
5317,
8995,
1351,
9104,
3078,
28248,
5857,
749,
84009,
15209,
7021,
17914,
643,
55609,
198,
5317,
8995,
1351,
9104,
3078,
28248,
5857,
749,
84009,
15209,
7021,
17914,
643,
17534,
1292,
25,
610,
8,
11651,
54223,
76747,
60,
55609,
198,
3760,
40550,
369,
20406,
20197,
627,
9905,
198,
454,
1292,
1389,
4076,
315,
279,
5793,
627,
16851,
198,
41510,
430,
5097,
264,
1160,
315,
6105,
323,
4780,
264,
925,
13
] | https://langchain.readthedocs.io/en/latest/retrievers/langchain.retrievers.self_query.myscale.DEFAULT_COMPOSER.html |
78a84407a39b-0 | langchain.retrievers.document_compressors.embeddings_filter.EmbeddingsFilter¶
class langchain.retrievers.document_compressors.embeddings_filter.EmbeddingsFilter(*, embeddings: ~langchain.embeddings.base.Embeddings, similarity_fn: ~typing.Callable = <function cosine_similarity>, k: ~typing.Optional[int] = 20, similarity_threshold: ~typing.Optional[float] = None)[source]¶
Bases: BaseDocumentCompressor
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 embeddings: langchain.embeddings.base.Embeddings [Required]¶
Embeddings to use for embedding document contents and queries.
param k: Optional[int] = 20¶
The number of relevant documents to return. Can be set to None, in which case
similarity_threshold must be specified. Defaults to 20.
param similarity_fn: Callable = <function cosine_similarity>¶
Similarity function for comparing documents. Function expected to take as input
two matrices (List[List[float]]) and return a matrix of scores where higher values
indicate greater similarity.
param similarity_threshold: Optional[float] = None¶
Threshold for determining when two documents are similar enough
to be considered redundant. Defaults to None, must be specified if k is set
to None.
async acompress_documents(documents: Sequence[Document], query: str, callbacks: Optional[Union[List[BaseCallbackHandler], BaseCallbackManager]] = None) → Sequence[Document][source]¶
Filter down documents.
compress_documents(documents: Sequence[Document], query: str, callbacks: Optional[Union[List[BaseCallbackHandler], BaseCallbackManager]] = None) → Sequence[Document][source]¶
Filter documents based on similarity of their embeddings to the query.
validator validate_params » all fields[source]¶ | [
5317,
8995,
1351,
9104,
3078,
17926,
88945,
1105,
41541,
25624,
8901,
58955,
25624,
5750,
55609,
198,
1058,
8859,
8995,
1351,
9104,
3078,
17926,
88945,
1105,
41541,
25624,
8901,
58955,
25624,
5750,
4163,
11,
71647,
25,
4056,
5317,
8995,
41541,
25624,
9105,
58955,
25624,
11,
38723,
15604,
25,
4056,
90902,
28115,
481,
284,
366,
1723,
76359,
77336,
8226,
597,
25,
4056,
90902,
37464,
19155,
60,
284,
220,
508,
11,
38723,
22616,
25,
4056,
90902,
37464,
96481,
60,
284,
2290,
6758,
2484,
60,
55609,
198,
33,
2315,
25,
5464,
7676,
1110,
57320,
198,
4110,
264,
502,
1646,
555,
23115,
323,
69772,
1988,
828,
505,
16570,
6105,
627,
36120,
54129,
422,
279,
1988,
828,
4250,
387,
16051,
311,
1376,
264,
2764,
1646,
627,
913,
71647,
25,
8859,
8995,
41541,
25624,
9105,
58955,
25624,
510,
8327,
60,
55609,
198,
26566,
25624,
311,
1005,
369,
40188,
2246,
8970,
323,
20126,
627,
913,
597,
25,
12536,
19155,
60,
284,
220,
508,
55609,
198,
791,
1396,
315,
9959,
9477,
311,
471,
13,
3053,
387,
743,
311,
2290,
11,
304,
902,
1162,
198,
15124,
49325,
22616,
2011,
387,
5300,
13,
37090,
311,
220,
508,
627,
913,
38723,
15604,
25,
54223,
284,
366,
1723,
76359,
77336,
29,
55609,
198,
35502,
488,
734,
369,
27393,
9477,
13,
5830,
3685,
311,
1935,
439,
1988,
198,
20375,
36295,
320,
861,
53094,
96481,
30716,
323,
471,
264,
6303,
315,
12483,
1405,
5190,
2819,
198,
485,
8630,
7191,
38723,
627,
913,
38723,
22616,
25,
12536,
96481,
60,
284,
2290,
55609,
198,
38941,
369,
26679,
994,
1403,
9477,
527,
4528,
3403,
198,
998,
387,
6646,
48832,
13,
37090,
311,
2290,
11,
2011,
387,
5300,
422,
597,
374,
743,
198,
998,
2290,
627,
7847,
264,
39460,
77027,
19702,
2901,
25,
29971,
58,
7676,
1145,
3319,
25,
610,
11,
27777,
25,
12536,
58,
33758,
53094,
58,
4066,
7646,
3126,
1145,
5464,
7646,
2087,
5163,
284,
2290,
8,
11651,
29971,
58,
7676,
1483,
2484,
60,
55609,
198,
5750,
1523,
9477,
627,
39460,
77027,
19702,
2901,
25,
29971,
58,
7676,
1145,
3319,
25,
610,
11,
27777,
25,
12536,
58,
33758,
53094,
58,
4066,
7646,
3126,
1145,
5464,
7646,
2087,
5163,
284,
2290,
8,
11651,
29971,
58,
7676,
1483,
2484,
60,
55609,
198,
5750,
9477,
3196,
389,
38723,
315,
872,
71647,
311,
279,
3319,
627,
16503,
9788,
6887,
4194,
8345,
4194,
682,
5151,
76747,
60,
55609
] | https://langchain.readthedocs.io/en/latest/retrievers/langchain.retrievers.document_compressors.embeddings_filter.EmbeddingsFilter.html |
78a84407a39b-1 | validator validate_params » all fields[source]¶
Validate similarity parameters.
model Config[source]¶
Bases: object
Configuration for this pydantic object.
arbitrary_types_allowed = True¶ | [
16503,
9788,
6887,
4194,
8345,
4194,
682,
5151,
76747,
60,
55609,
198,
18409,
38723,
5137,
627,
2590,
5649,
76747,
60,
55609,
198,
33,
2315,
25,
1665,
198,
7843,
369,
420,
4611,
67,
8322,
1665,
627,
277,
88951,
9962,
43255,
284,
3082,
55609
] | https://langchain.readthedocs.io/en/latest/retrievers/langchain.retrievers.document_compressors.embeddings_filter.EmbeddingsFilter.html |
77593c6c891d-0 | langchain.retrievers.pinecone_hybrid_search.hash_text¶
langchain.retrievers.pinecone_hybrid_search.hash_text(text: str) → str[source]¶
Hash a text using SHA256.
Parameters
text – Text to hash.
Returns
Hashed text. | [
5317,
8995,
1351,
9104,
3078,
558,
483,
59182,
1552,
94490,
10947,
15452,
4424,
55609,
198,
5317,
8995,
1351,
9104,
3078,
558,
483,
59182,
1552,
94490,
10947,
15452,
4424,
7383,
25,
610,
8,
11651,
610,
76747,
60,
55609,
198,
6504,
264,
1495,
1701,
22466,
4146,
627,
9905,
198,
1342,
1389,
2991,
311,
5286,
627,
16851,
198,
6504,
291,
1495,
13
] | https://langchain.readthedocs.io/en/latest/retrievers/langchain.retrievers.pinecone_hybrid_search.hash_text.html |
25200c654b18-0 | langchain.retrievers.multi_query.LineList¶
class langchain.retrievers.multi_query.LineList(*, lines: List[str])[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 lines: List[str] [Required]¶
Lines of text | [
5317,
8995,
1351,
9104,
3078,
52251,
5857,
16825,
861,
55609,
198,
1058,
8859,
8995,
1351,
9104,
3078,
52251,
5857,
16825,
861,
4163,
11,
5238,
25,
1796,
17752,
41105,
2484,
60,
55609,
198,
33,
2315,
25,
65705,
198,
4110,
264,
502,
1646,
555,
23115,
323,
69772,
1988,
828,
505,
16570,
6105,
627,
36120,
54129,
422,
279,
1988,
828,
4250,
387,
16051,
311,
1376,
264,
2764,
1646,
627,
913,
5238,
25,
1796,
17752,
60,
510,
8327,
60,
55609,
198,
17213,
315,
1495
] | https://langchain.readthedocs.io/en/latest/retrievers/langchain.retrievers.multi_query.LineList.html |
02ef49f9a225-0 | langchain.retrievers.document_compressors.chain_filter.LLMChainFilter¶
class langchain.retrievers.document_compressors.chain_filter.LLMChainFilter(*, llm_chain: ~langchain.chains.llm.LLMChain, get_input: ~typing.Callable[[str, ~langchain.schema.Document], dict] = <function default_get_input>)[source]¶
Bases: BaseDocumentCompressor
Filter that drops documents that aren’t relevant to the query.
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 get_input: Callable[[str, langchain.schema.Document], dict] = <function default_get_input>¶
Callable for constructing the chain input from the query and a Document.
param llm_chain: langchain.chains.llm.LLMChain [Required]¶
LLM wrapper to use for filtering documents.
The chain prompt is expected to have a BooleanOutputParser.
async acompress_documents(documents: Sequence[Document], query: str, callbacks: Optional[Union[List[BaseCallbackHandler], BaseCallbackManager]] = None) → Sequence[Document][source]¶
Filter down documents.
compress_documents(documents: Sequence[Document], query: str, callbacks: Optional[Union[List[BaseCallbackHandler], BaseCallbackManager]] = None) → Sequence[Document][source]¶
Filter down documents based on their relevance to the query.
classmethod from_llm(llm: BaseLanguageModel, prompt: Optional[BasePromptTemplate] = None, **kwargs: Any) → LLMChainFilter[source]¶ | [
5317,
8995,
1351,
9104,
3078,
17926,
88945,
1105,
53141,
8901,
1236,
11237,
19368,
5750,
55609,
198,
1058,
8859,
8995,
1351,
9104,
3078,
17926,
88945,
1105,
53141,
8901,
1236,
11237,
19368,
5750,
4163,
11,
9507,
76,
31683,
25,
4056,
5317,
8995,
5442,
1771,
60098,
76,
1236,
11237,
19368,
11,
636,
6022,
25,
4056,
90902,
28115,
481,
15873,
496,
11,
4056,
5317,
8995,
31992,
27352,
1145,
6587,
60,
284,
366,
1723,
1670,
3138,
6022,
29,
6758,
2484,
60,
55609,
198,
33,
2315,
25,
5464,
7676,
1110,
57320,
198,
5750,
430,
21701,
9477,
430,
7784,
1431,
9959,
311,
279,
3319,
627,
4110,
264,
502,
1646,
555,
23115,
323,
69772,
1988,
828,
505,
16570,
6105,
627,
36120,
54129,
422,
279,
1988,
828,
4250,
387,
16051,
311,
1376,
264,
2764,
1646,
627,
913,
636,
6022,
25,
54223,
15873,
496,
11,
8859,
8995,
31992,
27352,
1145,
6587,
60,
284,
366,
1723,
1670,
3138,
6022,
29,
55609,
198,
41510,
369,
50453,
279,
8957,
1988,
505,
279,
3319,
323,
264,
12051,
627,
913,
9507,
76,
31683,
25,
8859,
8995,
5442,
1771,
60098,
76,
1236,
11237,
19368,
510,
8327,
60,
55609,
198,
4178,
44,
13564,
311,
1005,
369,
30770,
9477,
627,
791,
8957,
10137,
374,
3685,
311,
617,
264,
7137,
5207,
6707,
627,
7847,
264,
39460,
77027,
19702,
2901,
25,
29971,
58,
7676,
1145,
3319,
25,
610,
11,
27777,
25,
12536,
58,
33758,
53094,
58,
4066,
7646,
3126,
1145,
5464,
7646,
2087,
5163,
284,
2290,
8,
11651,
29971,
58,
7676,
1483,
2484,
60,
55609,
198,
5750,
1523,
9477,
627,
39460,
77027,
19702,
2901,
25,
29971,
58,
7676,
1145,
3319,
25,
610,
11,
27777,
25,
12536,
58,
33758,
53094,
58,
4066,
7646,
3126,
1145,
5464,
7646,
2087,
5163,
284,
2290,
8,
11651,
29971,
58,
7676,
1483,
2484,
60,
55609,
198,
5750,
1523,
9477,
3196,
389,
872,
41961,
311,
279,
3319,
627,
27853,
505,
44095,
76,
36621,
76,
25,
5464,
14126,
1747,
11,
10137,
25,
12536,
58,
4066,
55715,
7423,
60,
284,
2290,
11,
3146,
9872,
25,
5884,
8,
11651,
445,
11237,
19368,
5750,
76747,
60,
55609
] | https://langchain.readthedocs.io/en/latest/retrievers/langchain.retrievers.document_compressors.chain_filter.LLMChainFilter.html |
5bbdc57ca92e-0 | langchain.retrievers.chatgpt_plugin_retriever.ChatGPTPluginRetriever¶
class langchain.retrievers.chatgpt_plugin_retriever.ChatGPTPluginRetriever(*, url: str, bearer_token: str, top_k: int = 3, filter: Optional[dict] = None, aiosession: Optional[ClientSession] = None)[source]¶
Bases: BaseRetriever, 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 aiosession: Optional[aiohttp.client.ClientSession] = None¶
param bearer_token: str [Required]¶
param filter: Optional[dict] = None¶
param top_k: int = 3¶
param url: str [Required]¶
async aget_relevant_documents(query: str, *, callbacks: Callbacks = None, **kwargs: Any) → List[Document]¶
Asynchronously get documents relevant to a query.
:param query: string to find relevant documents for
:param callbacks: Callback manager or list of callbacks
Returns
List of relevant documents
get_relevant_documents(query: str, *, callbacks: Callbacks = None, **kwargs: Any) → List[Document]¶
Retrieve documents relevant to a query.
:param query: string to find relevant documents for
:param callbacks: Callback manager or list of callbacks
Returns
List of relevant documents
model Config[source]¶
Bases: object
Configuration for this pydantic object.
arbitrary_types_allowed = True¶ | [
5317,
8995,
1351,
9104,
3078,
27215,
70,
418,
23982,
1311,
9104,
424,
59944,
38,
2898,
11807,
12289,
462,
2099,
55609,
198,
1058,
8859,
8995,
1351,
9104,
3078,
27215,
70,
418,
23982,
1311,
9104,
424,
59944,
38,
2898,
11807,
12289,
462,
2099,
4163,
11,
2576,
25,
610,
11,
70871,
6594,
25,
610,
11,
1948,
4803,
25,
528,
284,
220,
18,
11,
4141,
25,
12536,
58,
8644,
60,
284,
2290,
11,
264,
3614,
1362,
25,
12536,
58,
3032,
5396,
60,
284,
2290,
6758,
2484,
60,
55609,
198,
33,
2315,
25,
5464,
12289,
462,
2099,
11,
65705,
198,
4110,
264,
502,
1646,
555,
23115,
323,
69772,
1988,
828,
505,
16570,
6105,
627,
36120,
54129,
422,
279,
1988,
828,
4250,
387,
16051,
311,
1376,
264,
2764,
1646,
627,
913,
264,
3614,
1362,
25,
12536,
15848,
822,
1277,
6718,
11978,
5396,
60,
284,
2290,
55609,
198,
913,
70871,
6594,
25,
610,
510,
8327,
60,
55609,
198,
913,
4141,
25,
12536,
58,
8644,
60,
284,
2290,
55609,
198,
913,
1948,
4803,
25,
528,
284,
220,
18,
55609,
198,
913,
2576,
25,
610,
510,
8327,
60,
55609,
198,
7847,
264,
456,
1311,
8532,
77027,
10974,
25,
610,
11,
12039,
27777,
25,
23499,
82,
284,
2290,
11,
3146,
9872,
25,
5884,
8,
11651,
1796,
58,
7676,
60,
55609,
198,
2170,
55294,
636,
9477,
9959,
311,
264,
3319,
627,
68416,
3319,
25,
925,
311,
1505,
9959,
9477,
369,
198,
68416,
27777,
25,
23499,
6783,
477,
1160,
315,
27777,
198,
16851,
198,
861,
315,
9959,
9477,
198,
456,
1311,
8532,
77027,
10974,
25,
610,
11,
12039,
27777,
25,
23499,
82,
284,
2290,
11,
3146,
9872,
25,
5884,
8,
11651,
1796,
58,
7676,
60,
55609,
198,
88765,
9477,
9959,
311,
264,
3319,
627,
68416,
3319,
25,
925,
311,
1505,
9959,
9477,
369,
198,
68416,
27777,
25,
23499,
6783,
477,
1160,
315,
27777,
198,
16851,
198,
861,
315,
9959,
9477,
198,
2590,
5649,
76747,
60,
55609,
198,
33,
2315,
25,
1665,
198,
7843,
369,
420,
4611,
67,
8322,
1665,
627,
277,
88951,
9962,
43255,
284,
3082,
55609
] | https://langchain.readthedocs.io/en/latest/retrievers/langchain.retrievers.chatgpt_plugin_retriever.ChatGPTPluginRetriever.html |
0c89cb4285a8-0 | langchain.retrievers.document_compressors.chain_extract.NoOutputParser¶
class langchain.retrievers.document_compressors.chain_extract.NoOutputParser(*, no_output_str: str = 'NO_OUTPUT')[source]¶
Bases: BaseOutputParser[str]
Parse outputs that could return a null string of some sort.
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 no_output_str: str = 'NO_OUTPUT'¶
dict(**kwargs: Any) → Dict¶
Return dictionary representation of output parser.
get_format_instructions() → str¶
Instructions on how the LLM output should be formatted.
parse(text: str) → str[source]¶
Parse the output of an LLM call.
A method which takes in a string (assumed output of a language model )
and parses it into some structure.
Parameters
text – output of language model
Returns
structured output
parse_result(result: List[Generation]) → T¶
Parse LLM Result.
parse_with_prompt(completion: str, prompt: PromptValue) → Any¶
Optional method to parse the output of an LLM call with a prompt.
The prompt is largely provided in the event the OutputParser wants
to retry or fix the output in some way, and needs information from
the prompt to do so.
Parameters
completion – output of language model
prompt – prompt value
Returns
structured output
to_json() → Union[SerializedConstructor, SerializedNotImplemented]¶
to_json_not_implemented() → SerializedNotImplemented¶
property lc_attributes: Dict¶
Return a list of attribute names that should be included in the
serialized kwargs. These attributes must be accepted by the
constructor.
property lc_namespace: List[str]¶
Return the namespace of the langchain object. | [
5317,
8995,
1351,
9104,
3078,
17926,
88945,
1105,
53141,
40223,
17184,
5207,
6707,
55609,
198,
1058,
8859,
8995,
1351,
9104,
3078,
17926,
88945,
1105,
53141,
40223,
17184,
5207,
6707,
4163,
11,
912,
7800,
2966,
25,
610,
284,
364,
9173,
24935,
13588,
2484,
60,
55609,
198,
33,
2315,
25,
5464,
5207,
6707,
17752,
933,
14802,
16674,
430,
1436,
471,
264,
854,
925,
315,
1063,
3460,
627,
4110,
264,
502,
1646,
555,
23115,
323,
69772,
1988,
828,
505,
16570,
6105,
627,
36120,
54129,
422,
279,
1988,
828,
4250,
387,
16051,
311,
1376,
264,
2764,
1646,
627,
913,
912,
7800,
2966,
25,
610,
284,
364,
9173,
24935,
6,
55609,
198,
8644,
22551,
9872,
25,
5884,
8,
11651,
30226,
55609,
198,
5715,
11240,
13340,
315,
2612,
6871,
627,
456,
9132,
83527,
368,
11651,
610,
55609,
198,
56391,
389,
1268,
279,
445,
11237,
2612,
1288,
387,
24001,
627,
6534,
7383,
25,
610,
8,
11651,
610,
76747,
60,
55609,
198,
14802,
279,
2612,
315,
459,
445,
11237,
1650,
627,
32,
1749,
902,
5097,
304,
264,
925,
320,
395,
39255,
2612,
315,
264,
4221,
1646,
1763,
438,
71935,
433,
1139,
1063,
6070,
627,
9905,
198,
1342,
1389,
2612,
315,
4221,
1646,
198,
16851,
198,
52243,
2612,
198,
6534,
5400,
4556,
25,
1796,
58,
38238,
2526,
11651,
350,
55609,
198,
14802,
445,
11237,
5832,
627,
6534,
6753,
62521,
91868,
25,
610,
11,
10137,
25,
60601,
1150,
8,
11651,
5884,
55609,
198,
15669,
1749,
311,
4820,
279,
2612,
315,
459,
445,
11237,
1650,
449,
264,
10137,
627,
791,
10137,
374,
14090,
3984,
304,
279,
1567,
279,
9442,
6707,
6944,
198,
998,
23515,
477,
5155,
279,
2612,
304,
1063,
1648,
11,
323,
3966,
2038,
505,
198,
1820,
10137,
311,
656,
779,
627,
9905,
198,
44412,
1389,
2612,
315,
4221,
1646,
198,
41681,
1389,
10137,
907,
198,
16851,
198,
52243,
2612,
198,
998,
9643,
368,
11651,
9323,
58,
78621,
13591,
11,
92572,
2688,
18804,
60,
55609,
198,
998,
9643,
8072,
18377,
14565,
368,
11651,
92572,
2688,
18804,
55609,
198,
3784,
37313,
18741,
25,
30226,
55609,
198,
5715,
264,
1160,
315,
7180,
5144,
430,
1288,
387,
5343,
304,
279,
198,
76377,
16901,
13,
4314,
8365,
2011,
387,
11928,
555,
279,
198,
22602,
627,
3784,
37313,
42671,
25,
1796,
17752,
60,
55609,
198,
5715,
279,
4573,
315,
279,
8859,
8995,
1665,
13
] | https://langchain.readthedocs.io/en/latest/retrievers/langchain.retrievers.document_compressors.chain_extract.NoOutputParser.html |
0c89cb4285a8-1 | property lc_namespace: List[str]¶
Return the namespace of the langchain object.
eg. [“langchain”, “llms”, “openai”]
property lc_secrets: Dict[str, str]¶
Return a map of constructor argument names to secret ids.
eg. {“openai_api_key”: “OPENAI_API_KEY”}
property lc_serializable: bool¶
Return whether or not the class is serializable.
model Config¶
Bases: object
extra = 'ignore'¶ | [
3784,
37313,
42671,
25,
1796,
17752,
60,
55609,
198,
5715,
279,
4573,
315,
279,
8859,
8995,
1665,
627,
797,
13,
510,
2118,
5317,
8995,
9520,
1054,
657,
1026,
9520,
1054,
2569,
2192,
863,
933,
3784,
37313,
3537,
53810,
25,
30226,
17752,
11,
610,
60,
55609,
198,
5715,
264,
2472,
315,
4797,
5811,
5144,
311,
6367,
14483,
627,
797,
13,
314,
2118,
2569,
2192,
11959,
3173,
57633,
1054,
32033,
15836,
11669,
6738,
863,
534,
3784,
37313,
26684,
8499,
25,
1845,
55609,
198,
5715,
3508,
477,
539,
279,
538,
374,
6275,
8499,
627,
2590,
5649,
55609,
198,
33,
2315,
25,
1665,
198,
15824,
284,
364,
13431,
6,
55609
] | https://langchain.readthedocs.io/en/latest/retrievers/langchain.retrievers.document_compressors.chain_extract.NoOutputParser.html |
e73633243fce-0 | langchain.retrievers.document_compressors.chain_extract.LLMChainExtractor¶
class langchain.retrievers.document_compressors.chain_extract.LLMChainExtractor(*, llm_chain: ~langchain.chains.llm.LLMChain, get_input: ~typing.Callable[[str, ~langchain.schema.Document], dict] = <function default_get_input>)[source]¶
Bases: BaseDocumentCompressor
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 get_input: Callable[[str, langchain.schema.Document], dict] = <function default_get_input>¶
Callable for constructing the chain input from the query and a Document.
param llm_chain: langchain.chains.llm.LLMChain [Required]¶
LLM wrapper to use for compressing documents.
async acompress_documents(documents: Sequence[Document], query: str, callbacks: Optional[Union[List[BaseCallbackHandler], BaseCallbackManager]] = None) → Sequence[Document][source]¶
Compress page content of raw documents asynchronously.
compress_documents(documents: Sequence[Document], query: str, callbacks: Optional[Union[List[BaseCallbackHandler], BaseCallbackManager]] = None) → Sequence[Document][source]¶
Compress page content of raw documents.
classmethod from_llm(llm: BaseLanguageModel, prompt: Optional[PromptTemplate] = None, get_input: Optional[Callable[[str, Document], str]] = None, llm_chain_kwargs: Optional[dict] = None) → LLMChainExtractor[source]¶
Initialize from LLM. | [
5317,
8995,
1351,
9104,
3078,
17926,
88945,
1105,
53141,
40223,
1236,
11237,
19368,
57218,
55609,
198,
1058,
8859,
8995,
1351,
9104,
3078,
17926,
88945,
1105,
53141,
40223,
1236,
11237,
19368,
57218,
4163,
11,
9507,
76,
31683,
25,
4056,
5317,
8995,
5442,
1771,
60098,
76,
1236,
11237,
19368,
11,
636,
6022,
25,
4056,
90902,
28115,
481,
15873,
496,
11,
4056,
5317,
8995,
31992,
27352,
1145,
6587,
60,
284,
366,
1723,
1670,
3138,
6022,
29,
6758,
2484,
60,
55609,
198,
33,
2315,
25,
5464,
7676,
1110,
57320,
198,
4110,
264,
502,
1646,
555,
23115,
323,
69772,
1988,
828,
505,
16570,
6105,
627,
36120,
54129,
422,
279,
1988,
828,
4250,
387,
16051,
311,
1376,
264,
2764,
1646,
627,
913,
636,
6022,
25,
54223,
15873,
496,
11,
8859,
8995,
31992,
27352,
1145,
6587,
60,
284,
366,
1723,
1670,
3138,
6022,
29,
55609,
198,
41510,
369,
50453,
279,
8957,
1988,
505,
279,
3319,
323,
264,
12051,
627,
913,
9507,
76,
31683,
25,
8859,
8995,
5442,
1771,
60098,
76,
1236,
11237,
19368,
510,
8327,
60,
55609,
198,
4178,
44,
13564,
311,
1005,
369,
25633,
287,
9477,
627,
7847,
264,
39460,
77027,
19702,
2901,
25,
29971,
58,
7676,
1145,
3319,
25,
610,
11,
27777,
25,
12536,
58,
33758,
53094,
58,
4066,
7646,
3126,
1145,
5464,
7646,
2087,
5163,
284,
2290,
8,
11651,
29971,
58,
7676,
1483,
2484,
60,
55609,
198,
1110,
1911,
2199,
2262,
315,
7257,
9477,
68881,
627,
39460,
77027,
19702,
2901,
25,
29971,
58,
7676,
1145,
3319,
25,
610,
11,
27777,
25,
12536,
58,
33758,
53094,
58,
4066,
7646,
3126,
1145,
5464,
7646,
2087,
5163,
284,
2290,
8,
11651,
29971,
58,
7676,
1483,
2484,
60,
55609,
198,
1110,
1911,
2199,
2262,
315,
7257,
9477,
627,
27853,
505,
44095,
76,
36621,
76,
25,
5464,
14126,
1747,
11,
10137,
25,
12536,
43447,
15091,
7423,
60,
284,
2290,
11,
636,
6022,
25,
12536,
58,
41510,
15873,
496,
11,
12051,
1145,
610,
5163,
284,
2290,
11,
9507,
76,
31683,
37335,
25,
12536,
58,
8644,
60,
284,
2290,
8,
11651,
445,
11237,
19368,
57218,
76747,
60,
55609,
198,
10130,
505,
445,
11237,
13
] | https://langchain.readthedocs.io/en/latest/retrievers/langchain.retrievers.document_compressors.chain_extract.LLMChainExtractor.html |
67334e544e1b-0 | langchain.retrievers.zilliz.ZillizRetriever¶
class langchain.retrievers.zilliz.ZillizRetriever(embedding_function: Embeddings, collection_name: str = 'LangChainCollection', connection_args: Optional[Dict[str, Any]] = None, consistency_level: str = 'Session', search_params: Optional[dict] = None)[source]¶
Bases: BaseRetriever
Retriever that uses the Zilliz API.
Methods
__init__(embedding_function[, ...])
add_texts(texts[, metadatas])
Add text to the Zilliz store
aget_relevant_documents(query, *[, callbacks])
Asynchronously get documents relevant to a query.
get_relevant_documents(query, *[, callbacks])
Retrieve documents relevant to a query.
add_texts(texts: List[str], metadatas: Optional[List[dict]] = None) → None[source]¶
Add text to the Zilliz store
Parameters
texts (List[str]) – The text
metadatas (List[dict]) – Metadata dicts, must line up with existing store
async aget_relevant_documents(query: str, *, callbacks: Callbacks = None, **kwargs: Any) → List[Document]¶
Asynchronously get documents relevant to a query.
:param query: string to find relevant documents for
:param callbacks: Callback manager or list of callbacks
Returns
List of relevant documents
get_relevant_documents(query: str, *, callbacks: Callbacks = None, **kwargs: Any) → List[Document]¶
Retrieve documents relevant to a query.
:param query: string to find relevant documents for
:param callbacks: Callback manager or list of callbacks
Returns
List of relevant documents | [
5317,
8995,
1351,
9104,
3078,
4025,
484,
450,
13784,
484,
450,
12289,
462,
2099,
55609,
198,
1058,
8859,
8995,
1351,
9104,
3078,
4025,
484,
450,
13784,
484,
450,
12289,
462,
2099,
50825,
7113,
9353,
25,
38168,
25624,
11,
4526,
1292,
25,
610,
284,
364,
27317,
19368,
6618,
518,
3717,
8550,
25,
12536,
58,
13755,
17752,
11,
5884,
5163,
284,
2290,
11,
29237,
8438,
25,
610,
284,
364,
5396,
518,
2778,
6887,
25,
12536,
58,
8644,
60,
284,
2290,
6758,
2484,
60,
55609,
198,
33,
2315,
25,
5464,
12289,
462,
2099,
198,
12289,
462,
2099,
430,
5829,
279,
1901,
484,
450,
5446,
627,
18337,
198,
565,
2381,
3889,
95711,
9353,
38372,
4194,
1131,
2608,
723,
80746,
7383,
82,
38372,
4194,
4150,
329,
19907,
2608,
2261,
1495,
311,
279,
1901,
484,
450,
3637,
198,
85163,
1311,
8532,
77027,
10974,
11,
4194,
9,
38372,
4194,
69411,
2608,
2170,
55294,
636,
9477,
9959,
311,
264,
3319,
627,
456,
1311,
8532,
77027,
10974,
11,
4194,
9,
38372,
4194,
69411,
2608,
88765,
9477,
9959,
311,
264,
3319,
627,
723,
80746,
7383,
82,
25,
1796,
17752,
1145,
2322,
329,
19907,
25,
12536,
53094,
58,
8644,
5163,
284,
2290,
8,
11651,
2290,
76747,
60,
55609,
198,
2261,
1495,
311,
279,
1901,
484,
450,
3637,
198,
9905,
198,
87042,
320,
861,
17752,
2526,
1389,
578,
1495,
198,
4150,
329,
19907,
320,
861,
58,
8644,
2526,
1389,
34689,
98699,
11,
2011,
1584,
709,
449,
6484,
3637,
198,
7847,
264,
456,
1311,
8532,
77027,
10974,
25,
610,
11,
12039,
27777,
25,
23499,
82,
284,
2290,
11,
3146,
9872,
25,
5884,
8,
11651,
1796,
58,
7676,
60,
55609,
198,
2170,
55294,
636,
9477,
9959,
311,
264,
3319,
627,
68416,
3319,
25,
925,
311,
1505,
9959,
9477,
369,
198,
68416,
27777,
25,
23499,
6783,
477,
1160,
315,
27777,
198,
16851,
198,
861,
315,
9959,
9477,
198,
456,
1311,
8532,
77027,
10974,
25,
610,
11,
12039,
27777,
25,
23499,
82,
284,
2290,
11,
3146,
9872,
25,
5884,
8,
11651,
1796,
58,
7676,
60,
55609,
198,
88765,
9477,
9959,
311,
264,
3319,
627,
68416,
3319,
25,
925,
311,
1505,
9959,
9477,
369,
198,
68416,
27777,
25,
23499,
6783,
477,
1160,
315,
27777,
198,
16851,
198,
861,
315,
9959,
9477
] | https://langchain.readthedocs.io/en/latest/retrievers/langchain.retrievers.zilliz.ZillizRetriever.html |
6f1c7b2f65a4-0 | langchain.retrievers.self_query.myscale.MyScaleTranslator¶
class langchain.retrievers.self_query.myscale.MyScaleTranslator(metadata_key: str = 'metadata')[source]¶
Bases: Visitor
Logic for converting internal query language elements to valid filters.
Methods
__init__([metadata_key])
visit_comparison(comparison)
Translate a Comparison.
visit_operation(operation)
Translate an Operation.
visit_structured_query(structured_query)
Translate a StructuredQuery.
Attributes
allowed_comparators
allowed_operators
Subset of allowed logical operators.
map_dict
visit_comparison(comparison: Comparison) → Dict[source]¶
Translate a Comparison.
visit_operation(operation: Operation) → Dict[source]¶
Translate an Operation.
visit_structured_query(structured_query: StructuredQuery) → Tuple[str, dict][source]¶
Translate a StructuredQuery.
allowed_comparators: Optional[Sequence[Comparator]] = [<Comparator.EQ: 'eq'>, <Comparator.GT: 'gt'>, <Comparator.GTE: 'gte'>, <Comparator.LT: 'lt'>, <Comparator.LTE: 'lte'>, <Comparator.CONTAIN: 'contain'>, <Comparator.LIKE: 'like'>]¶
allowed_operators: Optional[Sequence[Operator]] = [<Operator.AND: 'and'>, <Operator.OR: 'or'>, <Operator.NOT: 'not'>]¶
Subset of allowed logical operators. | [
5317,
8995,
1351,
9104,
3078,
28248,
5857,
749,
84009,
28152,
7092,
52753,
55609,
198,
1058,
8859,
8995,
1351,
9104,
3078,
28248,
5857,
749,
84009,
28152,
7092,
52753,
55536,
3173,
25,
610,
284,
364,
18103,
13588,
2484,
60,
55609,
198,
33,
2315,
25,
56982,
198,
27849,
369,
34537,
5419,
3319,
4221,
5540,
311,
2764,
13711,
627,
18337,
198,
565,
2381,
565,
2625,
18103,
3173,
2608,
28560,
91897,
14426,
36642,
340,
28573,
264,
43551,
627,
28560,
33665,
53447,
340,
28573,
459,
17145,
627,
28560,
15477,
3149,
5857,
6294,
3149,
5857,
340,
28573,
264,
16531,
3149,
2929,
627,
10738,
198,
21642,
3038,
1768,
3046,
198,
21642,
26716,
3046,
198,
71684,
315,
5535,
20406,
20197,
627,
2235,
5356,
198,
28560,
91897,
14426,
36642,
25,
43551,
8,
11651,
30226,
76747,
60,
55609,
198,
28573,
264,
43551,
627,
28560,
33665,
53447,
25,
17145,
8,
11651,
30226,
76747,
60,
55609,
198,
28573,
459,
17145,
627,
28560,
15477,
3149,
5857,
6294,
3149,
5857,
25,
16531,
3149,
2929,
8,
11651,
25645,
17752,
11,
6587,
1483,
2484,
60,
55609,
198,
28573,
264,
16531,
3149,
2929,
627,
21642,
3038,
1768,
3046,
25,
12536,
58,
14405,
58,
39758,
5163,
284,
68326,
39758,
5253,
48,
25,
364,
11251,
6404,
11,
366,
39758,
1246,
51,
25,
364,
5289,
6404,
11,
366,
39758,
1246,
2505,
25,
364,
56167,
6404,
11,
366,
39758,
1236,
51,
25,
364,
4937,
6404,
11,
366,
39758,
1236,
2505,
25,
364,
49891,
6404,
11,
366,
39758,
45816,
6979,
25,
364,
53195,
6404,
11,
366,
39758,
1236,
73066,
25,
364,
4908,
6404,
60,
55609,
198,
21642,
26716,
3046,
25,
12536,
58,
14405,
58,
18968,
5163,
284,
68326,
18968,
885,
8225,
25,
364,
438,
6404,
11,
366,
18968,
78997,
25,
364,
269,
6404,
11,
366,
18968,
41520,
25,
364,
1962,
6404,
60,
55609,
198,
71684,
315,
5535,
20406,
20197,
13
] | https://langchain.readthedocs.io/en/latest/retrievers/langchain.retrievers.self_query.myscale.MyScaleTranslator.html |
6f1c7b2f65a4-1 | Subset of allowed logical operators.
map_dict = {Operator.AND: <function DEFAULT_COMPOSER.<locals>.f>, Comparator.CONTAIN: <function FUNCTION_COMPOSER.<locals>.f>, Comparator.EQ: <function DEFAULT_COMPOSER.<locals>.f>, Comparator.GT: <function DEFAULT_COMPOSER.<locals>.f>, Comparator.GTE: <function DEFAULT_COMPOSER.<locals>.f>, Comparator.LIKE: <function DEFAULT_COMPOSER.<locals>.f>, Comparator.LT: <function DEFAULT_COMPOSER.<locals>.f>, Comparator.LTE: <function DEFAULT_COMPOSER.<locals>.f>, Operator.NOT: <function DEFAULT_COMPOSER.<locals>.f>, Operator.OR: <function DEFAULT_COMPOSER.<locals>.f>}¶ | [
71684,
315,
5535,
20406,
20197,
627,
2235,
5356,
284,
314,
18968,
885,
8225,
25,
366,
1723,
12221,
7021,
17914,
643,
16134,
65230,
14611,
69,
8226,
51641,
45816,
6979,
25,
366,
1723,
25856,
7021,
17914,
643,
16134,
65230,
14611,
69,
8226,
51641,
5253,
48,
25,
366,
1723,
12221,
7021,
17914,
643,
16134,
65230,
14611,
69,
8226,
51641,
1246,
51,
25,
366,
1723,
12221,
7021,
17914,
643,
16134,
65230,
14611,
69,
8226,
51641,
1246,
2505,
25,
366,
1723,
12221,
7021,
17914,
643,
16134,
65230,
14611,
69,
8226,
51641,
1236,
73066,
25,
366,
1723,
12221,
7021,
17914,
643,
16134,
65230,
14611,
69,
8226,
51641,
1236,
51,
25,
366,
1723,
12221,
7021,
17914,
643,
16134,
65230,
14611,
69,
8226,
51641,
1236,
2505,
25,
366,
1723,
12221,
7021,
17914,
643,
16134,
65230,
14611,
69,
8226,
29598,
41520,
25,
366,
1723,
12221,
7021,
17914,
643,
16134,
65230,
14611,
69,
8226,
29598,
78997,
25,
366,
1723,
12221,
7021,
17914,
643,
16134,
65230,
14611,
69,
53138,
55609
] | https://langchain.readthedocs.io/en/latest/retrievers/langchain.retrievers.self_query.myscale.MyScaleTranslator.html |
4989071239fd-0 | langchain.retrievers.docarray.DocArrayRetriever¶
class langchain.retrievers.docarray.DocArrayRetriever(*, index: Any = None, embeddings: Embeddings, search_field: str, content_field: str, search_type: SearchType = SearchType.similarity, top_k: int = 1, filters: Optional[Any] = None)[source]¶
Bases: BaseRetriever, BaseModel
Retriever class for DocArray Document Indices.
Currently, supports 5 backends:
InMemoryExactNNIndex, HnswDocumentIndex, QdrantDocumentIndex,
ElasticDocIndex, and WeaviateDocumentIndex.
Parameters
index – One of the above-mentioned index instances
embeddings – Embedding model to represent text as vectors
search_field – Field to consider for searching in the documents.
Should be an embedding/vector/tensor.
content_field – Field that represents the main content in your document schema.
Will be used as a page_content. Everything else will go into metadata.
search_type – Type of search to perform (similarity / mmr)
filters – Filters applied for document retrieval.
top_k – Number of documents to return
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 content_field: str [Required]¶
param embeddings: langchain.embeddings.base.Embeddings [Required]¶
param filters: Optional[Any] = None¶
param index: Any = None¶
param search_field: str [Required]¶
param search_type: langchain.retrievers.docarray.SearchType = SearchType.similarity¶
param top_k: int = 1¶ | [
5317,
8995,
1351,
9104,
3078,
24595,
1686,
43552,
1895,
12289,
462,
2099,
55609,
198,
1058,
8859,
8995,
1351,
9104,
3078,
24595,
1686,
43552,
1895,
12289,
462,
2099,
4163,
11,
1963,
25,
5884,
284,
2290,
11,
71647,
25,
38168,
25624,
11,
2778,
5121,
25,
610,
11,
2262,
5121,
25,
610,
11,
2778,
1857,
25,
7694,
941,
284,
7694,
941,
29716,
49325,
11,
1948,
4803,
25,
528,
284,
220,
16,
11,
13711,
25,
12536,
71401,
60,
284,
2290,
6758,
2484,
60,
55609,
198,
33,
2315,
25,
5464,
12289,
462,
2099,
11,
65705,
198,
12289,
462,
2099,
538,
369,
22452,
1895,
12051,
86869,
627,
34814,
11,
11815,
220,
20,
1203,
1438,
512,
644,
10869,
59054,
9944,
1581,
11,
473,
77,
2332,
7676,
1581,
11,
1229,
3696,
519,
7676,
1581,
345,
36,
52279,
9743,
1581,
11,
323,
1226,
6321,
349,
7676,
1581,
627,
9905,
198,
1275,
1389,
3861,
315,
279,
3485,
12,
37691,
1963,
13422,
198,
12529,
25624,
1389,
38168,
7113,
1646,
311,
4097,
1495,
439,
23728,
198,
1874,
5121,
1389,
8771,
311,
2980,
369,
15389,
304,
279,
9477,
627,
15346,
387,
459,
40188,
81482,
5640,
3890,
627,
1834,
5121,
1389,
8771,
430,
11105,
279,
1925,
2262,
304,
701,
2246,
11036,
627,
10149,
387,
1511,
439,
264,
2199,
7647,
13,
20696,
775,
690,
733,
1139,
11408,
627,
1874,
1857,
1389,
4078,
315,
2778,
311,
2804,
320,
15124,
49325,
611,
9653,
81,
340,
25630,
1389,
46112,
9435,
369,
2246,
57470,
627,
3565,
4803,
1389,
5742,
315,
9477,
311,
471,
198,
4110,
264,
502,
1646,
555,
23115,
323,
69772,
1988,
828,
505,
16570,
6105,
627,
36120,
54129,
422,
279,
1988,
828,
4250,
387,
16051,
311,
1376,
264,
2764,
1646,
627,
913,
2262,
5121,
25,
610,
510,
8327,
60,
55609,
198,
913,
71647,
25,
8859,
8995,
41541,
25624,
9105,
58955,
25624,
510,
8327,
60,
55609,
198,
913,
13711,
25,
12536,
71401,
60,
284,
2290,
55609,
198,
913,
1963,
25,
5884,
284,
2290,
55609,
198,
913,
2778,
5121,
25,
610,
510,
8327,
60,
55609,
198,
913,
2778,
1857,
25,
8859,
8995,
1351,
9104,
3078,
24595,
1686,
33003,
941,
284,
7694,
941,
29716,
49325,
55609,
198,
913,
1948,
4803,
25,
528,
284,
220,
16,
55609
] | https://langchain.readthedocs.io/en/latest/retrievers/langchain.retrievers.docarray.DocArrayRetriever.html |
4989071239fd-1 | param top_k: int = 1¶
async aget_relevant_documents(query: str, *, callbacks: Callbacks = None, **kwargs: Any) → List[Document]¶
Asynchronously get documents relevant to a query.
:param query: string to find relevant documents for
:param callbacks: Callback manager or list of callbacks
Returns
List of relevant documents
get_relevant_documents(query: str, *, callbacks: Callbacks = None, **kwargs: Any) → List[Document]¶
Retrieve documents relevant to a query.
:param query: string to find relevant documents for
:param callbacks: Callback manager or list of callbacks
Returns
List of relevant documents
model Config[source]¶
Bases: object
Configuration for this pydantic object.
arbitrary_types_allowed = True¶ | [
913,
1948,
4803,
25,
528,
284,
220,
16,
55609,
198,
7847,
264,
456,
1311,
8532,
77027,
10974,
25,
610,
11,
12039,
27777,
25,
23499,
82,
284,
2290,
11,
3146,
9872,
25,
5884,
8,
11651,
1796,
58,
7676,
60,
55609,
198,
2170,
55294,
636,
9477,
9959,
311,
264,
3319,
627,
68416,
3319,
25,
925,
311,
1505,
9959,
9477,
369,
198,
68416,
27777,
25,
23499,
6783,
477,
1160,
315,
27777,
198,
16851,
198,
861,
315,
9959,
9477,
198,
456,
1311,
8532,
77027,
10974,
25,
610,
11,
12039,
27777,
25,
23499,
82,
284,
2290,
11,
3146,
9872,
25,
5884,
8,
11651,
1796,
58,
7676,
60,
55609,
198,
88765,
9477,
9959,
311,
264,
3319,
627,
68416,
3319,
25,
925,
311,
1505,
9959,
9477,
369,
198,
68416,
27777,
25,
23499,
6783,
477,
1160,
315,
27777,
198,
16851,
198,
861,
315,
9959,
9477,
198,
2590,
5649,
76747,
60,
55609,
198,
33,
2315,
25,
1665,
198,
7843,
369,
420,
4611,
67,
8322,
1665,
627,
277,
88951,
9962,
43255,
284,
3082,
55609
] | https://langchain.readthedocs.io/en/latest/retrievers/langchain.retrievers.docarray.DocArrayRetriever.html |
a2729f596c19-0 | langchain.retrievers.milvus.MilvusRetreiver¶
langchain.retrievers.milvus.MilvusRetreiver(*args: Any, **kwargs: Any) → MilvusRetriever[source]¶
Deprecated MilvusRetreiver. Please use MilvusRetriever (‘i’ before ‘e’) instead.
Parameters
*args –
**kwargs –
Returns
MilvusRetriever | [
5317,
8995,
1351,
9104,
3078,
749,
321,
85,
355,
1345,
321,
85,
355,
12289,
265,
1553,
55609,
198,
5317,
8995,
1351,
9104,
3078,
749,
321,
85,
355,
1345,
321,
85,
355,
12289,
265,
1553,
4163,
2164,
25,
5884,
11,
3146,
9872,
25,
5884,
8,
11651,
10357,
85,
355,
12289,
462,
2099,
76747,
60,
55609,
198,
52444,
10357,
85,
355,
12289,
265,
1553,
13,
5321,
1005,
10357,
85,
355,
12289,
462,
2099,
320,
14336,
72,
529,
1603,
3451,
68,
96206,
4619,
627,
9905,
198,
9,
2164,
1389,
720,
334,
9872,
1389,
720,
16851,
198,
60332,
85,
355,
12289,
462,
2099
] | https://langchain.readthedocs.io/en/latest/retrievers/langchain.retrievers.milvus.MilvusRetreiver.html |
c6a8bbb7454a-0 | langchain.retrievers.self_query.base.SelfQueryRetriever¶
class langchain.retrievers.self_query.base.SelfQueryRetriever(*, vectorstore: VectorStore, llm_chain: LLMChain, search_type: str = 'similarity', search_kwargs: dict = None, structured_query_translator: Visitor, verbose: bool = False, use_original_query: bool = False)[source]¶
Bases: BaseRetriever, BaseModel
Retriever that wraps around a vector store and uses an LLM to generate
the vector store queries.
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 llm_chain: langchain.chains.llm.LLMChain [Required]¶
The LLMChain for generating the vector store queries.
param search_kwargs: dict [Optional]¶
Keyword arguments to pass in to the vector store search.
param search_type: str = 'similarity'¶
The search type to perform on the vector store.
param structured_query_translator: langchain.chains.query_constructor.ir.Visitor [Required]¶
Translator for turning internal query language into vectorstore search params.
param use_original_query: bool = False¶
param vectorstore: langchain.vectorstores.base.VectorStore [Required]¶
The underlying vector store from which documents will be retrieved.
param verbose: bool = False¶
Use original query instead of the revised new query from LLM
async aget_relevant_documents(query: str, *, callbacks: Callbacks = None, **kwargs: Any) → List[Document]¶
Asynchronously get documents relevant to a query.
:param query: string to find relevant documents for
:param callbacks: Callback manager or list of callbacks
Returns
List of relevant documents | [
5317,
8995,
1351,
9104,
3078,
28248,
5857,
9105,
815,
491,
2929,
12289,
462,
2099,
55609,
198,
1058,
8859,
8995,
1351,
9104,
3078,
28248,
5857,
9105,
815,
491,
2929,
12289,
462,
2099,
4163,
11,
4724,
4412,
25,
4290,
6221,
11,
9507,
76,
31683,
25,
445,
11237,
19368,
11,
2778,
1857,
25,
610,
284,
364,
15124,
49325,
518,
2778,
37335,
25,
6587,
284,
2290,
11,
34030,
5857,
8124,
22582,
25,
56982,
11,
14008,
25,
1845,
284,
3641,
11,
1005,
40656,
5857,
25,
1845,
284,
3641,
6758,
2484,
60,
55609,
198,
33,
2315,
25,
5464,
12289,
462,
2099,
11,
65705,
198,
12289,
462,
2099,
430,
40809,
2212,
264,
4724,
3637,
323,
5829,
459,
445,
11237,
311,
7068,
198,
1820,
4724,
3637,
20126,
627,
4110,
264,
502,
1646,
555,
23115,
323,
69772,
1988,
828,
505,
16570,
6105,
627,
36120,
54129,
422,
279,
1988,
828,
4250,
387,
16051,
311,
1376,
264,
2764,
1646,
627,
913,
9507,
76,
31683,
25,
8859,
8995,
5442,
1771,
60098,
76,
1236,
11237,
19368,
510,
8327,
60,
55609,
198,
791,
445,
11237,
19368,
369,
24038,
279,
4724,
3637,
20126,
627,
913,
2778,
37335,
25,
6587,
510,
15669,
60,
55609,
198,
35581,
6105,
311,
1522,
304,
311,
279,
4724,
3637,
2778,
627,
913,
2778,
1857,
25,
610,
284,
364,
15124,
49325,
6,
55609,
198,
791,
2778,
955,
311,
2804,
389,
279,
4724,
3637,
627,
913,
34030,
5857,
8124,
22582,
25,
8859,
8995,
5442,
1771,
4891,
67310,
64450,
13,
17215,
510,
8327,
60,
55609,
198,
52753,
369,
13353,
5419,
3319,
4221,
1139,
4724,
4412,
2778,
3712,
627,
913,
1005,
40656,
5857,
25,
1845,
284,
3641,
55609,
198,
913,
4724,
4412,
25,
8859,
8995,
48203,
44569,
9105,
14621,
6221,
510,
8327,
60,
55609,
198,
791,
16940,
4724,
3637,
505,
902,
9477,
690,
387,
31503,
627,
913,
14008,
25,
1845,
284,
3641,
55609,
198,
10464,
4113,
3319,
4619,
315,
279,
32828,
502,
3319,
505,
445,
11237,
198,
7847,
264,
456,
1311,
8532,
77027,
10974,
25,
610,
11,
12039,
27777,
25,
23499,
82,
284,
2290,
11,
3146,
9872,
25,
5884,
8,
11651,
1796,
58,
7676,
60,
55609,
198,
2170,
55294,
636,
9477,
9959,
311,
264,
3319,
627,
68416,
3319,
25,
925,
311,
1505,
9959,
9477,
369,
198,
68416,
27777,
25,
23499,
6783,
477,
1160,
315,
27777,
198,
16851,
198,
861,
315,
9959,
9477
] | https://langchain.readthedocs.io/en/latest/retrievers/langchain.retrievers.self_query.base.SelfQueryRetriever.html |
c6a8bbb7454a-1 | :param callbacks: Callback manager or list of callbacks
Returns
List of relevant documents
classmethod from_llm(llm: BaseLanguageModel, vectorstore: VectorStore, document_contents: str, metadata_field_info: List[AttributeInfo], structured_query_translator: Optional[Visitor] = None, chain_kwargs: Optional[Dict] = None, enable_limit: bool = False, use_original_query: bool = False, **kwargs: Any) → SelfQueryRetriever[source]¶
get_relevant_documents(query: str, *, callbacks: Callbacks = None, **kwargs: Any) → List[Document]¶
Retrieve documents relevant to a query.
:param query: string to find relevant documents for
:param callbacks: Callback manager or list of callbacks
Returns
List of relevant documents
validator validate_translator » all fields[source]¶
Validate translator.
model Config[source]¶
Bases: object
Configuration for this pydantic object.
arbitrary_types_allowed = True¶ | [
68416,
27777,
25,
23499,
6783,
477,
1160,
315,
27777,
198,
16851,
198,
861,
315,
9959,
9477,
198,
27853,
505,
44095,
76,
36621,
76,
25,
5464,
14126,
1747,
11,
4724,
4412,
25,
4290,
6221,
11,
2246,
17096,
25,
610,
11,
11408,
5121,
3186,
25,
1796,
58,
3994,
1767,
1145,
34030,
5857,
8124,
22582,
25,
12536,
58,
17215,
60,
284,
2290,
11,
8957,
37335,
25,
12536,
58,
13755,
60,
284,
2290,
11,
7431,
15106,
25,
1845,
284,
3641,
11,
1005,
40656,
5857,
25,
1845,
284,
3641,
11,
3146,
9872,
25,
5884,
8,
11651,
10323,
2929,
12289,
462,
2099,
76747,
60,
55609,
198,
456,
1311,
8532,
77027,
10974,
25,
610,
11,
12039,
27777,
25,
23499,
82,
284,
2290,
11,
3146,
9872,
25,
5884,
8,
11651,
1796,
58,
7676,
60,
55609,
198,
88765,
9477,
9959,
311,
264,
3319,
627,
68416,
3319,
25,
925,
311,
1505,
9959,
9477,
369,
198,
68416,
27777,
25,
23499,
6783,
477,
1160,
315,
27777,
198,
16851,
198,
861,
315,
9959,
9477,
198,
16503,
9788,
8124,
22582,
4194,
8345,
4194,
682,
5151,
76747,
60,
55609,
198,
18409,
46588,
627,
2590,
5649,
76747,
60,
55609,
198,
33,
2315,
25,
1665,
198,
7843,
369,
420,
4611,
67,
8322,
1665,
627,
277,
88951,
9962,
43255,
284,
3082,
55609
] | https://langchain.readthedocs.io/en/latest/retrievers/langchain.retrievers.self_query.base.SelfQueryRetriever.html |
7bfd69234d08-0 | langchain.retrievers.document_compressors.base.BaseDocumentCompressor¶
class langchain.retrievers.document_compressors.base.BaseDocumentCompressor[source]¶
Bases: BaseModel, ABC
Base abstraction interface for document compression.
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.
abstract async acompress_documents(documents: Sequence[Document], query: str, callbacks: Optional[Union[List[BaseCallbackHandler], BaseCallbackManager]] = None) → Sequence[Document][source]¶
Compress retrieved documents given the query context.
abstract compress_documents(documents: Sequence[Document], query: str, callbacks: Optional[Union[List[BaseCallbackHandler], BaseCallbackManager]] = None) → Sequence[Document][source]¶
Compress retrieved documents given the query context. | [
5317,
8995,
1351,
9104,
3078,
17926,
88945,
1105,
9105,
13316,
7676,
1110,
57320,
55609,
198,
1058,
8859,
8995,
1351,
9104,
3078,
17926,
88945,
1105,
9105,
13316,
7676,
1110,
57320,
76747,
60,
55609,
198,
33,
2315,
25,
65705,
11,
19921,
198,
4066,
59851,
3834,
369,
2246,
26168,
627,
4110,
264,
502,
1646,
555,
23115,
323,
69772,
1988,
828,
505,
16570,
6105,
627,
36120,
54129,
422,
279,
1988,
828,
4250,
387,
16051,
311,
1376,
264,
2764,
1646,
627,
16647,
3393,
264,
39460,
77027,
19702,
2901,
25,
29971,
58,
7676,
1145,
3319,
25,
610,
11,
27777,
25,
12536,
58,
33758,
53094,
58,
4066,
7646,
3126,
1145,
5464,
7646,
2087,
5163,
284,
2290,
8,
11651,
29971,
58,
7676,
1483,
2484,
60,
55609,
198,
1110,
1911,
31503,
9477,
2728,
279,
3319,
2317,
627,
16647,
25633,
77027,
19702,
2901,
25,
29971,
58,
7676,
1145,
3319,
25,
610,
11,
27777,
25,
12536,
58,
33758,
53094,
58,
4066,
7646,
3126,
1145,
5464,
7646,
2087,
5163,
284,
2290,
8,
11651,
29971,
58,
7676,
1483,
2484,
60,
55609,
198,
1110,
1911,
31503,
9477,
2728,
279,
3319,
2317,
13
] | https://langchain.readthedocs.io/en/latest/retrievers/langchain.retrievers.document_compressors.base.BaseDocumentCompressor.html |
b9de738c540d-0 | langchain.tools.convert_to_openai.format_tool_to_openai_function¶
langchain.tools.convert_to_openai.format_tool_to_openai_function(tool: BaseTool) → FunctionDescription[source]¶
Format tool into the OpenAI function API. | [
5317,
8995,
24029,
24973,
2401,
11563,
2192,
8180,
23627,
2401,
11563,
2192,
9353,
55609,
198,
5317,
8995,
24029,
24973,
2401,
11563,
2192,
8180,
23627,
2401,
11563,
2192,
9353,
50050,
25,
5464,
7896,
8,
11651,
5830,
5116,
76747,
60,
55609,
198,
4152,
5507,
1139,
279,
5377,
15836,
734,
5446,
13
] | https://langchain.readthedocs.io/en/latest/tools/langchain.tools.convert_to_openai.format_tool_to_openai_function.html |
89945968b42e-0 | langchain.tools.playwright.navigate.NavigateToolInput¶
class langchain.tools.playwright.navigate.NavigateToolInput(*, url: str)[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 valid model.
param url: str [Required]¶
url to navigate to | [
5317,
8995,
24029,
13269,
53852,
19452,
74794,
7896,
2566,
55609,
198,
1058,
8859,
8995,
24029,
13269,
53852,
19452,
74794,
7896,
2566,
4163,
11,
2576,
25,
610,
6758,
2484,
60,
55609,
198,
33,
2315,
25,
65705,
198,
2566,
369,
82839,
7896,
2566,
627,
4110,
264,
502,
1646,
555,
23115,
323,
69772,
1988,
828,
505,
16570,
6105,
627,
36120,
54129,
422,
279,
1988,
828,
4250,
387,
16051,
311,
1376,
264,
2764,
1646,
627,
913,
2576,
25,
610,
510,
8327,
60,
55609,
198,
1103,
311,
21546,
311
] | https://langchain.readthedocs.io/en/latest/tools/langchain.tools.playwright.navigate.NavigateToolInput.html |
53eb05f4a8df-0 | langchain.tools.azure_cognitive_services.utils.detect_file_src_type¶
langchain.tools.azure_cognitive_services.utils.detect_file_src_type(file_path: str) → str[source]¶
Detect if the file is local or remote. | [
5317,
8995,
24029,
71340,
669,
51549,
40946,
8576,
30253,
2517,
16673,
1857,
55609,
198,
5317,
8995,
24029,
71340,
669,
51549,
40946,
8576,
30253,
2517,
16673,
1857,
4971,
2703,
25,
610,
8,
11651,
610,
76747,
60,
55609,
198,
58293,
422,
279,
1052,
374,
2254,
477,
8870,
13
] | https://langchain.readthedocs.io/en/latest/tools/langchain.tools.azure_cognitive_services.utils.detect_file_src_type.html |
6c3523fd98a8-0 | langchain.tools.google_places.tool.GooglePlacesTool¶
class langchain.tools.google_places.tool.GooglePlacesTool(*, name: str = 'google_places', description: str = 'A wrapper around Google Places. Useful for when you need to validate or discover addressed from ambiguous text. Input should be a search query.', args_schema: ~typing.Type[~pydantic.main.BaseModel] = <class 'langchain.tools.google_places.tool.GooglePlacesSchema'>, return_direct: bool = False, verbose: bool = False, callbacks: ~typing.Optional[~typing.Union[~typing.List[~langchain.callbacks.base.BaseCallbackHandler], ~langchain.callbacks.base.BaseCallbackManager]] = None, callback_manager: ~typing.Optional[~langchain.callbacks.base.BaseCallbackManager] = None, handle_tool_error: ~typing.Optional[~typing.Union[bool, str, ~typing.Callable[[~langchain.tools.base.ToolException], str]]] = False, api_wrapper: ~langchain.utilities.google_places_api.GooglePlacesAPIWrapper = None)[source]¶
Bases: BaseTool
Tool that adds the capability to query the Google places 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 valid model.
param api_wrapper: langchain.utilities.google_places_api.GooglePlacesAPIWrapper [Optional]¶
param args_schema: Type[pydantic.main.BaseModel] = <class 'langchain.tools.google_places.tool.GooglePlacesSchema'>¶
Pydantic model class to validate and parse the tool’s input arguments.
param callback_manager: Optional[BaseCallbackManager] = None¶
Deprecated. Please use callbacks instead.
param callbacks: Callbacks = None¶
Callbacks to be called during tool execution. | [
5317,
8995,
24029,
5831,
58546,
21966,
61493,
59925,
7896,
55609,
198,
1058,
8859,
8995,
24029,
5831,
58546,
21966,
61493,
59925,
7896,
4163,
11,
836,
25,
610,
284,
364,
17943,
58546,
518,
4096,
25,
610,
284,
364,
32,
13564,
2212,
5195,
45836,
13,
51612,
369,
994,
499,
1205,
311,
9788,
477,
7142,
20669,
505,
55861,
1495,
13,
5688,
1288,
387,
264,
2778,
3319,
16045,
2897,
26443,
25,
4056,
90902,
10394,
58,
93,
3368,
67,
8322,
9056,
13316,
1747,
60,
284,
366,
1058,
364,
5317,
8995,
24029,
5831,
58546,
21966,
61493,
59925,
8802,
6404,
11,
471,
33971,
25,
1845,
284,
3641,
11,
14008,
25,
1845,
284,
3641,
11,
27777,
25,
4056,
90902,
37464,
58,
93,
90902,
10840,
290,
58,
93,
90902,
5937,
58,
93,
5317,
8995,
72134,
9105,
13316,
7646,
3126,
1145,
4056,
5317,
8995,
72134,
9105,
13316,
7646,
2087,
5163,
284,
2290,
11,
4927,
12418,
25,
4056,
90902,
37464,
58,
93,
5317,
8995,
72134,
9105,
13316,
7646,
2087,
60,
284,
2290,
11,
3790,
23627,
4188,
25,
4056,
90902,
37464,
58,
93,
90902,
10840,
290,
58,
2707,
11,
610,
11,
4056,
90902,
28115,
481,
15873,
93,
5317,
8995,
24029,
9105,
25443,
1378,
1145,
610,
5163,
60,
284,
3641,
11,
6464,
24474,
25,
4056,
5317,
8995,
63795,
5831,
58546,
11959,
61493,
59925,
7227,
11803,
284,
2290,
6758,
2484,
60,
55609,
198,
33,
2315,
25,
5464,
7896,
198,
7896,
430,
11621,
279,
23099,
311,
3319,
279,
5195,
7634,
5446,
627,
4110,
264,
502,
1646,
555,
23115,
323,
69772,
1988,
828,
505,
16570,
6105,
627,
36120,
54129,
422,
279,
1988,
828,
4250,
387,
16051,
311,
1376,
264,
2764,
1646,
627,
913,
6464,
24474,
25,
8859,
8995,
63795,
5831,
58546,
11959,
61493,
59925,
7227,
11803,
510,
15669,
60,
55609,
198,
913,
2897,
26443,
25,
4078,
58,
3368,
67,
8322,
9056,
13316,
1747,
60,
284,
366,
1058,
364,
5317,
8995,
24029,
5831,
58546,
21966,
61493,
59925,
8802,
6404,
55609,
198,
14149,
67,
8322,
1646,
538,
311,
9788,
323,
4820,
279,
5507,
753,
1988,
6105,
627,
913,
4927,
12418,
25,
12536,
58,
4066,
7646,
2087,
60,
284,
2290,
55609,
198,
52444,
13,
5321,
1005,
27777,
4619,
627,
913,
27777,
25,
23499,
82,
284,
2290,
55609,
198,
45561,
311,
387,
2663,
2391,
5507,
11572,
13
] | https://langchain.readthedocs.io/en/latest/tools/langchain.tools.google_places.tool.GooglePlacesTool.html |
6c3523fd98a8-1 | param callbacks: Callbacks = None¶
Callbacks to be called during tool execution.
param description: str = 'A wrapper around Google Places. Useful for when you need to validate or discover addressed from ambiguous text. Input should be a search query.'¶
Used to tell the model how/when/why to use the tool.
You can provide few-shot examples as a part of the description.
param handle_tool_error: Optional[Union[bool, str, Callable[[ToolException], str]]] = False¶
Handle the content of the ToolException thrown.
param name: str = 'google_places'¶
The unique name of the tool that clearly communicates its purpose.
param return_direct: bool = False¶
Whether to return the tool’s output directly. Setting this to True means
that after the tool is called, the AgentExecutor will stop looping.
param verbose: bool = False¶
Whether to log the tool’s progress.
__call__(tool_input: str, callbacks: Optional[Union[List[BaseCallbackHandler], BaseCallbackManager]] = None) → str¶
Make tool callable.
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, **kwargs: Any) → Any¶
Run the tool asynchronously.
validator raise_deprecation » all fields¶
Raise deprecation warning if callback_manager is used.
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, **kwargs: Any) → Any¶
Run the tool. | [
913,
27777,
25,
23499,
82,
284,
2290,
55609,
198,
45561,
311,
387,
2663,
2391,
5507,
11572,
627,
913,
4096,
25,
610,
284,
364,
32,
13564,
2212,
5195,
45836,
13,
51612,
369,
994,
499,
1205,
311,
9788,
477,
7142,
20669,
505,
55861,
1495,
13,
5688,
1288,
387,
264,
2778,
3319,
3238,
55609,
198,
23580,
311,
3371,
279,
1646,
1268,
14,
9493,
14,
35734,
311,
1005,
279,
5507,
627,
2675,
649,
3493,
2478,
64630,
10507,
439,
264,
961,
315,
279,
4096,
627,
913,
3790,
23627,
4188,
25,
12536,
58,
33758,
58,
2707,
11,
610,
11,
54223,
15873,
7896,
1378,
1145,
610,
5163,
60,
284,
3641,
55609,
198,
7144,
279,
2262,
315,
279,
13782,
1378,
15338,
627,
913,
836,
25,
610,
284,
364,
17943,
58546,
6,
55609,
198,
791,
5016,
836,
315,
279,
5507,
430,
9539,
92606,
1202,
7580,
627,
913,
471,
33971,
25,
1845,
284,
3641,
55609,
198,
25729,
311,
471,
279,
5507,
753,
2612,
6089,
13,
20638,
420,
311,
3082,
3445,
198,
9210,
1306,
279,
5507,
374,
2663,
11,
279,
21372,
26321,
690,
3009,
63687,
627,
913,
14008,
25,
1845,
284,
3641,
55609,
198,
25729,
311,
1515,
279,
5507,
753,
5208,
627,
565,
6797,
3889,
14506,
6022,
25,
610,
11,
27777,
25,
12536,
58,
33758,
53094,
58,
4066,
7646,
3126,
1145,
5464,
7646,
2087,
5163,
284,
2290,
8,
11651,
610,
55609,
198,
8238,
5507,
42022,
627,
7847,
802,
359,
50050,
6022,
25,
9323,
17752,
11,
30226,
1145,
14008,
25,
12536,
58,
2707,
60,
284,
2290,
11,
1212,
6855,
25,
12536,
17752,
60,
284,
364,
13553,
518,
1933,
25,
12536,
17752,
60,
284,
364,
13553,
518,
27777,
25,
12536,
58,
33758,
53094,
58,
4066,
7646,
3126,
1145,
5464,
7646,
2087,
5163,
284,
2290,
11,
3146,
9872,
25,
5884,
8,
11651,
5884,
55609,
198,
6869,
279,
5507,
68881,
627,
16503,
4933,
2310,
70693,
4194,
8345,
4194,
682,
5151,
55609,
198,
94201,
409,
70693,
10163,
422,
4927,
12418,
374,
1511,
627,
6236,
50050,
6022,
25,
9323,
17752,
11,
30226,
1145,
14008,
25,
12536,
58,
2707,
60,
284,
2290,
11,
1212,
6855,
25,
12536,
17752,
60,
284,
364,
13553,
518,
1933,
25,
12536,
17752,
60,
284,
364,
13553,
518,
27777,
25,
12536,
58,
33758,
53094,
58,
4066,
7646,
3126,
1145,
5464,
7646,
2087,
5163,
284,
2290,
11,
3146,
9872,
25,
5884,
8,
11651,
5884,
55609,
198,
6869,
279,
5507,
13
] | https://langchain.readthedocs.io/en/latest/tools/langchain.tools.google_places.tool.GooglePlacesTool.html |
6c3523fd98a8-2 | Run the tool.
property args: dict¶
property is_single_input: bool¶
Whether the tool only accepts a single input.
model Config¶
Bases: object
Configuration for this pydantic object.
arbitrary_types_allowed = True¶
extra = 'forbid'¶ | [
6869,
279,
5507,
627,
3784,
2897,
25,
6587,
55609,
198,
3784,
374,
20052,
6022,
25,
1845,
55609,
198,
25729,
279,
5507,
1193,
27441,
264,
3254,
1988,
627,
2590,
5649,
55609,
198,
33,
2315,
25,
1665,
198,
7843,
369,
420,
4611,
67,
8322,
1665,
627,
277,
88951,
9962,
43255,
284,
3082,
55609,
198,
15824,
284,
364,
2000,
21301,
6,
55609
] | https://langchain.readthedocs.io/en/latest/tools/langchain.tools.google_places.tool.GooglePlacesTool.html |
ccfb923173a7-0 | langchain.tools.gmail.get_thread.GetThreadSchema¶
class langchain.tools.gmail.get_thread.GetThreadSchema(*, thread_id: str)[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 thread_id: str [Required]¶
The thread ID. | [
5317,
8995,
24029,
73054,
673,
11048,
2283,
6998,
8802,
55609,
198,
1058,
8859,
8995,
24029,
73054,
673,
11048,
2283,
6998,
8802,
4163,
11,
4617,
851,
25,
610,
6758,
2484,
60,
55609,
198,
33,
2315,
25,
65705,
198,
4110,
264,
502,
1646,
555,
23115,
323,
69772,
1988,
828,
505,
16570,
6105,
627,
36120,
54129,
422,
279,
1988,
828,
4250,
387,
16051,
311,
1376,
264,
2764,
1646,
627,
913,
4617,
851,
25,
610,
510,
8327,
60,
55609,
198,
791,
4617,
3110,
13
] | https://langchain.readthedocs.io/en/latest/tools/langchain.tools.gmail.get_thread.GetThreadSchema.html |
451bb8ec015a-0 | langchain.tools.wikipedia.tool.WikipediaQueryRun¶
class langchain.tools.wikipedia.tool.WikipediaQueryRun(*, name: str = 'Wikipedia', description: str = 'A wrapper around Wikipedia. Useful for when you need to answer general questions about people, places, companies, facts, historical events, or other subjects. Input should be a search query.', args_schema: Optional[Type[BaseModel]] = None, return_direct: bool = False, verbose: bool = False, callbacks: Optional[Union[List[BaseCallbackHandler], BaseCallbackManager]] = None, callback_manager: Optional[BaseCallbackManager] = None, handle_tool_error: Optional[Union[bool, str, Callable[[ToolException], str]]] = False, api_wrapper: WikipediaAPIWrapper)[source]¶
Bases: BaseTool
Tool that adds the capability to search using 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 valid model.
param api_wrapper: langchain.utilities.wikipedia.WikipediaAPIWrapper [Required]¶
param args_schema: Optional[Type[BaseModel]] = None¶
Pydantic model class to validate and parse the tool’s input arguments.
param callback_manager: Optional[BaseCallbackManager] = None¶
Deprecated. Please use callbacks instead.
param callbacks: Callbacks = None¶
Callbacks to be called during tool execution.
param description: str = 'A wrapper around Wikipedia. Useful for when you need to answer general questions about people, places, companies, facts, historical events, or other subjects. Input should be a search query.'¶
Used to tell the model how/when/why to use the tool.
You can provide few-shot examples as a part of the description. | [
5317,
8995,
24029,
34466,
21966,
1196,
15288,
2929,
6869,
55609,
198,
1058,
8859,
8995,
24029,
34466,
21966,
1196,
15288,
2929,
6869,
4163,
11,
836,
25,
610,
284,
364,
54,
15288,
518,
4096,
25,
610,
284,
364,
32,
13564,
2212,
27685,
13,
51612,
369,
994,
499,
1205,
311,
4320,
4689,
4860,
922,
1274,
11,
7634,
11,
5220,
11,
13363,
11,
13970,
4455,
11,
477,
1023,
15223,
13,
5688,
1288,
387,
264,
2778,
3319,
16045,
2897,
26443,
25,
12536,
58,
941,
58,
4066,
1747,
5163,
284,
2290,
11,
471,
33971,
25,
1845,
284,
3641,
11,
14008,
25,
1845,
284,
3641,
11,
27777,
25,
12536,
58,
33758,
53094,
58,
4066,
7646,
3126,
1145,
5464,
7646,
2087,
5163,
284,
2290,
11,
4927,
12418,
25,
12536,
58,
4066,
7646,
2087,
60,
284,
2290,
11,
3790,
23627,
4188,
25,
12536,
58,
33758,
58,
2707,
11,
610,
11,
54223,
15873,
7896,
1378,
1145,
610,
5163,
60,
284,
3641,
11,
6464,
24474,
25,
27685,
7227,
11803,
6758,
2484,
60,
55609,
198,
33,
2315,
25,
5464,
7896,
198,
7896,
430,
11621,
279,
23099,
311,
2778,
1701,
279,
27685,
5446,
627,
4110,
264,
502,
1646,
555,
23115,
323,
69772,
1988,
828,
505,
16570,
6105,
627,
36120,
54129,
422,
279,
1988,
828,
4250,
387,
16051,
311,
1376,
264,
2764,
1646,
627,
913,
6464,
24474,
25,
8859,
8995,
63795,
34466,
1196,
15288,
7227,
11803,
510,
8327,
60,
55609,
198,
913,
2897,
26443,
25,
12536,
58,
941,
58,
4066,
1747,
5163,
284,
2290,
55609,
198,
14149,
67,
8322,
1646,
538,
311,
9788,
323,
4820,
279,
5507,
753,
1988,
6105,
627,
913,
4927,
12418,
25,
12536,
58,
4066,
7646,
2087,
60,
284,
2290,
55609,
198,
52444,
13,
5321,
1005,
27777,
4619,
627,
913,
27777,
25,
23499,
82,
284,
2290,
55609,
198,
45561,
311,
387,
2663,
2391,
5507,
11572,
627,
913,
4096,
25,
610,
284,
364,
32,
13564,
2212,
27685,
13,
51612,
369,
994,
499,
1205,
311,
4320,
4689,
4860,
922,
1274,
11,
7634,
11,
5220,
11,
13363,
11,
13970,
4455,
11,
477,
1023,
15223,
13,
5688,
1288,
387,
264,
2778,
3319,
3238,
55609,
198,
23580,
311,
3371,
279,
1646,
1268,
14,
9493,
14,
35734,
311,
1005,
279,
5507,
627,
2675,
649,
3493,
2478,
64630,
10507,
439,
264,
961,
315,
279,
4096,
13
] | https://langchain.readthedocs.io/en/latest/tools/langchain.tools.wikipedia.tool.WikipediaQueryRun.html |
451bb8ec015a-1 | You can provide few-shot examples as a part of the description.
param handle_tool_error: Optional[Union[bool, str, Callable[[ToolException], str]]] = False¶
Handle the content of the ToolException thrown.
param name: str = 'Wikipedia'¶
The unique name of the tool that clearly communicates its purpose.
param return_direct: bool = False¶
Whether to return the tool’s output directly. Setting this to True means
that after the tool is called, the AgentExecutor will stop looping.
param verbose: bool = False¶
Whether to log the tool’s progress.
__call__(tool_input: str, callbacks: Optional[Union[List[BaseCallbackHandler], BaseCallbackManager]] = None) → str¶
Make tool callable.
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, **kwargs: Any) → Any¶
Run the tool asynchronously.
validator raise_deprecation » all fields¶
Raise deprecation warning if callback_manager is used.
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, **kwargs: Any) → Any¶
Run the tool.
property args: dict¶
property is_single_input: bool¶
Whether the tool only accepts a single input.
model Config¶
Bases: object
Configuration for this pydantic object.
arbitrary_types_allowed = True¶
extra = 'forbid'¶ | [
2675,
649,
3493,
2478,
64630,
10507,
439,
264,
961,
315,
279,
4096,
627,
913,
3790,
23627,
4188,
25,
12536,
58,
33758,
58,
2707,
11,
610,
11,
54223,
15873,
7896,
1378,
1145,
610,
5163,
60,
284,
3641,
55609,
198,
7144,
279,
2262,
315,
279,
13782,
1378,
15338,
627,
913,
836,
25,
610,
284,
364,
54,
15288,
6,
55609,
198,
791,
5016,
836,
315,
279,
5507,
430,
9539,
92606,
1202,
7580,
627,
913,
471,
33971,
25,
1845,
284,
3641,
55609,
198,
25729,
311,
471,
279,
5507,
753,
2612,
6089,
13,
20638,
420,
311,
3082,
3445,
198,
9210,
1306,
279,
5507,
374,
2663,
11,
279,
21372,
26321,
690,
3009,
63687,
627,
913,
14008,
25,
1845,
284,
3641,
55609,
198,
25729,
311,
1515,
279,
5507,
753,
5208,
627,
565,
6797,
3889,
14506,
6022,
25,
610,
11,
27777,
25,
12536,
58,
33758,
53094,
58,
4066,
7646,
3126,
1145,
5464,
7646,
2087,
5163,
284,
2290,
8,
11651,
610,
55609,
198,
8238,
5507,
42022,
627,
7847,
802,
359,
50050,
6022,
25,
9323,
17752,
11,
30226,
1145,
14008,
25,
12536,
58,
2707,
60,
284,
2290,
11,
1212,
6855,
25,
12536,
17752,
60,
284,
364,
13553,
518,
1933,
25,
12536,
17752,
60,
284,
364,
13553,
518,
27777,
25,
12536,
58,
33758,
53094,
58,
4066,
7646,
3126,
1145,
5464,
7646,
2087,
5163,
284,
2290,
11,
3146,
9872,
25,
5884,
8,
11651,
5884,
55609,
198,
6869,
279,
5507,
68881,
627,
16503,
4933,
2310,
70693,
4194,
8345,
4194,
682,
5151,
55609,
198,
94201,
409,
70693,
10163,
422,
4927,
12418,
374,
1511,
627,
6236,
50050,
6022,
25,
9323,
17752,
11,
30226,
1145,
14008,
25,
12536,
58,
2707,
60,
284,
2290,
11,
1212,
6855,
25,
12536,
17752,
60,
284,
364,
13553,
518,
1933,
25,
12536,
17752,
60,
284,
364,
13553,
518,
27777,
25,
12536,
58,
33758,
53094,
58,
4066,
7646,
3126,
1145,
5464,
7646,
2087,
5163,
284,
2290,
11,
3146,
9872,
25,
5884,
8,
11651,
5884,
55609,
198,
6869,
279,
5507,
627,
3784,
2897,
25,
6587,
55609,
198,
3784,
374,
20052,
6022,
25,
1845,
55609,
198,
25729,
279,
5507,
1193,
27441,
264,
3254,
1988,
627,
2590,
5649,
55609,
198,
33,
2315,
25,
1665,
198,
7843,
369,
420,
4611,
67,
8322,
1665,
627,
277,
88951,
9962,
43255,
284,
3082,
55609,
198,
15824,
284,
364,
2000,
21301,
6,
55609
] | https://langchain.readthedocs.io/en/latest/tools/langchain.tools.wikipedia.tool.WikipediaQueryRun.html |
59aa2074971b-0 | langchain.tools.metaphor_search.tool.MetaphorSearchResults¶
class langchain.tools.metaphor_search.tool.MetaphorSearchResults(*, name: str = 'metaphor_search_results_json', description: str = 'A wrapper around Metaphor Search. Input should be a Metaphor-optimized query. Output is a JSON array of the query results', args_schema: Optional[Type[BaseModel]] = None, return_direct: bool = False, verbose: bool = False, callbacks: Optional[Union[List[BaseCallbackHandler], BaseCallbackManager]] = None, callback_manager: Optional[BaseCallbackManager] = None, handle_tool_error: Optional[Union[bool, str, Callable[[ToolException], str]]] = False, api_wrapper: MetaphorSearchAPIWrapper)[source]¶
Bases: BaseTool
Tool that has capability to query the Metaphor Search API and get back json.
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 api_wrapper: langchain.utilities.metaphor_search.MetaphorSearchAPIWrapper [Required]¶
param args_schema: Optional[Type[BaseModel]] = None¶
Pydantic model class to validate and parse the tool’s input arguments.
param callback_manager: Optional[BaseCallbackManager] = None¶
Deprecated. Please use callbacks instead.
param callbacks: Callbacks = None¶
Callbacks to be called during tool execution.
param description: str = 'A wrapper around Metaphor Search. Input should be a Metaphor-optimized query. Output is a JSON array of the query results'¶
Used to tell the model how/when/why to use the tool.
You can provide few-shot examples as a part of the description. | [
5317,
8995,
24029,
41748,
1366,
269,
10947,
21966,
1345,
295,
1366,
269,
6014,
10001,
55609,
198,
1058,
8859,
8995,
24029,
41748,
1366,
269,
10947,
21966,
1345,
295,
1366,
269,
6014,
10001,
4163,
11,
836,
25,
610,
284,
364,
4150,
1366,
269,
10947,
13888,
9643,
518,
4096,
25,
610,
284,
364,
32,
13564,
2212,
6344,
1366,
269,
7694,
13,
5688,
1288,
387,
264,
6344,
1366,
269,
12,
99968,
3319,
13,
9442,
374,
264,
4823,
1358,
315,
279,
3319,
3135,
518,
2897,
26443,
25,
12536,
58,
941,
58,
4066,
1747,
5163,
284,
2290,
11,
471,
33971,
25,
1845,
284,
3641,
11,
14008,
25,
1845,
284,
3641,
11,
27777,
25,
12536,
58,
33758,
53094,
58,
4066,
7646,
3126,
1145,
5464,
7646,
2087,
5163,
284,
2290,
11,
4927,
12418,
25,
12536,
58,
4066,
7646,
2087,
60,
284,
2290,
11,
3790,
23627,
4188,
25,
12536,
58,
33758,
58,
2707,
11,
610,
11,
54223,
15873,
7896,
1378,
1145,
610,
5163,
60,
284,
3641,
11,
6464,
24474,
25,
6344,
1366,
269,
6014,
7227,
11803,
6758,
2484,
60,
55609,
198,
33,
2315,
25,
5464,
7896,
198,
7896,
430,
706,
23099,
311,
3319,
279,
6344,
1366,
269,
7694,
5446,
323,
636,
1203,
3024,
627,
4110,
264,
502,
1646,
555,
23115,
323,
69772,
1988,
828,
505,
16570,
6105,
627,
36120,
54129,
422,
279,
1988,
828,
4250,
387,
16051,
311,
1376,
264,
2764,
1646,
627,
913,
6464,
24474,
25,
8859,
8995,
63795,
41748,
1366,
269,
10947,
1345,
295,
1366,
269,
6014,
7227,
11803,
510,
8327,
60,
55609,
198,
913,
2897,
26443,
25,
12536,
58,
941,
58,
4066,
1747,
5163,
284,
2290,
55609,
198,
14149,
67,
8322,
1646,
538,
311,
9788,
323,
4820,
279,
5507,
753,
1988,
6105,
627,
913,
4927,
12418,
25,
12536,
58,
4066,
7646,
2087,
60,
284,
2290,
55609,
198,
52444,
13,
5321,
1005,
27777,
4619,
627,
913,
27777,
25,
23499,
82,
284,
2290,
55609,
198,
45561,
311,
387,
2663,
2391,
5507,
11572,
627,
913,
4096,
25,
610,
284,
364,
32,
13564,
2212,
6344,
1366,
269,
7694,
13,
5688,
1288,
387,
264,
6344,
1366,
269,
12,
99968,
3319,
13,
9442,
374,
264,
4823,
1358,
315,
279,
3319,
3135,
6,
55609,
198,
23580,
311,
3371,
279,
1646,
1268,
14,
9493,
14,
35734,
311,
1005,
279,
5507,
627,
2675,
649,
3493,
2478,
64630,
10507,
439,
264,
961,
315,
279,
4096,
13
] | https://langchain.readthedocs.io/en/latest/tools/langchain.tools.metaphor_search.tool.MetaphorSearchResults.html |
59aa2074971b-1 | You can provide few-shot examples as a part of the description.
param handle_tool_error: Optional[Union[bool, str, Callable[[ToolException], str]]] = False¶
Handle the content of the ToolException thrown.
param name: str = 'metaphor_search_results_json'¶
The unique name of the tool that clearly communicates its purpose.
param return_direct: bool = False¶
Whether to return the tool’s output directly. Setting this to True means
that after the tool is called, the AgentExecutor will stop looping.
param verbose: bool = False¶
Whether to log the tool’s progress.
__call__(tool_input: str, callbacks: Optional[Union[List[BaseCallbackHandler], BaseCallbackManager]] = None) → str¶
Make tool callable.
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, **kwargs: Any) → Any¶
Run the tool asynchronously.
validator raise_deprecation » all fields¶
Raise deprecation warning if callback_manager is used.
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, **kwargs: Any) → Any¶
Run the tool.
property args: dict¶
property is_single_input: bool¶
Whether the tool only accepts a single input.
model Config¶
Bases: object
Configuration for this pydantic object.
arbitrary_types_allowed = True¶
extra = 'forbid'¶ | [
2675,
649,
3493,
2478,
64630,
10507,
439,
264,
961,
315,
279,
4096,
627,
913,
3790,
23627,
4188,
25,
12536,
58,
33758,
58,
2707,
11,
610,
11,
54223,
15873,
7896,
1378,
1145,
610,
5163,
60,
284,
3641,
55609,
198,
7144,
279,
2262,
315,
279,
13782,
1378,
15338,
627,
913,
836,
25,
610,
284,
364,
4150,
1366,
269,
10947,
13888,
9643,
6,
55609,
198,
791,
5016,
836,
315,
279,
5507,
430,
9539,
92606,
1202,
7580,
627,
913,
471,
33971,
25,
1845,
284,
3641,
55609,
198,
25729,
311,
471,
279,
5507,
753,
2612,
6089,
13,
20638,
420,
311,
3082,
3445,
198,
9210,
1306,
279,
5507,
374,
2663,
11,
279,
21372,
26321,
690,
3009,
63687,
627,
913,
14008,
25,
1845,
284,
3641,
55609,
198,
25729,
311,
1515,
279,
5507,
753,
5208,
627,
565,
6797,
3889,
14506,
6022,
25,
610,
11,
27777,
25,
12536,
58,
33758,
53094,
58,
4066,
7646,
3126,
1145,
5464,
7646,
2087,
5163,
284,
2290,
8,
11651,
610,
55609,
198,
8238,
5507,
42022,
627,
7847,
802,
359,
50050,
6022,
25,
9323,
17752,
11,
30226,
1145,
14008,
25,
12536,
58,
2707,
60,
284,
2290,
11,
1212,
6855,
25,
12536,
17752,
60,
284,
364,
13553,
518,
1933,
25,
12536,
17752,
60,
284,
364,
13553,
518,
27777,
25,
12536,
58,
33758,
53094,
58,
4066,
7646,
3126,
1145,
5464,
7646,
2087,
5163,
284,
2290,
11,
3146,
9872,
25,
5884,
8,
11651,
5884,
55609,
198,
6869,
279,
5507,
68881,
627,
16503,
4933,
2310,
70693,
4194,
8345,
4194,
682,
5151,
55609,
198,
94201,
409,
70693,
10163,
422,
4927,
12418,
374,
1511,
627,
6236,
50050,
6022,
25,
9323,
17752,
11,
30226,
1145,
14008,
25,
12536,
58,
2707,
60,
284,
2290,
11,
1212,
6855,
25,
12536,
17752,
60,
284,
364,
13553,
518,
1933,
25,
12536,
17752,
60,
284,
364,
13553,
518,
27777,
25,
12536,
58,
33758,
53094,
58,
4066,
7646,
3126,
1145,
5464,
7646,
2087,
5163,
284,
2290,
11,
3146,
9872,
25,
5884,
8,
11651,
5884,
55609,
198,
6869,
279,
5507,
627,
3784,
2897,
25,
6587,
55609,
198,
3784,
374,
20052,
6022,
25,
1845,
55609,
198,
25729,
279,
5507,
1193,
27441,
264,
3254,
1988,
627,
2590,
5649,
55609,
198,
33,
2315,
25,
1665,
198,
7843,
369,
420,
4611,
67,
8322,
1665,
627,
277,
88951,
9962,
43255,
284,
3082,
55609,
198,
15824,
284,
364,
2000,
21301,
6,
55609
] | https://langchain.readthedocs.io/en/latest/tools/langchain.tools.metaphor_search.tool.MetaphorSearchResults.html |
1c7348198418-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]¶
Bases: Enum
The location of the property.
Methods
from_str(location)
Parse an APIPropertyLocation.
Attributes
QUERY
PATH
HEADER
COOKIE
classmethod from_str(location: str) → APIPropertyLocation[source]¶
Parse an APIPropertyLocation.
COOKIE = 'cookie'¶
HEADER = 'header'¶
PATH = 'path'¶
QUERY = 'query'¶ | [
5317,
8995,
24029,
59920,
8576,
6314,
31892,
25967,
3128,
4812,
55609,
198,
1058,
8859,
8995,
24029,
59920,
8576,
6314,
31892,
25967,
3128,
4812,
3764,
11,
5144,
5980,
11,
12039,
4793,
5980,
11,
5965,
609,
5980,
11,
955,
5980,
11,
1212,
28,
16,
11,
19254,
5980,
6758,
2484,
60,
55609,
198,
33,
2315,
25,
14416,
198,
791,
3813,
315,
279,
3424,
627,
18337,
198,
1527,
2966,
23509,
340,
14802,
459,
5446,
3128,
4812,
627,
10738,
198,
42119,
198,
13907,
198,
39198,
198,
45896,
198,
27853,
505,
2966,
23509,
25,
610,
8,
11651,
5446,
3128,
4812,
76747,
60,
55609,
198,
14802,
459,
5446,
3128,
4812,
627,
45896,
284,
364,
16634,
6,
55609,
198,
39198,
284,
364,
2775,
6,
55609,
198,
13907,
284,
364,
2398,
6,
55609,
198,
42119,
284,
364,
1663,
6,
55609
] | https://langchain.readthedocs.io/en/latest/tools/langchain.tools.openapi.utils.api_models.APIPropertyLocation.html |
de6eeb985949-0 | langchain.tools.file_management.utils.FileValidationError¶
class langchain.tools.file_management.utils.FileValidationError[source]¶
Bases: ValueError
Error for paths outside the root directory.
add_note()¶
Exception.add_note(note) –
add a note to the exception
with_traceback()¶
Exception.with_traceback(tb) –
set self.__traceback__ to tb and return self.
args¶ | [
5317,
8995,
24029,
9914,
46463,
8576,
8744,
81653,
55609,
198,
1058,
8859,
8995,
24029,
9914,
46463,
8576,
8744,
81653,
76747,
60,
55609,
198,
33,
2315,
25,
15764,
198,
1480,
369,
13006,
4994,
279,
3789,
6352,
627,
723,
28306,
368,
55609,
198,
1378,
1388,
28306,
45151,
8,
1389,
198,
723,
264,
5296,
311,
279,
4788,
198,
4291,
24489,
1445,
368,
55609,
198,
1378,
18662,
24489,
1445,
62514,
8,
1389,
198,
751,
659,
4952,
15417,
1445,
565,
311,
16767,
323,
471,
659,
627,
2164,
55609
] | https://langchain.readthedocs.io/en/latest/tools/langchain.tools.file_management.utils.FileValidationError.html |
330f35800fc3-0 | langchain.tools.office365.create_draft_message.O365CreateDraftMessage¶
class langchain.tools.office365.create_draft_message.O365CreateDraftMessage(*, name: str = 'create_email_draft', description: str = 'Use this tool to create a draft email with the provided message fields.', args_schema: ~typing.Type[~langchain.tools.office365.create_draft_message.CreateDraftMessageSchema] = <class 'langchain.tools.office365.create_draft_message.CreateDraftMessageSchema'>, return_direct: bool = False, verbose: bool = False, callbacks: ~typing.Optional[~typing.Union[~typing.List[~langchain.callbacks.base.BaseCallbackHandler], ~langchain.callbacks.base.BaseCallbackManager]] = None, callback_manager: ~typing.Optional[~langchain.callbacks.base.BaseCallbackManager] = None, handle_tool_error: ~typing.Optional[~typing.Union[bool, str, ~typing.Callable[[~langchain.tools.base.ToolException], str]]] = False, account: Account = None)[source]¶
Bases: O365BaseTool
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 account: Account [Optional]¶
param args_schema: Type[langchain.tools.office365.create_draft_message.CreateDraftMessageSchema] = <class 'langchain.tools.office365.create_draft_message.CreateDraftMessageSchema'>¶
Pydantic model class to validate and parse the tool’s input arguments.
param callback_manager: Optional[BaseCallbackManager] = None¶
Deprecated. Please use callbacks instead.
param callbacks: Callbacks = None¶
Callbacks to be called during tool execution.
param description: str = 'Use this tool to create a draft email with the provided message fields.'¶
Used to tell the model how/when/why to use the tool. | [
5317,
8995,
24029,
100193,
12676,
2581,
92439,
6598,
8548,
12676,
4110,
51186,
2097,
55609,
198,
1058,
8859,
8995,
24029,
100193,
12676,
2581,
92439,
6598,
8548,
12676,
4110,
51186,
2097,
4163,
11,
836,
25,
610,
284,
364,
3261,
9351,
92439,
518,
4096,
25,
610,
284,
364,
10464,
420,
5507,
311,
1893,
264,
10165,
2613,
449,
279,
3984,
1984,
5151,
16045,
2897,
26443,
25,
4056,
90902,
10394,
58,
93,
5317,
8995,
24029,
100193,
12676,
2581,
92439,
6598,
7399,
51186,
2097,
8802,
60,
284,
366,
1058,
364,
5317,
8995,
24029,
100193,
12676,
2581,
92439,
6598,
7399,
51186,
2097,
8802,
6404,
11,
471,
33971,
25,
1845,
284,
3641,
11,
14008,
25,
1845,
284,
3641,
11,
27777,
25,
4056,
90902,
37464,
58,
93,
90902,
10840,
290,
58,
93,
90902,
5937,
58,
93,
5317,
8995,
72134,
9105,
13316,
7646,
3126,
1145,
4056,
5317,
8995,
72134,
9105,
13316,
7646,
2087,
5163,
284,
2290,
11,
4927,
12418,
25,
4056,
90902,
37464,
58,
93,
5317,
8995,
72134,
9105,
13316,
7646,
2087,
60,
284,
2290,
11,
3790,
23627,
4188,
25,
4056,
90902,
37464,
58,
93,
90902,
10840,
290,
58,
2707,
11,
610,
11,
4056,
90902,
28115,
481,
15873,
93,
5317,
8995,
24029,
9105,
25443,
1378,
1145,
610,
5163,
60,
284,
3641,
11,
2759,
25,
8785,
284,
2290,
6758,
2484,
60,
55609,
198,
33,
2315,
25,
507,
12676,
4066,
7896,
198,
4110,
264,
502,
1646,
555,
23115,
323,
69772,
1988,
828,
505,
16570,
6105,
627,
36120,
54129,
422,
279,
1988,
828,
4250,
387,
16051,
311,
1376,
264,
2764,
1646,
627,
913,
2759,
25,
8785,
510,
15669,
60,
55609,
198,
913,
2897,
26443,
25,
4078,
58,
5317,
8995,
24029,
100193,
12676,
2581,
92439,
6598,
7399,
51186,
2097,
8802,
60,
284,
366,
1058,
364,
5317,
8995,
24029,
100193,
12676,
2581,
92439,
6598,
7399,
51186,
2097,
8802,
6404,
55609,
198,
14149,
67,
8322,
1646,
538,
311,
9788,
323,
4820,
279,
5507,
753,
1988,
6105,
627,
913,
4927,
12418,
25,
12536,
58,
4066,
7646,
2087,
60,
284,
2290,
55609,
198,
52444,
13,
5321,
1005,
27777,
4619,
627,
913,
27777,
25,
23499,
82,
284,
2290,
55609,
198,
45561,
311,
387,
2663,
2391,
5507,
11572,
627,
913,
4096,
25,
610,
284,
364,
10464,
420,
5507,
311,
1893,
264,
10165,
2613,
449,
279,
3984,
1984,
5151,
3238,
55609,
198,
23580,
311,
3371,
279,
1646,
1268,
14,
9493,
14,
35734,
311,
1005,
279,
5507,
13
] | https://langchain.readthedocs.io/en/latest/tools/langchain.tools.office365.create_draft_message.O365CreateDraftMessage.html |
330f35800fc3-1 | Used to tell the model how/when/why to use the tool.
You can provide few-shot examples as a part of the description.
param handle_tool_error: Optional[Union[bool, str, Callable[[ToolException], str]]] = False¶
Handle the content of the ToolException thrown.
param name: str = 'create_email_draft'¶
The unique name of the tool that clearly communicates its purpose.
param return_direct: bool = False¶
Whether to return the tool’s output directly. Setting this to True means
that after the tool is called, the AgentExecutor will stop looping.
param verbose: bool = False¶
Whether to log the tool’s progress.
__call__(tool_input: str, callbacks: Optional[Union[List[BaseCallbackHandler], BaseCallbackManager]] = None) → str¶
Make tool callable.
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, **kwargs: Any) → Any¶
Run the tool asynchronously.
validator raise_deprecation » all fields¶
Raise deprecation warning if callback_manager is used.
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, **kwargs: Any) → Any¶
Run the tool.
property args: dict¶
property is_single_input: bool¶
Whether the tool only accepts a single input.
model Config¶
Bases: object
Configuration for this pydantic object.
arbitrary_types_allowed = True¶ | [
23580,
311,
3371,
279,
1646,
1268,
14,
9493,
14,
35734,
311,
1005,
279,
5507,
627,
2675,
649,
3493,
2478,
64630,
10507,
439,
264,
961,
315,
279,
4096,
627,
913,
3790,
23627,
4188,
25,
12536,
58,
33758,
58,
2707,
11,
610,
11,
54223,
15873,
7896,
1378,
1145,
610,
5163,
60,
284,
3641,
55609,
198,
7144,
279,
2262,
315,
279,
13782,
1378,
15338,
627,
913,
836,
25,
610,
284,
364,
3261,
9351,
92439,
6,
55609,
198,
791,
5016,
836,
315,
279,
5507,
430,
9539,
92606,
1202,
7580,
627,
913,
471,
33971,
25,
1845,
284,
3641,
55609,
198,
25729,
311,
471,
279,
5507,
753,
2612,
6089,
13,
20638,
420,
311,
3082,
3445,
198,
9210,
1306,
279,
5507,
374,
2663,
11,
279,
21372,
26321,
690,
3009,
63687,
627,
913,
14008,
25,
1845,
284,
3641,
55609,
198,
25729,
311,
1515,
279,
5507,
753,
5208,
627,
565,
6797,
3889,
14506,
6022,
25,
610,
11,
27777,
25,
12536,
58,
33758,
53094,
58,
4066,
7646,
3126,
1145,
5464,
7646,
2087,
5163,
284,
2290,
8,
11651,
610,
55609,
198,
8238,
5507,
42022,
627,
7847,
802,
359,
50050,
6022,
25,
9323,
17752,
11,
30226,
1145,
14008,
25,
12536,
58,
2707,
60,
284,
2290,
11,
1212,
6855,
25,
12536,
17752,
60,
284,
364,
13553,
518,
1933,
25,
12536,
17752,
60,
284,
364,
13553,
518,
27777,
25,
12536,
58,
33758,
53094,
58,
4066,
7646,
3126,
1145,
5464,
7646,
2087,
5163,
284,
2290,
11,
3146,
9872,
25,
5884,
8,
11651,
5884,
55609,
198,
6869,
279,
5507,
68881,
627,
16503,
4933,
2310,
70693,
4194,
8345,
4194,
682,
5151,
55609,
198,
94201,
409,
70693,
10163,
422,
4927,
12418,
374,
1511,
627,
6236,
50050,
6022,
25,
9323,
17752,
11,
30226,
1145,
14008,
25,
12536,
58,
2707,
60,
284,
2290,
11,
1212,
6855,
25,
12536,
17752,
60,
284,
364,
13553,
518,
1933,
25,
12536,
17752,
60,
284,
364,
13553,
518,
27777,
25,
12536,
58,
33758,
53094,
58,
4066,
7646,
3126,
1145,
5464,
7646,
2087,
5163,
284,
2290,
11,
3146,
9872,
25,
5884,
8,
11651,
5884,
55609,
198,
6869,
279,
5507,
627,
3784,
2897,
25,
6587,
55609,
198,
3784,
374,
20052,
6022,
25,
1845,
55609,
198,
25729,
279,
5507,
1193,
27441,
264,
3254,
1988,
627,
2590,
5649,
55609,
198,
33,
2315,
25,
1665,
198,
7843,
369,
420,
4611,
67,
8322,
1665,
627,
277,
88951,
9962,
43255,
284,
3082,
55609
] | https://langchain.readthedocs.io/en/latest/tools/langchain.tools.office365.create_draft_message.O365CreateDraftMessage.html |
330f35800fc3-2 | Configuration for this pydantic object.
arbitrary_types_allowed = True¶
extra = 'forbid'¶ | [
7843,
369,
420,
4611,
67,
8322,
1665,
627,
277,
88951,
9962,
43255,
284,
3082,
55609,
198,
15824,
284,
364,
2000,
21301,
6,
55609
] | https://langchain.readthedocs.io/en/latest/tools/langchain.tools.office365.create_draft_message.O365CreateDraftMessage.html |
c89d81db509d-0 | langchain.tools.pubmed.tool.PubmedQueryRun¶
class langchain.tools.pubmed.tool.PubmedQueryRun(*, name: str = 'PubMed', description: str = 'A wrapper around PubMed.org Useful for when you need to answer questions about Physics, Mathematics, Computer Science, Quantitative Biology, Quantitative Finance, Statistics, Electrical Engineering, and Economics from scientific articles on PubMed.org. Input should be a search query.', args_schema: Optional[Type[BaseModel]] = None, return_direct: bool = False, verbose: bool = False, callbacks: Optional[Union[List[BaseCallbackHandler], BaseCallbackManager]] = None, callback_manager: Optional[BaseCallbackManager] = None, handle_tool_error: Optional[Union[bool, str, Callable[[ToolException], str]]] = False, api_wrapper: PubMedAPIWrapper = None)[source]¶
Bases: BaseTool
Tool that adds the capability to search using the PubMed 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 valid model.
param api_wrapper: langchain.utilities.pupmed.PubMedAPIWrapper [Optional]¶
param args_schema: Optional[Type[BaseModel]] = None¶
Pydantic model class to validate and parse the tool’s input arguments.
param callback_manager: Optional[BaseCallbackManager] = None¶
Deprecated. Please use callbacks instead.
param callbacks: Callbacks = None¶
Callbacks to be called during tool execution.
param description: str = 'A wrapper around PubMed.org Useful for when you need to answer questions about Physics, Mathematics, Computer Science, Quantitative Biology, Quantitative Finance, Statistics, Electrical Engineering, and Economics from scientific articles on PubMed.org. Input should be a search query.'¶
Used to tell the model how/when/why to use the tool. | [
5317,
8995,
24029,
48873,
2106,
21966,
1087,
392,
2106,
2929,
6869,
55609,
198,
1058,
8859,
8995,
24029,
48873,
2106,
21966,
1087,
392,
2106,
2929,
6869,
4163,
11,
836,
25,
610,
284,
364,
58238,
518,
4096,
25,
610,
284,
364,
32,
13564,
2212,
53768,
2726,
51612,
369,
994,
499,
1205,
311,
4320,
4860,
922,
28415,
11,
50895,
11,
17863,
10170,
11,
32541,
22018,
40023,
11,
32541,
22018,
23261,
11,
25647,
11,
45034,
17005,
11,
323,
35300,
505,
12624,
9908,
389,
53768,
2726,
13,
5688,
1288,
387,
264,
2778,
3319,
16045,
2897,
26443,
25,
12536,
58,
941,
58,
4066,
1747,
5163,
284,
2290,
11,
471,
33971,
25,
1845,
284,
3641,
11,
14008,
25,
1845,
284,
3641,
11,
27777,
25,
12536,
58,
33758,
53094,
58,
4066,
7646,
3126,
1145,
5464,
7646,
2087,
5163,
284,
2290,
11,
4927,
12418,
25,
12536,
58,
4066,
7646,
2087,
60,
284,
2290,
11,
3790,
23627,
4188,
25,
12536,
58,
33758,
58,
2707,
11,
610,
11,
54223,
15873,
7896,
1378,
1145,
610,
5163,
60,
284,
3641,
11,
6464,
24474,
25,
53768,
7227,
11803,
284,
2290,
6758,
2484,
60,
55609,
198,
33,
2315,
25,
5464,
7896,
198,
7896,
430,
11621,
279,
23099,
311,
2778,
1701,
279,
53768,
5446,
627,
4110,
264,
502,
1646,
555,
23115,
323,
69772,
1988,
828,
505,
16570,
6105,
627,
36120,
54129,
422,
279,
1988,
828,
4250,
387,
16051,
311,
1376,
264,
2764,
1646,
627,
913,
6464,
24474,
25,
8859,
8995,
63795,
558,
455,
2106,
1087,
392,
13613,
7227,
11803,
510,
15669,
60,
55609,
198,
913,
2897,
26443,
25,
12536,
58,
941,
58,
4066,
1747,
5163,
284,
2290,
55609,
198,
14149,
67,
8322,
1646,
538,
311,
9788,
323,
4820,
279,
5507,
753,
1988,
6105,
627,
913,
4927,
12418,
25,
12536,
58,
4066,
7646,
2087,
60,
284,
2290,
55609,
198,
52444,
13,
5321,
1005,
27777,
4619,
627,
913,
27777,
25,
23499,
82,
284,
2290,
55609,
198,
45561,
311,
387,
2663,
2391,
5507,
11572,
627,
913,
4096,
25,
610,
284,
364,
32,
13564,
2212,
53768,
2726,
51612,
369,
994,
499,
1205,
311,
4320,
4860,
922,
28415,
11,
50895,
11,
17863,
10170,
11,
32541,
22018,
40023,
11,
32541,
22018,
23261,
11,
25647,
11,
45034,
17005,
11,
323,
35300,
505,
12624,
9908,
389,
53768,
2726,
13,
5688,
1288,
387,
264,
2778,
3319,
3238,
55609,
198,
23580,
311,
3371,
279,
1646,
1268,
14,
9493,
14,
35734,
311,
1005,
279,
5507,
13
] | https://langchain.readthedocs.io/en/latest/tools/langchain.tools.pubmed.tool.PubmedQueryRun.html |
c89d81db509d-1 | Used to tell the model how/when/why to use the tool.
You can provide few-shot examples as a part of the description.
param handle_tool_error: Optional[Union[bool, str, Callable[[ToolException], str]]] = False¶
Handle the content of the ToolException thrown.
param name: str = 'PubMed'¶
The unique name of the tool that clearly communicates its purpose.
param return_direct: bool = False¶
Whether to return the tool’s output directly. Setting this to True means
that after the tool is called, the AgentExecutor will stop looping.
param verbose: bool = False¶
Whether to log the tool’s progress.
__call__(tool_input: str, callbacks: Optional[Union[List[BaseCallbackHandler], BaseCallbackManager]] = None) → str¶
Make tool callable.
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, **kwargs: Any) → Any¶
Run the tool asynchronously.
validator raise_deprecation » all fields¶
Raise deprecation warning if callback_manager is used.
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, **kwargs: Any) → Any¶
Run the tool.
property args: dict¶
property is_single_input: bool¶
Whether the tool only accepts a single input.
model Config¶
Bases: object
Configuration for this pydantic object.
arbitrary_types_allowed = True¶
extra = 'forbid'¶ | [
23580,
311,
3371,
279,
1646,
1268,
14,
9493,
14,
35734,
311,
1005,
279,
5507,
627,
2675,
649,
3493,
2478,
64630,
10507,
439,
264,
961,
315,
279,
4096,
627,
913,
3790,
23627,
4188,
25,
12536,
58,
33758,
58,
2707,
11,
610,
11,
54223,
15873,
7896,
1378,
1145,
610,
5163,
60,
284,
3641,
55609,
198,
7144,
279,
2262,
315,
279,
13782,
1378,
15338,
627,
913,
836,
25,
610,
284,
364,
58238,
6,
55609,
198,
791,
5016,
836,
315,
279,
5507,
430,
9539,
92606,
1202,
7580,
627,
913,
471,
33971,
25,
1845,
284,
3641,
55609,
198,
25729,
311,
471,
279,
5507,
753,
2612,
6089,
13,
20638,
420,
311,
3082,
3445,
198,
9210,
1306,
279,
5507,
374,
2663,
11,
279,
21372,
26321,
690,
3009,
63687,
627,
913,
14008,
25,
1845,
284,
3641,
55609,
198,
25729,
311,
1515,
279,
5507,
753,
5208,
627,
565,
6797,
3889,
14506,
6022,
25,
610,
11,
27777,
25,
12536,
58,
33758,
53094,
58,
4066,
7646,
3126,
1145,
5464,
7646,
2087,
5163,
284,
2290,
8,
11651,
610,
55609,
198,
8238,
5507,
42022,
627,
7847,
802,
359,
50050,
6022,
25,
9323,
17752,
11,
30226,
1145,
14008,
25,
12536,
58,
2707,
60,
284,
2290,
11,
1212,
6855,
25,
12536,
17752,
60,
284,
364,
13553,
518,
1933,
25,
12536,
17752,
60,
284,
364,
13553,
518,
27777,
25,
12536,
58,
33758,
53094,
58,
4066,
7646,
3126,
1145,
5464,
7646,
2087,
5163,
284,
2290,
11,
3146,
9872,
25,
5884,
8,
11651,
5884,
55609,
198,
6869,
279,
5507,
68881,
627,
16503,
4933,
2310,
70693,
4194,
8345,
4194,
682,
5151,
55609,
198,
94201,
409,
70693,
10163,
422,
4927,
12418,
374,
1511,
627,
6236,
50050,
6022,
25,
9323,
17752,
11,
30226,
1145,
14008,
25,
12536,
58,
2707,
60,
284,
2290,
11,
1212,
6855,
25,
12536,
17752,
60,
284,
364,
13553,
518,
1933,
25,
12536,
17752,
60,
284,
364,
13553,
518,
27777,
25,
12536,
58,
33758,
53094,
58,
4066,
7646,
3126,
1145,
5464,
7646,
2087,
5163,
284,
2290,
11,
3146,
9872,
25,
5884,
8,
11651,
5884,
55609,
198,
6869,
279,
5507,
627,
3784,
2897,
25,
6587,
55609,
198,
3784,
374,
20052,
6022,
25,
1845,
55609,
198,
25729,
279,
5507,
1193,
27441,
264,
3254,
1988,
627,
2590,
5649,
55609,
198,
33,
2315,
25,
1665,
198,
7843,
369,
420,
4611,
67,
8322,
1665,
627,
277,
88951,
9962,
43255,
284,
3082,
55609,
198,
15824,
284,
364,
2000,
21301,
6,
55609
] | https://langchain.readthedocs.io/en/latest/tools/langchain.tools.pubmed.tool.PubmedQueryRun.html |
c89d81db509d-2 | arbitrary_types_allowed = True¶
extra = 'forbid'¶ | [
277,
88951,
9962,
43255,
284,
3082,
55609,
198,
15824,
284,
364,
2000,
21301,
6,
55609
] | https://langchain.readthedocs.io/en/latest/tools/langchain.tools.pubmed.tool.PubmedQueryRun.html |
ae697655a336-0 | langchain.tools.file_management.utils.is_relative_to¶
langchain.tools.file_management.utils.is_relative_to(path: Path, root: Path) → bool[source]¶
Check if path is relative to root. | [
5317,
8995,
24029,
9914,
46463,
8576,
2124,
30386,
2401,
55609,
198,
5317,
8995,
24029,
9914,
46463,
8576,
2124,
30386,
2401,
5698,
25,
8092,
11,
3789,
25,
8092,
8,
11651,
1845,
76747,
60,
55609,
198,
4061,
422,
1853,
374,
8844,
311,
3789,
13
] | https://langchain.readthedocs.io/en/latest/tools/langchain.tools.file_management.utils.is_relative_to.html |
33fba5386281-0 | langchain.tools.base.SchemaAnnotationError¶
class langchain.tools.base.SchemaAnnotationError[source]¶
Bases: TypeError
Raised when ‘args_schema’ is missing or has an incorrect type annotation.
add_note()¶
Exception.add_note(note) –
add a note to the exception
with_traceback()¶
Exception.with_traceback(tb) –
set self.__traceback__ to tb and return self.
args¶ | [
5317,
8995,
24029,
9105,
21786,
20290,
1480,
55609,
198,
1058,
8859,
8995,
24029,
9105,
21786,
20290,
1480,
76747,
60,
55609,
198,
33,
2315,
25,
26082,
198,
96014,
994,
3451,
2164,
26443,
529,
374,
7554,
477,
706,
459,
15465,
955,
21917,
627,
723,
28306,
368,
55609,
198,
1378,
1388,
28306,
45151,
8,
1389,
198,
723,
264,
5296,
311,
279,
4788,
198,
4291,
24489,
1445,
368,
55609,
198,
1378,
18662,
24489,
1445,
62514,
8,
1389,
198,
751,
659,
4952,
15417,
1445,
565,
311,
16767,
323,
471,
659,
627,
2164,
55609
] | https://langchain.readthedocs.io/en/latest/tools/langchain.tools.base.SchemaAnnotationError.html |
dc82b58bcfdd-0 | langchain.tools.vectorstore.tool.VectorStoreQAWithSourcesTool¶
class langchain.tools.vectorstore.tool.VectorStoreQAWithSourcesTool(*, name: str, description: str, args_schema: Optional[Type[BaseModel]] = None, return_direct: bool = False, verbose: bool = False, callbacks: Optional[Union[List[BaseCallbackHandler], BaseCallbackManager]] = None, callback_manager: Optional[BaseCallbackManager] = None, handle_tool_error: Optional[Union[bool, str, Callable[[ToolException], str]]] = False, vectorstore: VectorStore, llm: BaseLanguageModel = None)[source]¶
Bases: BaseVectorStoreTool, BaseTool
Tool for the VectorDBQAWithSources chain.
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 args_schema: Optional[Type[BaseModel]] = None¶
Pydantic model class to validate and parse the tool’s input arguments.
param callback_manager: Optional[BaseCallbackManager] = None¶
Deprecated. Please use callbacks instead.
param callbacks: Callbacks = None¶
Callbacks to be called during tool execution.
param description: str [Required]¶
Used to tell the model how/when/why to use the tool.
You can provide few-shot examples as a part of the description.
param handle_tool_error: Optional[Union[bool, str, Callable[[ToolException], str]]] = False¶
Handle the content of the ToolException thrown.
param llm: langchain.base_language.BaseLanguageModel [Optional]¶
param name: str [Required]¶
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 | [
5317,
8995,
24029,
48203,
4412,
21966,
14621,
6221,
48622,
2409,
33300,
7896,
55609,
198,
1058,
8859,
8995,
24029,
48203,
4412,
21966,
14621,
6221,
48622,
2409,
33300,
7896,
4163,
11,
836,
25,
610,
11,
4096,
25,
610,
11,
2897,
26443,
25,
12536,
58,
941,
58,
4066,
1747,
5163,
284,
2290,
11,
471,
33971,
25,
1845,
284,
3641,
11,
14008,
25,
1845,
284,
3641,
11,
27777,
25,
12536,
58,
33758,
53094,
58,
4066,
7646,
3126,
1145,
5464,
7646,
2087,
5163,
284,
2290,
11,
4927,
12418,
25,
12536,
58,
4066,
7646,
2087,
60,
284,
2290,
11,
3790,
23627,
4188,
25,
12536,
58,
33758,
58,
2707,
11,
610,
11,
54223,
15873,
7896,
1378,
1145,
610,
5163,
60,
284,
3641,
11,
4724,
4412,
25,
4290,
6221,
11,
9507,
76,
25,
5464,
14126,
1747,
284,
2290,
6758,
2484,
60,
55609,
198,
33,
2315,
25,
5464,
3866,
6221,
7896,
11,
5464,
7896,
198,
7896,
369,
279,
4290,
3590,
48622,
2409,
33300,
8957,
627,
4110,
264,
502,
1646,
555,
23115,
323,
69772,
1988,
828,
505,
16570,
6105,
627,
36120,
54129,
422,
279,
1988,
828,
4250,
387,
16051,
311,
1376,
264,
2764,
1646,
627,
913,
2897,
26443,
25,
12536,
58,
941,
58,
4066,
1747,
5163,
284,
2290,
55609,
198,
14149,
67,
8322,
1646,
538,
311,
9788,
323,
4820,
279,
5507,
753,
1988,
6105,
627,
913,
4927,
12418,
25,
12536,
58,
4066,
7646,
2087,
60,
284,
2290,
55609,
198,
52444,
13,
5321,
1005,
27777,
4619,
627,
913,
27777,
25,
23499,
82,
284,
2290,
55609,
198,
45561,
311,
387,
2663,
2391,
5507,
11572,
627,
913,
4096,
25,
610,
510,
8327,
60,
55609,
198,
23580,
311,
3371,
279,
1646,
1268,
14,
9493,
14,
35734,
311,
1005,
279,
5507,
627,
2675,
649,
3493,
2478,
64630,
10507,
439,
264,
961,
315,
279,
4096,
627,
913,
3790,
23627,
4188,
25,
12536,
58,
33758,
58,
2707,
11,
610,
11,
54223,
15873,
7896,
1378,
1145,
610,
5163,
60,
284,
3641,
55609,
198,
7144,
279,
2262,
315,
279,
13782,
1378,
15338,
627,
913,
9507,
76,
25,
8859,
8995,
9105,
30121,
13316,
14126,
1747,
510,
15669,
60,
55609,
198,
913,
836,
25,
610,
510,
8327,
60,
55609,
198,
791,
5016,
836,
315,
279,
5507,
430,
9539,
92606,
1202,
7580,
627,
913,
471,
33971,
25,
1845,
284,
3641,
55609,
198,
25729,
311,
471,
279,
5507,
753,
2612,
6089,
13,
20638,
420,
311,
3082,
3445
] | https://langchain.readthedocs.io/en/latest/tools/langchain.tools.vectorstore.tool.VectorStoreQAWithSourcesTool.html |
dc82b58bcfdd-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 vectorstore: langchain.vectorstores.base.VectorStore [Required]¶
param verbose: bool = False¶
Whether to log the tool’s progress.
__call__(tool_input: str, callbacks: Optional[Union[List[BaseCallbackHandler], BaseCallbackManager]] = None) → str¶
Make tool callable.
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, **kwargs: Any) → Any¶
Run the tool asynchronously.
static get_description(name: str, description: str) → str[source]¶
validator raise_deprecation » all fields¶
Raise deprecation warning if callback_manager is used.
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, **kwargs: Any) → Any¶
Run the tool.
property args: dict¶
property is_single_input: bool¶
Whether the tool only accepts a single input.
model Config¶
Bases: Config
Configuration for this pydantic object.
arbitrary_types_allowed = True¶
extra = 'forbid'¶ | [
25729,
311,
471,
279,
5507,
753,
2612,
6089,
13,
20638,
420,
311,
3082,
3445,
198,
9210,
1306,
279,
5507,
374,
2663,
11,
279,
21372,
26321,
690,
3009,
63687,
627,
913,
4724,
4412,
25,
8859,
8995,
48203,
44569,
9105,
14621,
6221,
510,
8327,
60,
55609,
198,
913,
14008,
25,
1845,
284,
3641,
55609,
198,
25729,
311,
1515,
279,
5507,
753,
5208,
627,
565,
6797,
3889,
14506,
6022,
25,
610,
11,
27777,
25,
12536,
58,
33758,
53094,
58,
4066,
7646,
3126,
1145,
5464,
7646,
2087,
5163,
284,
2290,
8,
11651,
610,
55609,
198,
8238,
5507,
42022,
627,
7847,
802,
359,
50050,
6022,
25,
9323,
17752,
11,
30226,
1145,
14008,
25,
12536,
58,
2707,
60,
284,
2290,
11,
1212,
6855,
25,
12536,
17752,
60,
284,
364,
13553,
518,
1933,
25,
12536,
17752,
60,
284,
364,
13553,
518,
27777,
25,
12536,
58,
33758,
53094,
58,
4066,
7646,
3126,
1145,
5464,
7646,
2087,
5163,
284,
2290,
11,
3146,
9872,
25,
5884,
8,
11651,
5884,
55609,
198,
6869,
279,
5507,
68881,
627,
2020,
636,
11703,
3232,
25,
610,
11,
4096,
25,
610,
8,
11651,
610,
76747,
60,
55609,
198,
16503,
4933,
2310,
70693,
4194,
8345,
4194,
682,
5151,
55609,
198,
94201,
409,
70693,
10163,
422,
4927,
12418,
374,
1511,
627,
6236,
50050,
6022,
25,
9323,
17752,
11,
30226,
1145,
14008,
25,
12536,
58,
2707,
60,
284,
2290,
11,
1212,
6855,
25,
12536,
17752,
60,
284,
364,
13553,
518,
1933,
25,
12536,
17752,
60,
284,
364,
13553,
518,
27777,
25,
12536,
58,
33758,
53094,
58,
4066,
7646,
3126,
1145,
5464,
7646,
2087,
5163,
284,
2290,
11,
3146,
9872,
25,
5884,
8,
11651,
5884,
55609,
198,
6869,
279,
5507,
627,
3784,
2897,
25,
6587,
55609,
198,
3784,
374,
20052,
6022,
25,
1845,
55609,
198,
25729,
279,
5507,
1193,
27441,
264,
3254,
1988,
627,
2590,
5649,
55609,
198,
33,
2315,
25,
5649,
198,
7843,
369,
420,
4611,
67,
8322,
1665,
627,
277,
88951,
9962,
43255,
284,
3082,
55609,
198,
15824,
284,
364,
2000,
21301,
6,
55609
] | https://langchain.readthedocs.io/en/latest/tools/langchain.tools.vectorstore.tool.VectorStoreQAWithSourcesTool.html |
ba51c62b1a87-0 | langchain.tools.office365.send_event.SendEventSchema¶
class langchain.tools.office365.send_event.SendEventSchema(*, body: str, attendees: List[str], subject: str, start_datetime: str, end_datetime: str)[source]¶
Bases: BaseModel
Input for CreateEvent Tool.
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 attendees: List[str] [Required]¶
The list of attendees for the event.
param body: str [Required]¶
The message body to include in the event.
param end_datetime: str [Required]¶
The end datetime for the event in the following format: YYYY-MM-DDTHH:MM:SS±hh:mm, where “T” separates the date and time components, and the time zone offset is specified as ±hh:mm. For example: “2023-06-09T10:30:00+03:00” represents June 9th, 2023, at 10:30 AM in a time zone with a positive offset of 3 hours from Coordinated Universal Time (UTC).
param start_datetime: str [Required]¶
The start datetime for the event in the following format: YYYY-MM-DDTHH:MM:SS±hh:mm, where “T” separates the date and time components, and the time zone offset is specified as ±hh:mm. For example: “2023-06-09T10:30:00+03:00” represents June 9th, 2023, at 10:30 AM in a time zone with a positive offset of 3 hours from Coordinated Universal Time (UTC).
param subject: str [Required]¶
The subject of the event. | [
5317,
8995,
24029,
100193,
12676,
5331,
6891,
20787,
1585,
8802,
55609,
198,
1058,
8859,
8995,
24029,
100193,
12676,
5331,
6891,
20787,
1585,
8802,
4163,
11,
2547,
25,
610,
11,
40285,
25,
1796,
17752,
1145,
3917,
25,
610,
11,
1212,
30043,
25,
610,
11,
842,
30043,
25,
610,
6758,
2484,
60,
55609,
198,
33,
2315,
25,
65705,
198,
2566,
369,
4324,
1585,
13782,
627,
4110,
264,
502,
1646,
555,
23115,
323,
69772,
1988,
828,
505,
16570,
6105,
627,
36120,
54129,
422,
279,
1988,
828,
4250,
387,
16051,
311,
1376,
264,
2764,
1646,
627,
913,
40285,
25,
1796,
17752,
60,
510,
8327,
60,
55609,
198,
791,
1160,
315,
40285,
369,
279,
1567,
627,
913,
2547,
25,
610,
510,
8327,
60,
55609,
198,
791,
1984,
2547,
311,
2997,
304,
279,
1567,
627,
913,
842,
30043,
25,
610,
510,
8327,
60,
55609,
198,
791,
842,
9050,
369,
279,
1567,
304,
279,
2768,
3645,
25,
220,
61691,
19013,
41275,
3701,
39,
25,
8195,
25,
1242,
38121,
20990,
20737,
11,
1405,
1054,
51,
863,
62849,
279,
2457,
323,
892,
220,
6956,
11,
323,
279,
892,
10353,
4445,
374,
5300,
439,
20903,
20990,
20737,
13,
220,
1789,
3187,
25,
1054,
2366,
18,
12,
2705,
12,
2545,
51,
605,
25,
966,
25,
410,
10,
2839,
25,
410,
863,
11105,
5651,
220,
24,
339,
11,
220,
220,
2366,
18,
11,
520,
220,
605,
25,
966,
6912,
304,
264,
892,
10353,
449,
264,
6928,
4445,
315,
220,
18,
220,
4207,
505,
3623,
83569,
26581,
4212,
320,
21872,
4390,
913,
1212,
30043,
25,
610,
510,
8327,
60,
55609,
198,
791,
1212,
9050,
369,
279,
1567,
304,
279,
2768,
3645,
25,
220,
61691,
19013,
41275,
3701,
39,
25,
8195,
25,
1242,
38121,
20990,
20737,
11,
1405,
1054,
51,
863,
62849,
279,
2457,
323,
892,
220,
6956,
11,
323,
279,
892,
10353,
4445,
374,
5300,
439,
20903,
20990,
20737,
13,
220,
1789,
3187,
25,
1054,
2366,
18,
12,
2705,
12,
2545,
51,
605,
25,
966,
25,
410,
10,
2839,
25,
410,
863,
11105,
5651,
220,
24,
339,
11,
220,
220,
2366,
18,
11,
520,
220,
605,
25,
966,
6912,
304,
264,
892,
10353,
449,
264,
6928,
4445,
315,
220,
18,
220,
4207,
505,
3623,
83569,
26581,
4212,
320,
21872,
4390,
913,
3917,
25,
610,
510,
8327,
60,
55609,
198,
791,
3917,
315,
279,
1567,
13
] | https://langchain.readthedocs.io/en/latest/tools/langchain.tools.office365.send_event.SendEventSchema.html |
0caf792d2927-0 | langchain.tools.azure_cognitive_services.utils.download_audio_from_url¶
langchain.tools.azure_cognitive_services.utils.download_audio_from_url(audio_url: str) → str[source]¶
Download audio from url to local. | [
5317,
8995,
24029,
71340,
669,
51549,
40946,
8576,
36481,
30788,
5791,
2975,
55609,
198,
5317,
8995,
24029,
71340,
669,
51549,
40946,
8576,
36481,
30788,
5791,
2975,
56165,
2975,
25,
610,
8,
11651,
610,
76747,
60,
55609,
198,
11631,
7855,
505,
2576,
311,
2254,
13
] | https://langchain.readthedocs.io/en/latest/tools/langchain.tools.azure_cognitive_services.utils.download_audio_from_url.html |
33851bedaa55-0 | langchain.tools.office365.utils.authenticate¶
langchain.tools.office365.utils.authenticate() → Account[source]¶
Authenticate using the Microsoft Grah API | [
5317,
8995,
24029,
100193,
12676,
8576,
49898,
55609,
198,
5317,
8995,
24029,
100193,
12676,
8576,
49898,
368,
11651,
8785,
76747,
60,
55609,
198,
100187,
1701,
279,
5210,
480,
33607,
5446
] | https://langchain.readthedocs.io/en/latest/tools/langchain.tools.office365.utils.authenticate.html |
e7adf42748c7-0 | langchain.tools.openapi.utils.api_models.APIRequestBodyProperty¶
class langchain.tools.openapi.utils.api_models.APIRequestBodyProperty(*, name: str, required: bool, type: Union[str, Type, tuple, None, Enum] = None, default: Optional[Any] = None, description: Optional[str] = None, properties: List[APIRequestBodyProperty], references_used: List[str])[source]¶
Bases: APIPropertyBase
A model for a request body property.
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 default: Optional[Any] = None¶
The default value of the property.
param description: Optional[str] = None¶
The description of the property.
param name: str [Required]¶
The name of the property.
param properties: List[langchain.tools.openapi.utils.api_models.APIRequestBodyProperty] [Required]¶
The sub-properties of the property.
param references_used: List[str] [Required]¶
The references used by the property.
param required: bool [Required]¶
Whether the property is required.
param type: Union[str, Type, tuple, None, enum.Enum] = None¶
The type of the property.
Either a primitive type, a component/parameter type,
or an array or ‘object’ (dict) of the above.
classmethod from_schema(schema: Schema, name: str, required: bool, spec: OpenAPISpec, references_used: Optional[List[str]] = None) → APIRequestBodyProperty[source]¶
Recursively populate from an OpenAPI Schema. | [
5317,
8995,
24029,
59920,
8576,
6314,
31892,
25967,
34434,
3128,
55609,
198,
1058,
8859,
8995,
24029,
59920,
8576,
6314,
31892,
25967,
34434,
3128,
4163,
11,
836,
25,
610,
11,
2631,
25,
1845,
11,
955,
25,
9323,
17752,
11,
4078,
11,
14743,
11,
2290,
11,
14416,
60,
284,
2290,
11,
1670,
25,
12536,
71401,
60,
284,
2290,
11,
4096,
25,
12536,
17752,
60,
284,
2290,
11,
6012,
25,
1796,
58,
7227,
34434,
3128,
1145,
15407,
28903,
25,
1796,
17752,
41105,
2484,
60,
55609,
198,
33,
2315,
25,
5446,
3128,
4066,
198,
32,
1646,
369,
264,
1715,
2547,
3424,
627,
4110,
264,
502,
1646,
555,
23115,
323,
69772,
1988,
828,
505,
16570,
6105,
627,
36120,
54129,
422,
279,
1988,
828,
4250,
387,
16051,
311,
1376,
264,
2764,
1646,
627,
913,
1670,
25,
12536,
71401,
60,
284,
2290,
55609,
198,
791,
1670,
907,
315,
279,
3424,
627,
913,
4096,
25,
12536,
17752,
60,
284,
2290,
55609,
198,
791,
4096,
315,
279,
3424,
627,
913,
836,
25,
610,
510,
8327,
60,
55609,
198,
791,
836,
315,
279,
3424,
627,
913,
6012,
25,
1796,
58,
5317,
8995,
24029,
59920,
8576,
6314,
31892,
25967,
34434,
3128,
60,
510,
8327,
60,
55609,
198,
791,
1207,
68179,
315,
279,
3424,
627,
913,
15407,
28903,
25,
1796,
17752,
60,
510,
8327,
60,
55609,
198,
791,
15407,
1511,
555,
279,
3424,
627,
913,
2631,
25,
1845,
510,
8327,
60,
55609,
198,
25729,
279,
3424,
374,
2631,
627,
913,
955,
25,
9323,
17752,
11,
4078,
11,
14743,
11,
2290,
11,
7773,
44325,
60,
284,
2290,
55609,
198,
791,
955,
315,
279,
3424,
627,
50344,
264,
28694,
955,
11,
264,
3777,
14,
16577,
955,
345,
269,
459,
1358,
477,
3451,
1735,
529,
320,
8644,
8,
315,
279,
3485,
627,
27853,
505,
26443,
43835,
25,
12824,
11,
836,
25,
610,
11,
2631,
25,
1845,
11,
1424,
25,
5377,
2599,
1669,
1007,
11,
15407,
28903,
25,
12536,
53094,
17752,
5163,
284,
2290,
8,
11651,
5446,
34434,
3128,
76747,
60,
55609,
198,
3905,
80837,
31546,
505,
459,
5377,
7227,
12824,
13
] | https://langchain.readthedocs.io/en/latest/tools/langchain.tools.openapi.utils.api_models.APIRequestBodyProperty.html |
1cea20de2d96-0 | langchain.tools.python.tool.PythonAstREPLTool¶
class langchain.tools.python.tool.PythonAstREPLTool(*, name: str = 'python_repl_ast', description: str = 'A Python shell. Use this to execute python commands. Input should be a valid python command. When using this tool, sometimes output is abbreviated - make sure it does not look abbreviated before using it in your answer.', args_schema: Optional[Type[BaseModel]] = None, return_direct: bool = False, verbose: bool = False, callbacks: Optional[Union[List[BaseCallbackHandler], BaseCallbackManager]] = None, callback_manager: Optional[BaseCallbackManager] = None, handle_tool_error: Optional[Union[bool, str, Callable[[ToolException], str]]] = False, globals: Optional[Dict] = None, locals: Optional[Dict] = None, sanitize_input: bool = True)[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 parsed to form a valid model.
param args_schema: Optional[Type[BaseModel]] = None¶
Pydantic model class to validate and parse the tool’s input arguments.
param callback_manager: Optional[BaseCallbackManager] = None¶
Deprecated. Please use callbacks instead.
param callbacks: Callbacks = None¶
Callbacks to be called during tool execution.
param description: str = 'A Python shell. Use this to execute python commands. Input should be a valid python command. When using this tool, sometimes output is abbreviated - make sure it does not look abbreviated before using it in your answer.'¶
Used to tell the model how/when/why to use the tool.
You can provide few-shot examples as a part of the description. | [
5317,
8995,
24029,
44293,
21966,
1087,
27993,
62152,
793,
2989,
7896,
55609,
198,
1058,
8859,
8995,
24029,
44293,
21966,
1087,
27993,
62152,
793,
2989,
7896,
4163,
11,
836,
25,
610,
284,
364,
12958,
1311,
501,
49119,
518,
4096,
25,
610,
284,
364,
32,
13325,
12811,
13,
5560,
420,
311,
9203,
10344,
11545,
13,
5688,
1288,
387,
264,
2764,
10344,
3290,
13,
3277,
1701,
420,
5507,
11,
7170,
2612,
374,
95875,
482,
1304,
2771,
433,
1587,
539,
1427,
95875,
1603,
1701,
433,
304,
701,
4320,
16045,
2897,
26443,
25,
12536,
58,
941,
58,
4066,
1747,
5163,
284,
2290,
11,
471,
33971,
25,
1845,
284,
3641,
11,
14008,
25,
1845,
284,
3641,
11,
27777,
25,
12536,
58,
33758,
53094,
58,
4066,
7646,
3126,
1145,
5464,
7646,
2087,
5163,
284,
2290,
11,
4927,
12418,
25,
12536,
58,
4066,
7646,
2087,
60,
284,
2290,
11,
3790,
23627,
4188,
25,
12536,
58,
33758,
58,
2707,
11,
610,
11,
54223,
15873,
7896,
1378,
1145,
610,
5163,
60,
284,
3641,
11,
38885,
25,
12536,
58,
13755,
60,
284,
2290,
11,
25958,
25,
12536,
58,
13755,
60,
284,
2290,
11,
46283,
6022,
25,
1845,
284,
3082,
6758,
2484,
60,
55609,
198,
33,
2315,
25,
5464,
7896,
198,
32,
5507,
369,
4401,
10344,
2082,
304,
264,
93680,
627,
4110,
264,
502,
1646,
555,
23115,
323,
69772,
1988,
828,
505,
16570,
6105,
627,
36120,
54129,
422,
279,
1988,
828,
4250,
387,
16051,
311,
1376,
264,
2764,
1646,
627,
913,
2897,
26443,
25,
12536,
58,
941,
58,
4066,
1747,
5163,
284,
2290,
55609,
198,
14149,
67,
8322,
1646,
538,
311,
9788,
323,
4820,
279,
5507,
753,
1988,
6105,
627,
913,
4927,
12418,
25,
12536,
58,
4066,
7646,
2087,
60,
284,
2290,
55609,
198,
52444,
13,
5321,
1005,
27777,
4619,
627,
913,
27777,
25,
23499,
82,
284,
2290,
55609,
198,
45561,
311,
387,
2663,
2391,
5507,
11572,
627,
913,
4096,
25,
610,
284,
364,
32,
13325,
12811,
13,
5560,
420,
311,
9203,
10344,
11545,
13,
5688,
1288,
387,
264,
2764,
10344,
3290,
13,
3277,
1701,
420,
5507,
11,
7170,
2612,
374,
95875,
482,
1304,
2771,
433,
1587,
539,
1427,
95875,
1603,
1701,
433,
304,
701,
4320,
3238,
55609,
198,
23580,
311,
3371,
279,
1646,
1268,
14,
9493,
14,
35734,
311,
1005,
279,
5507,
627,
2675,
649,
3493,
2478,
64630,
10507,
439,
264,
961,
315,
279,
4096,
13
] | https://langchain.readthedocs.io/en/latest/tools/langchain.tools.python.tool.PythonAstREPLTool.html |
1cea20de2d96-1 | You can provide few-shot examples as a part of the description.
param globals: Optional[Dict] [Optional]¶
param handle_tool_error: Optional[Union[bool, str, Callable[[ToolException], str]]] = False¶
Handle the content of the ToolException thrown.
param locals: Optional[Dict] [Optional]¶
param name: str = 'python_repl_ast'¶
The unique name of the tool that clearly communicates its purpose.
param return_direct: bool = False¶
Whether to return the tool’s output directly. Setting this to True means
that after the tool is called, the AgentExecutor will stop looping.
param sanitize_input: bool = True¶
param verbose: bool = False¶
Whether to log the tool’s progress.
__call__(tool_input: str, callbacks: Optional[Union[List[BaseCallbackHandler], BaseCallbackManager]] = None) → str¶
Make tool callable.
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, **kwargs: Any) → Any¶
Run the tool asynchronously.
validator raise_deprecation » all fields¶
Raise deprecation warning if callback_manager is used.
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, **kwargs: Any) → Any¶
Run the tool.
validator validate_python_version » all fields[source]¶
Validate valid python version.
property args: dict¶
property is_single_input: bool¶ | [
2675,
649,
3493,
2478,
64630,
10507,
439,
264,
961,
315,
279,
4096,
627,
913,
38885,
25,
12536,
58,
13755,
60,
510,
15669,
60,
55609,
198,
913,
3790,
23627,
4188,
25,
12536,
58,
33758,
58,
2707,
11,
610,
11,
54223,
15873,
7896,
1378,
1145,
610,
5163,
60,
284,
3641,
55609,
198,
7144,
279,
2262,
315,
279,
13782,
1378,
15338,
627,
913,
25958,
25,
12536,
58,
13755,
60,
510,
15669,
60,
55609,
198,
913,
836,
25,
610,
284,
364,
12958,
1311,
501,
49119,
6,
55609,
198,
791,
5016,
836,
315,
279,
5507,
430,
9539,
92606,
1202,
7580,
627,
913,
471,
33971,
25,
1845,
284,
3641,
55609,
198,
25729,
311,
471,
279,
5507,
753,
2612,
6089,
13,
20638,
420,
311,
3082,
3445,
198,
9210,
1306,
279,
5507,
374,
2663,
11,
279,
21372,
26321,
690,
3009,
63687,
627,
913,
46283,
6022,
25,
1845,
284,
3082,
55609,
198,
913,
14008,
25,
1845,
284,
3641,
55609,
198,
25729,
311,
1515,
279,
5507,
753,
5208,
627,
565,
6797,
3889,
14506,
6022,
25,
610,
11,
27777,
25,
12536,
58,
33758,
53094,
58,
4066,
7646,
3126,
1145,
5464,
7646,
2087,
5163,
284,
2290,
8,
11651,
610,
55609,
198,
8238,
5507,
42022,
627,
7847,
802,
359,
50050,
6022,
25,
9323,
17752,
11,
30226,
1145,
14008,
25,
12536,
58,
2707,
60,
284,
2290,
11,
1212,
6855,
25,
12536,
17752,
60,
284,
364,
13553,
518,
1933,
25,
12536,
17752,
60,
284,
364,
13553,
518,
27777,
25,
12536,
58,
33758,
53094,
58,
4066,
7646,
3126,
1145,
5464,
7646,
2087,
5163,
284,
2290,
11,
3146,
9872,
25,
5884,
8,
11651,
5884,
55609,
198,
6869,
279,
5507,
68881,
627,
16503,
4933,
2310,
70693,
4194,
8345,
4194,
682,
5151,
55609,
198,
94201,
409,
70693,
10163,
422,
4927,
12418,
374,
1511,
627,
6236,
50050,
6022,
25,
9323,
17752,
11,
30226,
1145,
14008,
25,
12536,
58,
2707,
60,
284,
2290,
11,
1212,
6855,
25,
12536,
17752,
60,
284,
364,
13553,
518,
1933,
25,
12536,
17752,
60,
284,
364,
13553,
518,
27777,
25,
12536,
58,
33758,
53094,
58,
4066,
7646,
3126,
1145,
5464,
7646,
2087,
5163,
284,
2290,
11,
3146,
9872,
25,
5884,
8,
11651,
5884,
55609,
198,
6869,
279,
5507,
627,
16503,
9788,
56969,
9625,
4194,
8345,
4194,
682,
5151,
76747,
60,
55609,
198,
18409,
2764,
10344,
2373,
627,
3784,
2897,
25,
6587,
55609,
198,
3784,
374,
20052,
6022,
25,
1845,
55609
] | https://langchain.readthedocs.io/en/latest/tools/langchain.tools.python.tool.PythonAstREPLTool.html |
1cea20de2d96-2 | Validate valid python version.
property args: dict¶
property is_single_input: bool¶
Whether the tool only accepts a single input.
model Config¶
Bases: object
Configuration for this pydantic object.
arbitrary_types_allowed = True¶
extra = 'forbid'¶ | [
18409,
2764,
10344,
2373,
627,
3784,
2897,
25,
6587,
55609,
198,
3784,
374,
20052,
6022,
25,
1845,
55609,
198,
25729,
279,
5507,
1193,
27441,
264,
3254,
1988,
627,
2590,
5649,
55609,
198,
33,
2315,
25,
1665,
198,
7843,
369,
420,
4611,
67,
8322,
1665,
627,
277,
88951,
9962,
43255,
284,
3082,
55609,
198,
15824,
284,
364,
2000,
21301,
6,
55609
] | https://langchain.readthedocs.io/en/latest/tools/langchain.tools.python.tool.PythonAstREPLTool.html |
04ba7d7e64f2-0 | langchain.tools.zapier.tool.ZapierNLAListActions¶
class langchain.tools.zapier.tool.ZapierNLAListActions(*, name: str = 'ZapierNLA_list_actions', description: str = 'A wrapper around Zapier NLA actions. The input to this tool is a natural language instruction, for example "get the latest email from my bank" or "send a slack message to the #general channel". Each tool will have params associated with it that are specified as a list. You MUST take into account the params when creating the instruction. For example, if the params are [\'Message_Text\', \'Channel\'], your instruction should be something like \'send a slack message to the #general channel with the text hello world\'. Another example: if the params are [\'Calendar\', \'Search_Term\'], your instruction should be something like \'find the meeting in my personal calendar at 3pm\'. Do not make up params, they will be explicitly specified in the tool description. If you do not have enough information to fill in the params, just say \'not enough information provided in the instruction, missing <param>\'. If you get a none or null response, STOP EXECUTION, do not try to another tool!This tool specifically used for: {zapier_description}, and has params: {params}This tool returns a list of the user\'s exposed actions.', args_schema: Optional[Type[BaseModel]] = None, return_direct: bool = False, verbose: bool = False, callbacks: Optional[Union[List[BaseCallbackHandler], BaseCallbackManager]] = None, callback_manager: Optional[BaseCallbackManager] = None, handle_tool_error: Optional[Union[bool, str, Callable[[ToolException], str]]] = False, api_wrapper: ZapierNLAWrapper = None)[source]¶
Bases: BaseTool | [
5317,
8995,
24029,
4025,
391,
1291,
21966,
13784,
391,
1291,
45,
18326,
861,
13245,
55609,
198,
1058,
8859,
8995,
24029,
4025,
391,
1291,
21966,
13784,
391,
1291,
45,
18326,
861,
13245,
4163,
11,
836,
25,
610,
284,
364,
57,
391,
1291,
45,
18326,
2062,
26440,
518,
4096,
25,
610,
284,
364,
32,
13564,
2212,
70331,
1291,
452,
18326,
6299,
13,
578,
1988,
311,
420,
5507,
374,
264,
5933,
4221,
7754,
11,
369,
3187,
330,
456,
279,
5652,
2613,
505,
856,
6201,
1,
477,
330,
6820,
264,
46719,
1984,
311,
279,
674,
25615,
5613,
3343,
9062,
5507,
690,
617,
3712,
5938,
449,
433,
430,
527,
5300,
439,
264,
1160,
13,
1472,
28832,
1935,
1139,
2759,
279,
3712,
994,
6968,
279,
7754,
13,
1789,
3187,
11,
422,
279,
3712,
527,
510,
10379,
2097,
21192,
55387,
28251,
9826,
59,
4181,
701,
7754,
1288,
387,
2555,
1093,
28251,
6820,
264,
46719,
1984,
311,
279,
674,
25615,
5613,
449,
279,
1495,
24748,
1917,
59,
4527,
13596,
3187,
25,
422,
279,
3712,
527,
510,
10379,
20475,
55387,
28251,
6014,
1159,
4289,
59,
4181,
701,
7754,
1288,
387,
2555,
1093,
28251,
3990,
279,
6574,
304,
856,
4443,
13470,
520,
220,
18,
5298,
59,
4527,
3234,
539,
1304,
709,
3712,
11,
814,
690,
387,
21650,
5300,
304,
279,
5507,
4096,
13,
1442,
499,
656,
539,
617,
3403,
2038,
311,
5266,
304,
279,
3712,
11,
1120,
2019,
28251,
1962,
3403,
2038,
3984,
304,
279,
7754,
11,
7554,
366,
913,
8616,
4527,
1442,
499,
636,
264,
7000,
477,
854,
2077,
11,
46637,
63347,
29717,
11,
656,
539,
1456,
311,
2500,
5507,
0,
2028,
5507,
11951,
1511,
369,
25,
314,
93471,
1291,
11703,
2186,
323,
706,
3712,
25,
314,
3603,
92,
2028,
5507,
4780,
264,
1160,
315,
279,
1217,
10379,
82,
15246,
6299,
16045,
2897,
26443,
25,
12536,
58,
941,
58,
4066,
1747,
5163,
284,
2290,
11,
471,
33971,
25,
1845,
284,
3641,
11,
14008,
25,
1845,
284,
3641,
11,
27777,
25,
12536,
58,
33758,
53094,
58,
4066,
7646,
3126,
1145,
5464,
7646,
2087,
5163,
284,
2290,
11,
4927,
12418,
25,
12536,
58,
4066,
7646,
2087,
60,
284,
2290,
11,
3790,
23627,
4188,
25,
12536,
58,
33758,
58,
2707,
11,
610,
11,
54223,
15873,
7896,
1378,
1145,
610,
5163,
60,
284,
3641,
11,
6464,
24474,
25,
70331,
1291,
45,
18326,
11803,
284,
2290,
6758,
2484,
60,
55609,
198,
33,
2315,
25,
5464,
7896
] | https://langchain.readthedocs.io/en/latest/tools/langchain.tools.zapier.tool.ZapierNLAListActions.html |
04ba7d7e64f2-1 | Bases: BaseTool
Returns a list of all exposed (enabled) actions associated withcurrent user (associated with the set api_key). Change your exposed
actions here: https://nla.zapier.com/demo/start/
The return list can be empty if no actions exposed. Else will contain
a list of action objects:
[{“id”: str,
“description”: str,
“params”: Dict[str, str]
}]
params will always contain an instructions key, the only required
param. All others optional and if provided will override any AI guesses
(see “understanding the AI guessing flow” here:
https://nla.zapier.com/docs/using-the-api#ai-guessing)
Parameters
None –
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 api_wrapper: langchain.utilities.zapier.ZapierNLAWrapper [Optional]¶
param args_schema: Optional[Type[BaseModel]] = None¶
Pydantic model class to validate and parse the tool’s input arguments.
param callback_manager: Optional[BaseCallbackManager] = None¶
Deprecated. Please use callbacks instead.
param callbacks: Callbacks = None¶
Callbacks to be called during tool execution. | [
33,
2315,
25,
5464,
7896,
198,
16851,
264,
1160,
315,
682,
15246,
320,
16247,
8,
6299,
5938,
449,
3311,
1217,
320,
50187,
449,
279,
743,
6464,
3173,
570,
10604,
701,
15246,
198,
4109,
1618,
25,
3788,
1129,
77,
4355,
4025,
391,
1291,
916,
56260,
71076,
6018,
791,
471,
1160,
649,
387,
4384,
422,
912,
6299,
15246,
13,
19334,
690,
6782,
198,
64,
1160,
315,
1957,
6302,
512,
53208,
2118,
307,
57633,
610,
345,
2118,
4789,
57633,
610,
345,
2118,
3603,
57633,
30226,
17752,
11,
610,
933,
58420,
3603,
690,
2744,
6782,
459,
11470,
1401,
11,
279,
1193,
2631,
198,
913,
13,
2052,
3885,
10309,
323,
422,
3984,
690,
2882,
904,
15592,
61637,
198,
7,
4151,
1054,
8154,
10276,
279,
15592,
47576,
6530,
863,
1618,
512,
2485,
1129,
77,
4355,
4025,
391,
1291,
916,
27057,
14,
985,
10826,
24851,
2,
2192,
2427,
34401,
287,
340,
9905,
198,
4155,
1389,
720,
4110,
264,
502,
1646,
555,
23115,
323,
69772,
1988,
828,
505,
16570,
6105,
627,
36120,
54129,
422,
279,
1988,
828,
4250,
387,
16051,
311,
1376,
264,
2764,
1646,
627,
913,
6464,
24474,
25,
8859,
8995,
63795,
4025,
391,
1291,
13784,
391,
1291,
45,
18326,
11803,
510,
15669,
60,
55609,
198,
913,
2897,
26443,
25,
12536,
58,
941,
58,
4066,
1747,
5163,
284,
2290,
55609,
198,
14149,
67,
8322,
1646,
538,
311,
9788,
323,
4820,
279,
5507,
753,
1988,
6105,
627,
913,
4927,
12418,
25,
12536,
58,
4066,
7646,
2087,
60,
284,
2290,
55609,
198,
52444,
13,
5321,
1005,
27777,
4619,
627,
913,
27777,
25,
23499,
82,
284,
2290,
55609,
198,
45561,
311,
387,
2663,
2391,
5507,
11572,
13
] | https://langchain.readthedocs.io/en/latest/tools/langchain.tools.zapier.tool.ZapierNLAListActions.html |
04ba7d7e64f2-2 | param callbacks: Callbacks = None¶
Callbacks to be called during tool execution.
param description: str = 'A wrapper around Zapier NLA actions. The input to this tool is a natural language instruction, for example "get the latest email from my bank" or "send a slack message to the #general channel". Each tool will have params associated with it that are specified as a list. You MUST take into account the params when creating the instruction. For example, if the params are [\'Message_Text\', \'Channel\'], your instruction should be something like \'send a slack message to the #general channel with the text hello world\'. Another example: if the params are [\'Calendar\', \'Search_Term\'], your instruction should be something like \'find the meeting in my personal calendar at 3pm\'. Do not make up params, they will be explicitly specified in the tool description. If you do not have enough information to fill in the params, just say \'not enough information provided in the instruction, missing <param>\'. If you get a none or null response, STOP EXECUTION, do not try to another tool!This tool specifically used for: {zapier_description}, and has params: {params}This tool returns a list of the user\'s exposed actions.'¶
Used to tell the model how/when/why to use the tool.
You can provide few-shot examples as a part of the description.
param handle_tool_error: Optional[Union[bool, str, Callable[[ToolException], str]]] = False¶
Handle the content of the ToolException thrown.
param name: str = 'ZapierNLA_list_actions'¶
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 | [
913,
27777,
25,
23499,
82,
284,
2290,
55609,
198,
45561,
311,
387,
2663,
2391,
5507,
11572,
627,
913,
4096,
25,
610,
284,
364,
32,
13564,
2212,
70331,
1291,
452,
18326,
6299,
13,
578,
1988,
311,
420,
5507,
374,
264,
5933,
4221,
7754,
11,
369,
3187,
330,
456,
279,
5652,
2613,
505,
856,
6201,
1,
477,
330,
6820,
264,
46719,
1984,
311,
279,
674,
25615,
5613,
3343,
9062,
5507,
690,
617,
3712,
5938,
449,
433,
430,
527,
5300,
439,
264,
1160,
13,
1472,
28832,
1935,
1139,
2759,
279,
3712,
994,
6968,
279,
7754,
13,
1789,
3187,
11,
422,
279,
3712,
527,
510,
10379,
2097,
21192,
55387,
28251,
9826,
59,
4181,
701,
7754,
1288,
387,
2555,
1093,
28251,
6820,
264,
46719,
1984,
311,
279,
674,
25615,
5613,
449,
279,
1495,
24748,
1917,
59,
4527,
13596,
3187,
25,
422,
279,
3712,
527,
510,
10379,
20475,
55387,
28251,
6014,
1159,
4289,
59,
4181,
701,
7754,
1288,
387,
2555,
1093,
28251,
3990,
279,
6574,
304,
856,
4443,
13470,
520,
220,
18,
5298,
59,
4527,
3234,
539,
1304,
709,
3712,
11,
814,
690,
387,
21650,
5300,
304,
279,
5507,
4096,
13,
1442,
499,
656,
539,
617,
3403,
2038,
311,
5266,
304,
279,
3712,
11,
1120,
2019,
28251,
1962,
3403,
2038,
3984,
304,
279,
7754,
11,
7554,
366,
913,
8616,
4527,
1442,
499,
636,
264,
7000,
477,
854,
2077,
11,
46637,
63347,
29717,
11,
656,
539,
1456,
311,
2500,
5507,
0,
2028,
5507,
11951,
1511,
369,
25,
314,
93471,
1291,
11703,
2186,
323,
706,
3712,
25,
314,
3603,
92,
2028,
5507,
4780,
264,
1160,
315,
279,
1217,
10379,
82,
15246,
6299,
3238,
55609,
198,
23580,
311,
3371,
279,
1646,
1268,
14,
9493,
14,
35734,
311,
1005,
279,
5507,
627,
2675,
649,
3493,
2478,
64630,
10507,
439,
264,
961,
315,
279,
4096,
627,
913,
3790,
23627,
4188,
25,
12536,
58,
33758,
58,
2707,
11,
610,
11,
54223,
15873,
7896,
1378,
1145,
610,
5163,
60,
284,
3641,
55609,
198,
7144,
279,
2262,
315,
279,
13782,
1378,
15338,
627,
913,
836,
25,
610,
284,
364,
57,
391,
1291,
45,
18326,
2062,
26440,
6,
55609,
198,
791,
5016,
836,
315,
279,
5507,
430,
9539,
92606,
1202,
7580,
627,
913,
471,
33971,
25,
1845,
284,
3641,
55609,
198,
25729,
311,
471,
279,
5507,
753,
2612,
6089,
13,
20638,
420,
311,
3082,
3445
] | https://langchain.readthedocs.io/en/latest/tools/langchain.tools.zapier.tool.ZapierNLAListActions.html |
04ba7d7e64f2-3 | 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 verbose: bool = False¶
Whether to log the tool’s progress.
__call__(tool_input: str, callbacks: Optional[Union[List[BaseCallbackHandler], BaseCallbackManager]] = None) → str¶
Make tool callable.
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, **kwargs: Any) → Any¶
Run the tool asynchronously.
validator raise_deprecation » all fields¶
Raise deprecation warning if callback_manager is used.
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, **kwargs: Any) → Any¶
Run the tool.
property args: dict¶
property is_single_input: bool¶
Whether the tool only accepts a single input.
model Config¶
Bases: object
Configuration for this pydantic object.
arbitrary_types_allowed = True¶
extra = 'forbid'¶ | [
25729,
311,
471,
279,
5507,
753,
2612,
6089,
13,
20638,
420,
311,
3082,
3445,
198,
9210,
1306,
279,
5507,
374,
2663,
11,
279,
21372,
26321,
690,
3009,
63687,
627,
913,
14008,
25,
1845,
284,
3641,
55609,
198,
25729,
311,
1515,
279,
5507,
753,
5208,
627,
565,
6797,
3889,
14506,
6022,
25,
610,
11,
27777,
25,
12536,
58,
33758,
53094,
58,
4066,
7646,
3126,
1145,
5464,
7646,
2087,
5163,
284,
2290,
8,
11651,
610,
55609,
198,
8238,
5507,
42022,
627,
7847,
802,
359,
50050,
6022,
25,
9323,
17752,
11,
30226,
1145,
14008,
25,
12536,
58,
2707,
60,
284,
2290,
11,
1212,
6855,
25,
12536,
17752,
60,
284,
364,
13553,
518,
1933,
25,
12536,
17752,
60,
284,
364,
13553,
518,
27777,
25,
12536,
58,
33758,
53094,
58,
4066,
7646,
3126,
1145,
5464,
7646,
2087,
5163,
284,
2290,
11,
3146,
9872,
25,
5884,
8,
11651,
5884,
55609,
198,
6869,
279,
5507,
68881,
627,
16503,
4933,
2310,
70693,
4194,
8345,
4194,
682,
5151,
55609,
198,
94201,
409,
70693,
10163,
422,
4927,
12418,
374,
1511,
627,
6236,
50050,
6022,
25,
9323,
17752,
11,
30226,
1145,
14008,
25,
12536,
58,
2707,
60,
284,
2290,
11,
1212,
6855,
25,
12536,
17752,
60,
284,
364,
13553,
518,
1933,
25,
12536,
17752,
60,
284,
364,
13553,
518,
27777,
25,
12536,
58,
33758,
53094,
58,
4066,
7646,
3126,
1145,
5464,
7646,
2087,
5163,
284,
2290,
11,
3146,
9872,
25,
5884,
8,
11651,
5884,
55609,
198,
6869,
279,
5507,
627,
3784,
2897,
25,
6587,
55609,
198,
3784,
374,
20052,
6022,
25,
1845,
55609,
198,
25729,
279,
5507,
1193,
27441,
264,
3254,
1988,
627,
2590,
5649,
55609,
198,
33,
2315,
25,
1665,
198,
7843,
369,
420,
4611,
67,
8322,
1665,
627,
277,
88951,
9962,
43255,
284,
3082,
55609,
198,
15824,
284,
364,
2000,
21301,
6,
55609
] | https://langchain.readthedocs.io/en/latest/tools/langchain.tools.zapier.tool.ZapierNLAListActions.html |
a11dacb85647-0 | langchain.tools.arxiv.tool.ArxivQueryRun¶
class langchain.tools.arxiv.tool.ArxivQueryRun(*, name: str = 'arxiv', description: str = 'A wrapper around Arxiv.org Useful for when you need to answer questions about Physics, Mathematics, Computer Science, Quantitative Biology, Quantitative Finance, Statistics, Electrical Engineering, and Economics from scientific articles on arxiv.org. Input should be a search query.', args_schema: Optional[Type[BaseModel]] = None, return_direct: bool = False, verbose: bool = False, callbacks: Optional[Union[List[BaseCallbackHandler], BaseCallbackManager]] = None, callback_manager: Optional[BaseCallbackManager] = None, handle_tool_error: Optional[Union[bool, str, Callable[[ToolException], str]]] = False, api_wrapper: ArxivAPIWrapper = None)[source]¶
Bases: BaseTool
Tool that adds the capability to search using the Arxiv 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 valid model.
param api_wrapper: langchain.utilities.arxiv.ArxivAPIWrapper [Optional]¶
param args_schema: Optional[Type[BaseModel]] = None¶
Pydantic model class to validate and parse the tool’s input arguments.
param callback_manager: Optional[BaseCallbackManager] = None¶
Deprecated. Please use callbacks instead.
param callbacks: Callbacks = None¶
Callbacks to be called during tool execution.
param description: str = 'A wrapper around Arxiv.org Useful for when you need to answer questions about Physics, Mathematics, Computer Science, Quantitative Biology, Quantitative Finance, Statistics, Electrical Engineering, and Economics from scientific articles on arxiv.org. Input should be a search query.'¶ | [
5317,
8995,
24029,
17126,
89833,
21966,
885,
12940,
344,
2929,
6869,
55609,
198,
1058,
8859,
8995,
24029,
17126,
89833,
21966,
885,
12940,
344,
2929,
6869,
4163,
11,
836,
25,
610,
284,
364,
277,
89833,
518,
4096,
25,
610,
284,
364,
32,
13564,
2212,
1676,
89833,
2726,
51612,
369,
994,
499,
1205,
311,
4320,
4860,
922,
28415,
11,
50895,
11,
17863,
10170,
11,
32541,
22018,
40023,
11,
32541,
22018,
23261,
11,
25647,
11,
45034,
17005,
11,
323,
35300,
505,
12624,
9908,
389,
802,
89833,
2726,
13,
5688,
1288,
387,
264,
2778,
3319,
16045,
2897,
26443,
25,
12536,
58,
941,
58,
4066,
1747,
5163,
284,
2290,
11,
471,
33971,
25,
1845,
284,
3641,
11,
14008,
25,
1845,
284,
3641,
11,
27777,
25,
12536,
58,
33758,
53094,
58,
4066,
7646,
3126,
1145,
5464,
7646,
2087,
5163,
284,
2290,
11,
4927,
12418,
25,
12536,
58,
4066,
7646,
2087,
60,
284,
2290,
11,
3790,
23627,
4188,
25,
12536,
58,
33758,
58,
2707,
11,
610,
11,
54223,
15873,
7896,
1378,
1145,
610,
5163,
60,
284,
3641,
11,
6464,
24474,
25,
1676,
89833,
7227,
11803,
284,
2290,
6758,
2484,
60,
55609,
198,
33,
2315,
25,
5464,
7896,
198,
7896,
430,
11621,
279,
23099,
311,
2778,
1701,
279,
1676,
89833,
5446,
627,
4110,
264,
502,
1646,
555,
23115,
323,
69772,
1988,
828,
505,
16570,
6105,
627,
36120,
54129,
422,
279,
1988,
828,
4250,
387,
16051,
311,
1376,
264,
2764,
1646,
627,
913,
6464,
24474,
25,
8859,
8995,
63795,
17126,
89833,
885,
12940,
344,
7227,
11803,
510,
15669,
60,
55609,
198,
913,
2897,
26443,
25,
12536,
58,
941,
58,
4066,
1747,
5163,
284,
2290,
55609,
198,
14149,
67,
8322,
1646,
538,
311,
9788,
323,
4820,
279,
5507,
753,
1988,
6105,
627,
913,
4927,
12418,
25,
12536,
58,
4066,
7646,
2087,
60,
284,
2290,
55609,
198,
52444,
13,
5321,
1005,
27777,
4619,
627,
913,
27777,
25,
23499,
82,
284,
2290,
55609,
198,
45561,
311,
387,
2663,
2391,
5507,
11572,
627,
913,
4096,
25,
610,
284,
364,
32,
13564,
2212,
1676,
89833,
2726,
51612,
369,
994,
499,
1205,
311,
4320,
4860,
922,
28415,
11,
50895,
11,
17863,
10170,
11,
32541,
22018,
40023,
11,
32541,
22018,
23261,
11,
25647,
11,
45034,
17005,
11,
323,
35300,
505,
12624,
9908,
389,
802,
89833,
2726,
13,
5688,
1288,
387,
264,
2778,
3319,
3238,
55609
] | https://langchain.readthedocs.io/en/latest/tools/langchain.tools.arxiv.tool.ArxivQueryRun.html |
a11dacb85647-1 | Used to tell the model how/when/why to use the tool.
You can provide few-shot examples as a part of the description.
param handle_tool_error: Optional[Union[bool, str, Callable[[ToolException], str]]] = False¶
Handle the content of the ToolException thrown.
param name: str = 'arxiv'¶
The unique name of the tool that clearly communicates its purpose.
param return_direct: bool = False¶
Whether to return the tool’s output directly. Setting this to True means
that after the tool is called, the AgentExecutor will stop looping.
param verbose: bool = False¶
Whether to log the tool’s progress.
__call__(tool_input: str, callbacks: Optional[Union[List[BaseCallbackHandler], BaseCallbackManager]] = None) → str¶
Make tool callable.
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, **kwargs: Any) → Any¶
Run the tool asynchronously.
validator raise_deprecation » all fields¶
Raise deprecation warning if callback_manager is used.
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, **kwargs: Any) → Any¶
Run the tool.
property args: dict¶
property is_single_input: bool¶
Whether the tool only accepts a single input.
model Config¶
Bases: object
Configuration for this pydantic object.
arbitrary_types_allowed = True¶ | [
23580,
311,
3371,
279,
1646,
1268,
14,
9493,
14,
35734,
311,
1005,
279,
5507,
627,
2675,
649,
3493,
2478,
64630,
10507,
439,
264,
961,
315,
279,
4096,
627,
913,
3790,
23627,
4188,
25,
12536,
58,
33758,
58,
2707,
11,
610,
11,
54223,
15873,
7896,
1378,
1145,
610,
5163,
60,
284,
3641,
55609,
198,
7144,
279,
2262,
315,
279,
13782,
1378,
15338,
627,
913,
836,
25,
610,
284,
364,
277,
89833,
6,
55609,
198,
791,
5016,
836,
315,
279,
5507,
430,
9539,
92606,
1202,
7580,
627,
913,
471,
33971,
25,
1845,
284,
3641,
55609,
198,
25729,
311,
471,
279,
5507,
753,
2612,
6089,
13,
20638,
420,
311,
3082,
3445,
198,
9210,
1306,
279,
5507,
374,
2663,
11,
279,
21372,
26321,
690,
3009,
63687,
627,
913,
14008,
25,
1845,
284,
3641,
55609,
198,
25729,
311,
1515,
279,
5507,
753,
5208,
627,
565,
6797,
3889,
14506,
6022,
25,
610,
11,
27777,
25,
12536,
58,
33758,
53094,
58,
4066,
7646,
3126,
1145,
5464,
7646,
2087,
5163,
284,
2290,
8,
11651,
610,
55609,
198,
8238,
5507,
42022,
627,
7847,
802,
359,
50050,
6022,
25,
9323,
17752,
11,
30226,
1145,
14008,
25,
12536,
58,
2707,
60,
284,
2290,
11,
1212,
6855,
25,
12536,
17752,
60,
284,
364,
13553,
518,
1933,
25,
12536,
17752,
60,
284,
364,
13553,
518,
27777,
25,
12536,
58,
33758,
53094,
58,
4066,
7646,
3126,
1145,
5464,
7646,
2087,
5163,
284,
2290,
11,
3146,
9872,
25,
5884,
8,
11651,
5884,
55609,
198,
6869,
279,
5507,
68881,
627,
16503,
4933,
2310,
70693,
4194,
8345,
4194,
682,
5151,
55609,
198,
94201,
409,
70693,
10163,
422,
4927,
12418,
374,
1511,
627,
6236,
50050,
6022,
25,
9323,
17752,
11,
30226,
1145,
14008,
25,
12536,
58,
2707,
60,
284,
2290,
11,
1212,
6855,
25,
12536,
17752,
60,
284,
364,
13553,
518,
1933,
25,
12536,
17752,
60,
284,
364,
13553,
518,
27777,
25,
12536,
58,
33758,
53094,
58,
4066,
7646,
3126,
1145,
5464,
7646,
2087,
5163,
284,
2290,
11,
3146,
9872,
25,
5884,
8,
11651,
5884,
55609,
198,
6869,
279,
5507,
627,
3784,
2897,
25,
6587,
55609,
198,
3784,
374,
20052,
6022,
25,
1845,
55609,
198,
25729,
279,
5507,
1193,
27441,
264,
3254,
1988,
627,
2590,
5649,
55609,
198,
33,
2315,
25,
1665,
198,
7843,
369,
420,
4611,
67,
8322,
1665,
627,
277,
88951,
9962,
43255,
284,
3082,
55609
] | https://langchain.readthedocs.io/en/latest/tools/langchain.tools.arxiv.tool.ArxivQueryRun.html |
a11dacb85647-2 | Configuration for this pydantic object.
arbitrary_types_allowed = True¶
extra = 'forbid'¶ | [
7843,
369,
420,
4611,
67,
8322,
1665,
627,
277,
88951,
9962,
43255,
284,
3082,
55609,
198,
15824,
284,
364,
2000,
21301,
6,
55609
] | https://langchain.readthedocs.io/en/latest/tools/langchain.tools.arxiv.tool.ArxivQueryRun.html |
ac6a94a9c1ee-0 | langchain.tools.office365.send_event.O365SendEvent¶
class langchain.tools.office365.send_event.O365SendEvent(*, name: str = 'send_event', description: str = 'Use this tool to create and send an event with the provided event fields.', args_schema: ~typing.Type[~langchain.tools.office365.send_event.SendEventSchema] = <class 'langchain.tools.office365.send_event.SendEventSchema'>, return_direct: bool = False, verbose: bool = False, callbacks: ~typing.Optional[~typing.Union[~typing.List[~langchain.callbacks.base.BaseCallbackHandler], ~langchain.callbacks.base.BaseCallbackManager]] = None, callback_manager: ~typing.Optional[~langchain.callbacks.base.BaseCallbackManager] = None, handle_tool_error: ~typing.Optional[~typing.Union[bool, str, ~typing.Callable[[~langchain.tools.base.ToolException], str]]] = False, account: Account = None)[source]¶
Bases: O365BaseTool
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 account: Account [Optional]¶
param args_schema: Type[langchain.tools.office365.send_event.SendEventSchema] = <class 'langchain.tools.office365.send_event.SendEventSchema'>¶
Pydantic model class to validate and parse the tool’s input arguments.
param callback_manager: Optional[BaseCallbackManager] = None¶
Deprecated. Please use callbacks instead.
param callbacks: Callbacks = None¶
Callbacks to be called during tool execution.
param description: str = 'Use this tool to create and send an event with the provided event fields.'¶
Used to tell the model how/when/why to use the tool.
You can provide few-shot examples as a part of the description. | [
5317,
8995,
24029,
100193,
12676,
5331,
6891,
8548,
12676,
11764,
1585,
55609,
198,
1058,
8859,
8995,
24029,
100193,
12676,
5331,
6891,
8548,
12676,
11764,
1585,
4163,
11,
836,
25,
610,
284,
364,
6820,
6891,
518,
4096,
25,
610,
284,
364,
10464,
420,
5507,
311,
1893,
323,
3708,
459,
1567,
449,
279,
3984,
1567,
5151,
16045,
2897,
26443,
25,
4056,
90902,
10394,
58,
93,
5317,
8995,
24029,
100193,
12676,
5331,
6891,
20787,
1585,
8802,
60,
284,
366,
1058,
364,
5317,
8995,
24029,
100193,
12676,
5331,
6891,
20787,
1585,
8802,
6404,
11,
471,
33971,
25,
1845,
284,
3641,
11,
14008,
25,
1845,
284,
3641,
11,
27777,
25,
4056,
90902,
37464,
58,
93,
90902,
10840,
290,
58,
93,
90902,
5937,
58,
93,
5317,
8995,
72134,
9105,
13316,
7646,
3126,
1145,
4056,
5317,
8995,
72134,
9105,
13316,
7646,
2087,
5163,
284,
2290,
11,
4927,
12418,
25,
4056,
90902,
37464,
58,
93,
5317,
8995,
72134,
9105,
13316,
7646,
2087,
60,
284,
2290,
11,
3790,
23627,
4188,
25,
4056,
90902,
37464,
58,
93,
90902,
10840,
290,
58,
2707,
11,
610,
11,
4056,
90902,
28115,
481,
15873,
93,
5317,
8995,
24029,
9105,
25443,
1378,
1145,
610,
5163,
60,
284,
3641,
11,
2759,
25,
8785,
284,
2290,
6758,
2484,
60,
55609,
198,
33,
2315,
25,
507,
12676,
4066,
7896,
198,
4110,
264,
502,
1646,
555,
23115,
323,
69772,
1988,
828,
505,
16570,
6105,
627,
36120,
54129,
422,
279,
1988,
828,
4250,
387,
16051,
311,
1376,
264,
2764,
1646,
627,
913,
2759,
25,
8785,
510,
15669,
60,
55609,
198,
913,
2897,
26443,
25,
4078,
58,
5317,
8995,
24029,
100193,
12676,
5331,
6891,
20787,
1585,
8802,
60,
284,
366,
1058,
364,
5317,
8995,
24029,
100193,
12676,
5331,
6891,
20787,
1585,
8802,
6404,
55609,
198,
14149,
67,
8322,
1646,
538,
311,
9788,
323,
4820,
279,
5507,
753,
1988,
6105,
627,
913,
4927,
12418,
25,
12536,
58,
4066,
7646,
2087,
60,
284,
2290,
55609,
198,
52444,
13,
5321,
1005,
27777,
4619,
627,
913,
27777,
25,
23499,
82,
284,
2290,
55609,
198,
45561,
311,
387,
2663,
2391,
5507,
11572,
627,
913,
4096,
25,
610,
284,
364,
10464,
420,
5507,
311,
1893,
323,
3708,
459,
1567,
449,
279,
3984,
1567,
5151,
3238,
55609,
198,
23580,
311,
3371,
279,
1646,
1268,
14,
9493,
14,
35734,
311,
1005,
279,
5507,
627,
2675,
649,
3493,
2478,
64630,
10507,
439,
264,
961,
315,
279,
4096,
13
] | https://langchain.readthedocs.io/en/latest/tools/langchain.tools.office365.send_event.O365SendEvent.html |
ac6a94a9c1ee-1 | You can provide few-shot examples as a part of the description.
param handle_tool_error: Optional[Union[bool, str, Callable[[ToolException], str]]] = False¶
Handle the content of the ToolException thrown.
param name: str = 'send_event'¶
The unique name of the tool that clearly communicates its purpose.
param return_direct: bool = False¶
Whether to return the tool’s output directly. Setting this to True means
that after the tool is called, the AgentExecutor will stop looping.
param verbose: bool = False¶
Whether to log the tool’s progress.
__call__(tool_input: str, callbacks: Optional[Union[List[BaseCallbackHandler], BaseCallbackManager]] = None) → str¶
Make tool callable.
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, **kwargs: Any) → Any¶
Run the tool asynchronously.
validator raise_deprecation » all fields¶
Raise deprecation warning if callback_manager is used.
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, **kwargs: Any) → Any¶
Run the tool.
property args: dict¶
property is_single_input: bool¶
Whether the tool only accepts a single input.
model Config¶
Bases: object
Configuration for this pydantic object.
arbitrary_types_allowed = True¶
extra = 'forbid'¶ | [
2675,
649,
3493,
2478,
64630,
10507,
439,
264,
961,
315,
279,
4096,
627,
913,
3790,
23627,
4188,
25,
12536,
58,
33758,
58,
2707,
11,
610,
11,
54223,
15873,
7896,
1378,
1145,
610,
5163,
60,
284,
3641,
55609,
198,
7144,
279,
2262,
315,
279,
13782,
1378,
15338,
627,
913,
836,
25,
610,
284,
364,
6820,
6891,
6,
55609,
198,
791,
5016,
836,
315,
279,
5507,
430,
9539,
92606,
1202,
7580,
627,
913,
471,
33971,
25,
1845,
284,
3641,
55609,
198,
25729,
311,
471,
279,
5507,
753,
2612,
6089,
13,
20638,
420,
311,
3082,
3445,
198,
9210,
1306,
279,
5507,
374,
2663,
11,
279,
21372,
26321,
690,
3009,
63687,
627,
913,
14008,
25,
1845,
284,
3641,
55609,
198,
25729,
311,
1515,
279,
5507,
753,
5208,
627,
565,
6797,
3889,
14506,
6022,
25,
610,
11,
27777,
25,
12536,
58,
33758,
53094,
58,
4066,
7646,
3126,
1145,
5464,
7646,
2087,
5163,
284,
2290,
8,
11651,
610,
55609,
198,
8238,
5507,
42022,
627,
7847,
802,
359,
50050,
6022,
25,
9323,
17752,
11,
30226,
1145,
14008,
25,
12536,
58,
2707,
60,
284,
2290,
11,
1212,
6855,
25,
12536,
17752,
60,
284,
364,
13553,
518,
1933,
25,
12536,
17752,
60,
284,
364,
13553,
518,
27777,
25,
12536,
58,
33758,
53094,
58,
4066,
7646,
3126,
1145,
5464,
7646,
2087,
5163,
284,
2290,
11,
3146,
9872,
25,
5884,
8,
11651,
5884,
55609,
198,
6869,
279,
5507,
68881,
627,
16503,
4933,
2310,
70693,
4194,
8345,
4194,
682,
5151,
55609,
198,
94201,
409,
70693,
10163,
422,
4927,
12418,
374,
1511,
627,
6236,
50050,
6022,
25,
9323,
17752,
11,
30226,
1145,
14008,
25,
12536,
58,
2707,
60,
284,
2290,
11,
1212,
6855,
25,
12536,
17752,
60,
284,
364,
13553,
518,
1933,
25,
12536,
17752,
60,
284,
364,
13553,
518,
27777,
25,
12536,
58,
33758,
53094,
58,
4066,
7646,
3126,
1145,
5464,
7646,
2087,
5163,
284,
2290,
11,
3146,
9872,
25,
5884,
8,
11651,
5884,
55609,
198,
6869,
279,
5507,
627,
3784,
2897,
25,
6587,
55609,
198,
3784,
374,
20052,
6022,
25,
1845,
55609,
198,
25729,
279,
5507,
1193,
27441,
264,
3254,
1988,
627,
2590,
5649,
55609,
198,
33,
2315,
25,
1665,
198,
7843,
369,
420,
4611,
67,
8322,
1665,
627,
277,
88951,
9962,
43255,
284,
3082,
55609,
198,
15824,
284,
364,
2000,
21301,
6,
55609
] | https://langchain.readthedocs.io/en/latest/tools/langchain.tools.office365.send_event.O365SendEvent.html |
6b4f15fbcefd-0 | langchain.tools.google_search.tool.GoogleSearchRun¶
class langchain.tools.google_search.tool.GoogleSearchRun(*, name: str = 'google_search', description: str = 'A wrapper around Google Search. Useful for when you need to answer questions about current events. Input should be a search query.', args_schema: Optional[Type[BaseModel]] = None, return_direct: bool = False, verbose: bool = False, callbacks: Optional[Union[List[BaseCallbackHandler], BaseCallbackManager]] = None, callback_manager: Optional[BaseCallbackManager] = None, handle_tool_error: Optional[Union[bool, str, Callable[[ToolException], str]]] = False, api_wrapper: GoogleSearchAPIWrapper)[source]¶
Bases: BaseTool
Tool that adds the capability to query the Google search 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 valid model.
param api_wrapper: langchain.utilities.google_search.GoogleSearchAPIWrapper [Required]¶
param args_schema: Optional[Type[BaseModel]] = None¶
Pydantic model class to validate and parse the tool’s input arguments.
param callback_manager: Optional[BaseCallbackManager] = None¶
Deprecated. Please use callbacks instead.
param callbacks: Callbacks = None¶
Callbacks to be called during tool execution.
param description: str = 'A wrapper around Google Search. Useful for when you need to answer questions about current events. Input should be a search query.'¶
Used to tell the model how/when/why to use the tool.
You can provide few-shot examples as a part of the description.
param handle_tool_error: Optional[Union[bool, str, Callable[[ToolException], str]]] = False¶
Handle the content of the ToolException thrown. | [
5317,
8995,
24029,
5831,
10947,
21966,
61493,
6014,
6869,
55609,
198,
1058,
8859,
8995,
24029,
5831,
10947,
21966,
61493,
6014,
6869,
4163,
11,
836,
25,
610,
284,
364,
17943,
10947,
518,
4096,
25,
610,
284,
364,
32,
13564,
2212,
5195,
7694,
13,
51612,
369,
994,
499,
1205,
311,
4320,
4860,
922,
1510,
4455,
13,
5688,
1288,
387,
264,
2778,
3319,
16045,
2897,
26443,
25,
12536,
58,
941,
58,
4066,
1747,
5163,
284,
2290,
11,
471,
33971,
25,
1845,
284,
3641,
11,
14008,
25,
1845,
284,
3641,
11,
27777,
25,
12536,
58,
33758,
53094,
58,
4066,
7646,
3126,
1145,
5464,
7646,
2087,
5163,
284,
2290,
11,
4927,
12418,
25,
12536,
58,
4066,
7646,
2087,
60,
284,
2290,
11,
3790,
23627,
4188,
25,
12536,
58,
33758,
58,
2707,
11,
610,
11,
54223,
15873,
7896,
1378,
1145,
610,
5163,
60,
284,
3641,
11,
6464,
24474,
25,
5195,
6014,
7227,
11803,
6758,
2484,
60,
55609,
198,
33,
2315,
25,
5464,
7896,
198,
7896,
430,
11621,
279,
23099,
311,
3319,
279,
5195,
2778,
5446,
627,
4110,
264,
502,
1646,
555,
23115,
323,
69772,
1988,
828,
505,
16570,
6105,
627,
36120,
54129,
422,
279,
1988,
828,
4250,
387,
16051,
311,
1376,
264,
2764,
1646,
627,
913,
6464,
24474,
25,
8859,
8995,
63795,
5831,
10947,
61493,
6014,
7227,
11803,
510,
8327,
60,
55609,
198,
913,
2897,
26443,
25,
12536,
58,
941,
58,
4066,
1747,
5163,
284,
2290,
55609,
198,
14149,
67,
8322,
1646,
538,
311,
9788,
323,
4820,
279,
5507,
753,
1988,
6105,
627,
913,
4927,
12418,
25,
12536,
58,
4066,
7646,
2087,
60,
284,
2290,
55609,
198,
52444,
13,
5321,
1005,
27777,
4619,
627,
913,
27777,
25,
23499,
82,
284,
2290,
55609,
198,
45561,
311,
387,
2663,
2391,
5507,
11572,
627,
913,
4096,
25,
610,
284,
364,
32,
13564,
2212,
5195,
7694,
13,
51612,
369,
994,
499,
1205,
311,
4320,
4860,
922,
1510,
4455,
13,
5688,
1288,
387,
264,
2778,
3319,
3238,
55609,
198,
23580,
311,
3371,
279,
1646,
1268,
14,
9493,
14,
35734,
311,
1005,
279,
5507,
627,
2675,
649,
3493,
2478,
64630,
10507,
439,
264,
961,
315,
279,
4096,
627,
913,
3790,
23627,
4188,
25,
12536,
58,
33758,
58,
2707,
11,
610,
11,
54223,
15873,
7896,
1378,
1145,
610,
5163,
60,
284,
3641,
55609,
198,
7144,
279,
2262,
315,
279,
13782,
1378,
15338,
13
] | https://langchain.readthedocs.io/en/latest/tools/langchain.tools.google_search.tool.GoogleSearchRun.html |
6b4f15fbcefd-1 | Handle the content of the ToolException thrown.
param name: str = 'google_search'¶
The unique name of the tool that clearly communicates its purpose.
param return_direct: bool = False¶
Whether to return the tool’s output directly. Setting this to True means
that after the tool is called, the AgentExecutor will stop looping.
param verbose: bool = False¶
Whether to log the tool’s progress.
__call__(tool_input: str, callbacks: Optional[Union[List[BaseCallbackHandler], BaseCallbackManager]] = None) → str¶
Make tool callable.
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, **kwargs: Any) → Any¶
Run the tool asynchronously.
validator raise_deprecation » all fields¶
Raise deprecation warning if callback_manager is used.
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, **kwargs: Any) → Any¶
Run the tool.
property args: dict¶
property is_single_input: bool¶
Whether the tool only accepts a single input.
model Config¶
Bases: object
Configuration for this pydantic object.
arbitrary_types_allowed = True¶
extra = 'forbid'¶ | [
7144,
279,
2262,
315,
279,
13782,
1378,
15338,
627,
913,
836,
25,
610,
284,
364,
17943,
10947,
6,
55609,
198,
791,
5016,
836,
315,
279,
5507,
430,
9539,
92606,
1202,
7580,
627,
913,
471,
33971,
25,
1845,
284,
3641,
55609,
198,
25729,
311,
471,
279,
5507,
753,
2612,
6089,
13,
20638,
420,
311,
3082,
3445,
198,
9210,
1306,
279,
5507,
374,
2663,
11,
279,
21372,
26321,
690,
3009,
63687,
627,
913,
14008,
25,
1845,
284,
3641,
55609,
198,
25729,
311,
1515,
279,
5507,
753,
5208,
627,
565,
6797,
3889,
14506,
6022,
25,
610,
11,
27777,
25,
12536,
58,
33758,
53094,
58,
4066,
7646,
3126,
1145,
5464,
7646,
2087,
5163,
284,
2290,
8,
11651,
610,
55609,
198,
8238,
5507,
42022,
627,
7847,
802,
359,
50050,
6022,
25,
9323,
17752,
11,
30226,
1145,
14008,
25,
12536,
58,
2707,
60,
284,
2290,
11,
1212,
6855,
25,
12536,
17752,
60,
284,
364,
13553,
518,
1933,
25,
12536,
17752,
60,
284,
364,
13553,
518,
27777,
25,
12536,
58,
33758,
53094,
58,
4066,
7646,
3126,
1145,
5464,
7646,
2087,
5163,
284,
2290,
11,
3146,
9872,
25,
5884,
8,
11651,
5884,
55609,
198,
6869,
279,
5507,
68881,
627,
16503,
4933,
2310,
70693,
4194,
8345,
4194,
682,
5151,
55609,
198,
94201,
409,
70693,
10163,
422,
4927,
12418,
374,
1511,
627,
6236,
50050,
6022,
25,
9323,
17752,
11,
30226,
1145,
14008,
25,
12536,
58,
2707,
60,
284,
2290,
11,
1212,
6855,
25,
12536,
17752,
60,
284,
364,
13553,
518,
1933,
25,
12536,
17752,
60,
284,
364,
13553,
518,
27777,
25,
12536,
58,
33758,
53094,
58,
4066,
7646,
3126,
1145,
5464,
7646,
2087,
5163,
284,
2290,
11,
3146,
9872,
25,
5884,
8,
11651,
5884,
55609,
198,
6869,
279,
5507,
627,
3784,
2897,
25,
6587,
55609,
198,
3784,
374,
20052,
6022,
25,
1845,
55609,
198,
25729,
279,
5507,
1193,
27441,
264,
3254,
1988,
627,
2590,
5649,
55609,
198,
33,
2315,
25,
1665,
198,
7843,
369,
420,
4611,
67,
8322,
1665,
627,
277,
88951,
9962,
43255,
284,
3082,
55609,
198,
15824,
284,
364,
2000,
21301,
6,
55609
] | https://langchain.readthedocs.io/en/latest/tools/langchain.tools.google_search.tool.GoogleSearchRun.html |
4fbd83675456-0 | langchain.tools.office365.base.O365BaseTool¶
class langchain.tools.office365.base.O365BaseTool(*, name: str, description: str, args_schema: Optional[Type[BaseModel]] = None, return_direct: bool = False, verbose: bool = False, callbacks: Optional[Union[List[BaseCallbackHandler], BaseCallbackManager]] = None, callback_manager: Optional[BaseCallbackManager] = None, handle_tool_error: Optional[Union[bool, str, Callable[[ToolException], str]]] = False, account: Account = None)[source]¶
Bases: BaseTool
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 account: Account [Optional]¶
param args_schema: Optional[Type[BaseModel]] = None¶
Pydantic model class to validate and parse the tool’s input arguments.
param callback_manager: Optional[BaseCallbackManager] = None¶
Deprecated. Please use callbacks instead.
param callbacks: Callbacks = None¶
Callbacks to be called during tool execution.
param description: str [Required]¶
Used to tell the model how/when/why to use the tool.
You can provide few-shot examples as a part of the description.
param handle_tool_error: Optional[Union[bool, str, Callable[[ToolException], str]]] = False¶
Handle the content of the ToolException thrown.
param name: str [Required]¶
The unique name of the tool that clearly communicates its purpose.
param return_direct: bool = False¶
Whether to return the tool’s output directly. Setting this to True means
that after the tool is called, the AgentExecutor will stop looping.
param verbose: bool = False¶
Whether to log the tool’s progress. | [
5317,
8995,
24029,
100193,
12676,
9105,
8548,
12676,
4066,
7896,
55609,
198,
1058,
8859,
8995,
24029,
100193,
12676,
9105,
8548,
12676,
4066,
7896,
4163,
11,
836,
25,
610,
11,
4096,
25,
610,
11,
2897,
26443,
25,
12536,
58,
941,
58,
4066,
1747,
5163,
284,
2290,
11,
471,
33971,
25,
1845,
284,
3641,
11,
14008,
25,
1845,
284,
3641,
11,
27777,
25,
12536,
58,
33758,
53094,
58,
4066,
7646,
3126,
1145,
5464,
7646,
2087,
5163,
284,
2290,
11,
4927,
12418,
25,
12536,
58,
4066,
7646,
2087,
60,
284,
2290,
11,
3790,
23627,
4188,
25,
12536,
58,
33758,
58,
2707,
11,
610,
11,
54223,
15873,
7896,
1378,
1145,
610,
5163,
60,
284,
3641,
11,
2759,
25,
8785,
284,
2290,
6758,
2484,
60,
55609,
198,
33,
2315,
25,
5464,
7896,
198,
4110,
264,
502,
1646,
555,
23115,
323,
69772,
1988,
828,
505,
16570,
6105,
627,
36120,
54129,
422,
279,
1988,
828,
4250,
387,
16051,
311,
1376,
264,
2764,
1646,
627,
913,
2759,
25,
8785,
510,
15669,
60,
55609,
198,
913,
2897,
26443,
25,
12536,
58,
941,
58,
4066,
1747,
5163,
284,
2290,
55609,
198,
14149,
67,
8322,
1646,
538,
311,
9788,
323,
4820,
279,
5507,
753,
1988,
6105,
627,
913,
4927,
12418,
25,
12536,
58,
4066,
7646,
2087,
60,
284,
2290,
55609,
198,
52444,
13,
5321,
1005,
27777,
4619,
627,
913,
27777,
25,
23499,
82,
284,
2290,
55609,
198,
45561,
311,
387,
2663,
2391,
5507,
11572,
627,
913,
4096,
25,
610,
510,
8327,
60,
55609,
198,
23580,
311,
3371,
279,
1646,
1268,
14,
9493,
14,
35734,
311,
1005,
279,
5507,
627,
2675,
649,
3493,
2478,
64630,
10507,
439,
264,
961,
315,
279,
4096,
627,
913,
3790,
23627,
4188,
25,
12536,
58,
33758,
58,
2707,
11,
610,
11,
54223,
15873,
7896,
1378,
1145,
610,
5163,
60,
284,
3641,
55609,
198,
7144,
279,
2262,
315,
279,
13782,
1378,
15338,
627,
913,
836,
25,
610,
510,
8327,
60,
55609,
198,
791,
5016,
836,
315,
279,
5507,
430,
9539,
92606,
1202,
7580,
627,
913,
471,
33971,
25,
1845,
284,
3641,
55609,
198,
25729,
311,
471,
279,
5507,
753,
2612,
6089,
13,
20638,
420,
311,
3082,
3445,
198,
9210,
1306,
279,
5507,
374,
2663,
11,
279,
21372,
26321,
690,
3009,
63687,
627,
913,
14008,
25,
1845,
284,
3641,
55609,
198,
25729,
311,
1515,
279,
5507,
753,
5208,
13
] | https://langchain.readthedocs.io/en/latest/tools/langchain.tools.office365.base.O365BaseTool.html |
4fbd83675456-1 | param verbose: bool = False¶
Whether to log the tool’s progress.
__call__(tool_input: str, callbacks: Optional[Union[List[BaseCallbackHandler], BaseCallbackManager]] = None) → str¶
Make tool callable.
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, **kwargs: Any) → Any¶
Run the tool asynchronously.
validator raise_deprecation » all fields¶
Raise deprecation warning if callback_manager is used.
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, **kwargs: Any) → Any¶
Run the tool.
property args: dict¶
property is_single_input: bool¶
Whether the tool only accepts a single input.
model Config¶
Bases: object
Configuration for this pydantic object.
arbitrary_types_allowed = True¶
extra = 'forbid'¶ | [
913,
14008,
25,
1845,
284,
3641,
55609,
198,
25729,
311,
1515,
279,
5507,
753,
5208,
627,
565,
6797,
3889,
14506,
6022,
25,
610,
11,
27777,
25,
12536,
58,
33758,
53094,
58,
4066,
7646,
3126,
1145,
5464,
7646,
2087,
5163,
284,
2290,
8,
11651,
610,
55609,
198,
8238,
5507,
42022,
627,
7847,
802,
359,
50050,
6022,
25,
9323,
17752,
11,
30226,
1145,
14008,
25,
12536,
58,
2707,
60,
284,
2290,
11,
1212,
6855,
25,
12536,
17752,
60,
284,
364,
13553,
518,
1933,
25,
12536,
17752,
60,
284,
364,
13553,
518,
27777,
25,
12536,
58,
33758,
53094,
58,
4066,
7646,
3126,
1145,
5464,
7646,
2087,
5163,
284,
2290,
11,
3146,
9872,
25,
5884,
8,
11651,
5884,
55609,
198,
6869,
279,
5507,
68881,
627,
16503,
4933,
2310,
70693,
4194,
8345,
4194,
682,
5151,
55609,
198,
94201,
409,
70693,
10163,
422,
4927,
12418,
374,
1511,
627,
6236,
50050,
6022,
25,
9323,
17752,
11,
30226,
1145,
14008,
25,
12536,
58,
2707,
60,
284,
2290,
11,
1212,
6855,
25,
12536,
17752,
60,
284,
364,
13553,
518,
1933,
25,
12536,
17752,
60,
284,
364,
13553,
518,
27777,
25,
12536,
58,
33758,
53094,
58,
4066,
7646,
3126,
1145,
5464,
7646,
2087,
5163,
284,
2290,
11,
3146,
9872,
25,
5884,
8,
11651,
5884,
55609,
198,
6869,
279,
5507,
627,
3784,
2897,
25,
6587,
55609,
198,
3784,
374,
20052,
6022,
25,
1845,
55609,
198,
25729,
279,
5507,
1193,
27441,
264,
3254,
1988,
627,
2590,
5649,
55609,
198,
33,
2315,
25,
1665,
198,
7843,
369,
420,
4611,
67,
8322,
1665,
627,
277,
88951,
9962,
43255,
284,
3082,
55609,
198,
15824,
284,
364,
2000,
21301,
6,
55609
] | https://langchain.readthedocs.io/en/latest/tools/langchain.tools.office365.base.O365BaseTool.html |
e669def72b10-0 | langchain.tools.base.StructuredTool¶
class langchain.tools.base.StructuredTool(*, name: str, description: str = '', args_schema: Type[BaseModel], return_direct: bool = False, verbose: bool = False, callbacks: Optional[Union[List[BaseCallbackHandler], BaseCallbackManager]] = None, callback_manager: Optional[BaseCallbackManager] = None, handle_tool_error: Optional[Union[bool, str, Callable[[ToolException], str]]] = False, func: Callable[[...], Any], coroutine: Optional[Callable[[...], Awaitable[Any]]] = None)[source]¶
Bases: BaseTool
Tool that can operate on any number of inputs.
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 args_schema: Type[pydantic.main.BaseModel] [Required]¶
The input arguments’ schema.
The tool schema.
param callback_manager: Optional[langchain.callbacks.base.BaseCallbackManager] = None¶
Deprecated. Please use callbacks instead.
param callbacks: Optional[Union[List[langchain.callbacks.base.BaseCallbackHandler], langchain.callbacks.base.BaseCallbackManager]] = None¶
Callbacks to be called during tool execution.
param coroutine: Optional[Callable[[...], Awaitable[Any]]] = None¶
The asynchronous version of the function.
param description: str = ''¶
Used to tell the model how/when/why to use the tool.
You can provide few-shot examples as a part of the description.
param func: Callable[[...], Any] [Required]¶
The function to run when the tool is called.
param handle_tool_error: Optional[Union[bool, str, Callable[[langchain.tools.base.ToolException], str]]] = False¶ | [
5317,
8995,
24029,
9105,
52545,
3149,
7896,
55609,
198,
1058,
8859,
8995,
24029,
9105,
52545,
3149,
7896,
4163,
11,
836,
25,
610,
11,
4096,
25,
610,
284,
9158,
2897,
26443,
25,
4078,
58,
4066,
1747,
1145,
471,
33971,
25,
1845,
284,
3641,
11,
14008,
25,
1845,
284,
3641,
11,
27777,
25,
12536,
58,
33758,
53094,
58,
4066,
7646,
3126,
1145,
5464,
7646,
2087,
5163,
284,
2290,
11,
4927,
12418,
25,
12536,
58,
4066,
7646,
2087,
60,
284,
2290,
11,
3790,
23627,
4188,
25,
12536,
58,
33758,
58,
2707,
11,
610,
11,
54223,
15873,
7896,
1378,
1145,
610,
5163,
60,
284,
3641,
11,
2988,
25,
54223,
15873,
1131,
1145,
5884,
1145,
78899,
25,
12536,
58,
41510,
15873,
1131,
1145,
99295,
481,
71401,
5163,
60,
284,
2290,
6758,
2484,
60,
55609,
198,
33,
2315,
25,
5464,
7896,
198,
7896,
430,
649,
14816,
389,
904,
1396,
315,
11374,
627,
4110,
264,
502,
1646,
555,
23115,
323,
69772,
1988,
828,
505,
16570,
6105,
627,
36120,
54129,
422,
279,
1988,
828,
4250,
387,
16051,
311,
1376,
264,
2764,
1646,
627,
913,
2897,
26443,
25,
4078,
58,
3368,
67,
8322,
9056,
13316,
1747,
60,
510,
8327,
60,
55609,
198,
791,
1988,
6105,
529,
11036,
627,
791,
5507,
11036,
627,
913,
4927,
12418,
25,
12536,
58,
5317,
8995,
72134,
9105,
13316,
7646,
2087,
60,
284,
2290,
55609,
198,
52444,
13,
5321,
1005,
27777,
4619,
627,
913,
27777,
25,
12536,
58,
33758,
53094,
58,
5317,
8995,
72134,
9105,
13316,
7646,
3126,
1145,
8859,
8995,
72134,
9105,
13316,
7646,
2087,
5163,
284,
2290,
55609,
198,
45561,
311,
387,
2663,
2391,
5507,
11572,
627,
913,
78899,
25,
12536,
58,
41510,
15873,
1131,
1145,
99295,
481,
71401,
5163,
60,
284,
2290,
55609,
198,
791,
40107,
2373,
315,
279,
734,
627,
913,
4096,
25,
610,
284,
3436,
55609,
198,
23580,
311,
3371,
279,
1646,
1268,
14,
9493,
14,
35734,
311,
1005,
279,
5507,
627,
2675,
649,
3493,
2478,
64630,
10507,
439,
264,
961,
315,
279,
4096,
627,
913,
2988,
25,
54223,
15873,
1131,
1145,
5884,
60,
510,
8327,
60,
55609,
198,
791,
734,
311,
1629,
994,
279,
5507,
374,
2663,
627,
913,
3790,
23627,
4188,
25,
12536,
58,
33758,
58,
2707,
11,
610,
11,
54223,
15873,
5317,
8995,
24029,
9105,
25443,
1378,
1145,
610,
5163,
60,
284,
3641,
55609
] | https://langchain.readthedocs.io/en/latest/tools/langchain.tools.base.StructuredTool.html |
e669def72b10-1 | Handle the content of the ToolException thrown.
param name: str [Required]¶
The unique name of the tool that clearly communicates its purpose.
param return_direct: bool = False¶
Whether to return the tool’s output directly. Setting this to True means
that after the tool is called, the AgentExecutor will stop looping.
param verbose: bool = False¶
Whether to log the tool’s progress.
__call__(tool_input: str, callbacks: Optional[Union[List[BaseCallbackHandler], BaseCallbackManager]] = None) → str¶
Make tool callable.
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, **kwargs: Any) → Any¶
Run the tool asynchronously.
classmethod from_function(func: Callable, name: Optional[str] = None, description: Optional[str] = None, return_direct: bool = False, args_schema: Optional[Type[BaseModel]] = None, infer_schema: bool = True, **kwargs: Any) → StructuredTool[source]¶
Create tool from a given function.
A classmethod that helps to create a tool from a function.
Parameters
func – The function from which to create a tool
name – The name of the tool. Defaults to the function name
description – The description of the tool. Defaults to the function docstring
return_direct – Whether to return the result directly or as a callback
args_schema – The schema of the tool’s input arguments
infer_schema – Whether to infer the schema from the function’s signature
**kwargs – Additional arguments to pass to the tool
Returns
The tool
Examples
… code-block:: python | [
7144,
279,
2262,
315,
279,
13782,
1378,
15338,
627,
913,
836,
25,
610,
510,
8327,
60,
55609,
198,
791,
5016,
836,
315,
279,
5507,
430,
9539,
92606,
1202,
7580,
627,
913,
471,
33971,
25,
1845,
284,
3641,
55609,
198,
25729,
311,
471,
279,
5507,
753,
2612,
6089,
13,
20638,
420,
311,
3082,
3445,
198,
9210,
1306,
279,
5507,
374,
2663,
11,
279,
21372,
26321,
690,
3009,
63687,
627,
913,
14008,
25,
1845,
284,
3641,
55609,
198,
25729,
311,
1515,
279,
5507,
753,
5208,
627,
565,
6797,
3889,
14506,
6022,
25,
610,
11,
27777,
25,
12536,
58,
33758,
53094,
58,
4066,
7646,
3126,
1145,
5464,
7646,
2087,
5163,
284,
2290,
8,
11651,
610,
55609,
198,
8238,
5507,
42022,
627,
7847,
802,
359,
50050,
6022,
25,
9323,
17752,
11,
30226,
1145,
14008,
25,
12536,
58,
2707,
60,
284,
2290,
11,
1212,
6855,
25,
12536,
17752,
60,
284,
364,
13553,
518,
1933,
25,
12536,
17752,
60,
284,
364,
13553,
518,
27777,
25,
12536,
58,
33758,
53094,
58,
4066,
7646,
3126,
1145,
5464,
7646,
2087,
5163,
284,
2290,
11,
3146,
9872,
25,
5884,
8,
11651,
5884,
55609,
198,
6869,
279,
5507,
68881,
627,
27853,
505,
9353,
19062,
25,
54223,
11,
836,
25,
12536,
17752,
60,
284,
2290,
11,
4096,
25,
12536,
17752,
60,
284,
2290,
11,
471,
33971,
25,
1845,
284,
3641,
11,
2897,
26443,
25,
12536,
58,
941,
58,
4066,
1747,
5163,
284,
2290,
11,
24499,
26443,
25,
1845,
284,
3082,
11,
3146,
9872,
25,
5884,
8,
11651,
16531,
3149,
7896,
76747,
60,
55609,
198,
4110,
5507,
505,
264,
2728,
734,
627,
32,
538,
4492,
430,
8779,
311,
1893,
264,
5507,
505,
264,
734,
627,
9905,
198,
2900,
1389,
578,
734,
505,
902,
311,
1893,
264,
5507,
198,
609,
1389,
578,
836,
315,
279,
5507,
13,
37090,
311,
279,
734,
836,
198,
4789,
1389,
578,
4096,
315,
279,
5507,
13,
37090,
311,
279,
734,
4733,
928,
198,
693,
33971,
1389,
13440,
311,
471,
279,
1121,
6089,
477,
439,
264,
4927,
198,
2164,
26443,
1389,
578,
11036,
315,
279,
5507,
753,
1988,
6105,
198,
90659,
26443,
1389,
13440,
311,
24499,
279,
11036,
505,
279,
734,
753,
12223,
198,
334,
9872,
1389,
24086,
6105,
311,
1522,
311,
279,
5507,
198,
16851,
198,
791,
5507,
198,
41481,
198,
1981,
2082,
9612,
487,
10344
] | https://langchain.readthedocs.io/en/latest/tools/langchain.tools.base.StructuredTool.html |
e669def72b10-2 | Returns
The tool
Examples
… code-block:: python
def add(a: int, b: int) -> int:“””Add two numbers”””
return a + b
tool = StructuredTool.from_function(add)
tool.run(1, 2) # 3
validator raise_deprecation » all fields¶
Raise deprecation warning if callback_manager is used.
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, **kwargs: Any) → Any¶
Run the tool.
property args: dict¶
The tool’s input arguments.
property is_single_input: bool¶
Whether the tool only accepts a single input.
model Config¶
Bases: object
Configuration for this pydantic object.
arbitrary_types_allowed = True¶
extra = 'forbid'¶ | [
16851,
198,
791,
5507,
198,
41481,
198,
1981,
2082,
9612,
487,
10344,
198,
755,
923,
2948,
25,
528,
11,
293,
25,
528,
8,
1492,
528,
25,
2118,
863,
863,
2261,
1403,
5219,
863,
863,
89874,
693,
264,
489,
293,
198,
14506,
284,
16531,
3149,
7896,
6521,
9353,
26995,
340,
14506,
7789,
7,
16,
11,
220,
17,
8,
674,
220,
18,
198,
16503,
4933,
2310,
70693,
4194,
8345,
4194,
682,
5151,
55609,
198,
94201,
409,
70693,
10163,
422,
4927,
12418,
374,
1511,
627,
6236,
50050,
6022,
25,
9323,
17752,
11,
30226,
1145,
14008,
25,
12536,
58,
2707,
60,
284,
2290,
11,
1212,
6855,
25,
12536,
17752,
60,
284,
364,
13553,
518,
1933,
25,
12536,
17752,
60,
284,
364,
13553,
518,
27777,
25,
12536,
58,
33758,
53094,
58,
4066,
7646,
3126,
1145,
5464,
7646,
2087,
5163,
284,
2290,
11,
3146,
9872,
25,
5884,
8,
11651,
5884,
55609,
198,
6869,
279,
5507,
627,
3784,
2897,
25,
6587,
55609,
198,
791,
5507,
753,
1988,
6105,
627,
3784,
374,
20052,
6022,
25,
1845,
55609,
198,
25729,
279,
5507,
1193,
27441,
264,
3254,
1988,
627,
2590,
5649,
55609,
198,
33,
2315,
25,
1665,
198,
7843,
369,
420,
4611,
67,
8322,
1665,
627,
277,
88951,
9962,
43255,
284,
3082,
55609,
198,
15824,
284,
364,
2000,
21301,
6,
55609
] | https://langchain.readthedocs.io/en/latest/tools/langchain.tools.base.StructuredTool.html |
2cf8018b8e22-0 | langchain.tools.spark_sql.tool.QuerySparkSQLTool¶
class langchain.tools.spark_sql.tool.QuerySparkSQLTool(*, name: str = 'query_sql_db', description: str = '\n Input to this tool is a detailed and correct SQL query, output is a result from the Spark SQL.\n If the query is not correct, an error message will be returned.\n If an error is returned, rewrite the query, check the query, and try again.\n ', args_schema: Optional[Type[BaseModel]] = None, return_direct: bool = False, verbose: bool = False, callbacks: Optional[Union[List[BaseCallbackHandler], BaseCallbackManager]] = None, callback_manager: Optional[BaseCallbackManager] = None, handle_tool_error: Optional[Union[bool, str, Callable[[ToolException], str]]] = False, db: SparkSQL)[source]¶
Bases: BaseSparkSQLTool, BaseTool
Tool for querying a 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 valid model.
param args_schema: Optional[Type[BaseModel]] = None¶
Pydantic model class to validate and parse the tool’s input arguments.
param callback_manager: Optional[BaseCallbackManager] = None¶
Deprecated. Please use callbacks instead.
param callbacks: Callbacks = None¶
Callbacks to be called during tool execution.
param db: langchain.utilities.spark_sql.SparkSQL [Required]¶
param description: str = '\n Input to this tool is a detailed and correct SQL query, output is a result from the Spark SQL.\n If the query is not correct, an error message will be returned.\n If an error is returned, rewrite the query, check the query, and try again.\n '¶ | [
5317,
8995,
24029,
33646,
18554,
21966,
16060,
68583,
6827,
7896,
55609,
198,
1058,
8859,
8995,
24029,
33646,
18554,
21966,
16060,
68583,
6827,
7896,
4163,
11,
836,
25,
610,
284,
364,
1663,
18554,
8856,
518,
4096,
25,
610,
284,
5307,
77,
46493,
5688,
311,
420,
5507,
374,
264,
11944,
323,
4495,
8029,
3319,
11,
2612,
374,
264,
1121,
505,
279,
27565,
8029,
7255,
77,
46493,
1442,
279,
3319,
374,
539,
4495,
11,
459,
1493,
1984,
690,
387,
6052,
7255,
77,
46493,
1442,
459,
1493,
374,
6052,
11,
18622,
279,
3319,
11,
1817,
279,
3319,
11,
323,
1456,
1578,
7255,
77,
46493,
6752,
2897,
26443,
25,
12536,
58,
941,
58,
4066,
1747,
5163,
284,
2290,
11,
471,
33971,
25,
1845,
284,
3641,
11,
14008,
25,
1845,
284,
3641,
11,
27777,
25,
12536,
58,
33758,
53094,
58,
4066,
7646,
3126,
1145,
5464,
7646,
2087,
5163,
284,
2290,
11,
4927,
12418,
25,
12536,
58,
4066,
7646,
2087,
60,
284,
2290,
11,
3790,
23627,
4188,
25,
12536,
58,
33758,
58,
2707,
11,
610,
11,
54223,
15873,
7896,
1378,
1145,
610,
5163,
60,
284,
3641,
11,
3000,
25,
27565,
6827,
6758,
2484,
60,
55609,
198,
33,
2315,
25,
5464,
68583,
6827,
7896,
11,
5464,
7896,
198,
7896,
369,
82198,
264,
27565,
8029,
627,
4110,
264,
502,
1646,
555,
23115,
323,
69772,
1988,
828,
505,
16570,
6105,
627,
36120,
54129,
422,
279,
1988,
828,
4250,
387,
16051,
311,
1376,
264,
2764,
1646,
627,
913,
2897,
26443,
25,
12536,
58,
941,
58,
4066,
1747,
5163,
284,
2290,
55609,
198,
14149,
67,
8322,
1646,
538,
311,
9788,
323,
4820,
279,
5507,
753,
1988,
6105,
627,
913,
4927,
12418,
25,
12536,
58,
4066,
7646,
2087,
60,
284,
2290,
55609,
198,
52444,
13,
5321,
1005,
27777,
4619,
627,
913,
27777,
25,
23499,
82,
284,
2290,
55609,
198,
45561,
311,
387,
2663,
2391,
5507,
11572,
627,
913,
3000,
25,
8859,
8995,
63795,
33646,
18554,
815,
29836,
6827,
510,
8327,
60,
55609,
198,
913,
4096,
25,
610,
284,
5307,
77,
46493,
5688,
311,
420,
5507,
374,
264,
11944,
323,
4495,
8029,
3319,
11,
2612,
374,
264,
1121,
505,
279,
27565,
8029,
7255,
77,
46493,
1442,
279,
3319,
374,
539,
4495,
11,
459,
1493,
1984,
690,
387,
6052,
7255,
77,
46493,
1442,
459,
1493,
374,
6052,
11,
18622,
279,
3319,
11,
1817,
279,
3319,
11,
323,
1456,
1578,
7255,
77,
46493,
364,
55609
] | https://langchain.readthedocs.io/en/latest/tools/langchain.tools.spark_sql.tool.QuerySparkSQLTool.html |
2cf8018b8e22-1 | Used to tell the model how/when/why to use the tool.
You can provide few-shot examples as a part of the description.
param handle_tool_error: Optional[Union[bool, str, Callable[[ToolException], str]]] = False¶
Handle the content of the ToolException thrown.
param name: str = 'query_sql_db'¶
The unique name of the tool that clearly communicates its purpose.
param return_direct: bool = False¶
Whether to return the tool’s output directly. Setting this to True means
that after the tool is called, the AgentExecutor will stop looping.
param verbose: bool = False¶
Whether to log the tool’s progress.
__call__(tool_input: str, callbacks: Optional[Union[List[BaseCallbackHandler], BaseCallbackManager]] = None) → str¶
Make tool callable.
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, **kwargs: Any) → Any¶
Run the tool asynchronously.
validator raise_deprecation » all fields¶
Raise deprecation warning if callback_manager is used.
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, **kwargs: Any) → Any¶
Run the tool.
property args: dict¶
property is_single_input: bool¶
Whether the tool only accepts a single input.
model Config¶
Bases: Config
Configuration for this pydantic object.
arbitrary_types_allowed = True¶ | [
23580,
311,
3371,
279,
1646,
1268,
14,
9493,
14,
35734,
311,
1005,
279,
5507,
627,
2675,
649,
3493,
2478,
64630,
10507,
439,
264,
961,
315,
279,
4096,
627,
913,
3790,
23627,
4188,
25,
12536,
58,
33758,
58,
2707,
11,
610,
11,
54223,
15873,
7896,
1378,
1145,
610,
5163,
60,
284,
3641,
55609,
198,
7144,
279,
2262,
315,
279,
13782,
1378,
15338,
627,
913,
836,
25,
610,
284,
364,
1663,
18554,
8856,
6,
55609,
198,
791,
5016,
836,
315,
279,
5507,
430,
9539,
92606,
1202,
7580,
627,
913,
471,
33971,
25,
1845,
284,
3641,
55609,
198,
25729,
311,
471,
279,
5507,
753,
2612,
6089,
13,
20638,
420,
311,
3082,
3445,
198,
9210,
1306,
279,
5507,
374,
2663,
11,
279,
21372,
26321,
690,
3009,
63687,
627,
913,
14008,
25,
1845,
284,
3641,
55609,
198,
25729,
311,
1515,
279,
5507,
753,
5208,
627,
565,
6797,
3889,
14506,
6022,
25,
610,
11,
27777,
25,
12536,
58,
33758,
53094,
58,
4066,
7646,
3126,
1145,
5464,
7646,
2087,
5163,
284,
2290,
8,
11651,
610,
55609,
198,
8238,
5507,
42022,
627,
7847,
802,
359,
50050,
6022,
25,
9323,
17752,
11,
30226,
1145,
14008,
25,
12536,
58,
2707,
60,
284,
2290,
11,
1212,
6855,
25,
12536,
17752,
60,
284,
364,
13553,
518,
1933,
25,
12536,
17752,
60,
284,
364,
13553,
518,
27777,
25,
12536,
58,
33758,
53094,
58,
4066,
7646,
3126,
1145,
5464,
7646,
2087,
5163,
284,
2290,
11,
3146,
9872,
25,
5884,
8,
11651,
5884,
55609,
198,
6869,
279,
5507,
68881,
627,
16503,
4933,
2310,
70693,
4194,
8345,
4194,
682,
5151,
55609,
198,
94201,
409,
70693,
10163,
422,
4927,
12418,
374,
1511,
627,
6236,
50050,
6022,
25,
9323,
17752,
11,
30226,
1145,
14008,
25,
12536,
58,
2707,
60,
284,
2290,
11,
1212,
6855,
25,
12536,
17752,
60,
284,
364,
13553,
518,
1933,
25,
12536,
17752,
60,
284,
364,
13553,
518,
27777,
25,
12536,
58,
33758,
53094,
58,
4066,
7646,
3126,
1145,
5464,
7646,
2087,
5163,
284,
2290,
11,
3146,
9872,
25,
5884,
8,
11651,
5884,
55609,
198,
6869,
279,
5507,
627,
3784,
2897,
25,
6587,
55609,
198,
3784,
374,
20052,
6022,
25,
1845,
55609,
198,
25729,
279,
5507,
1193,
27441,
264,
3254,
1988,
627,
2590,
5649,
55609,
198,
33,
2315,
25,
5649,
198,
7843,
369,
420,
4611,
67,
8322,
1665,
627,
277,
88951,
9962,
43255,
284,
3082,
55609
] | https://langchain.readthedocs.io/en/latest/tools/langchain.tools.spark_sql.tool.QuerySparkSQLTool.html |
2cf8018b8e22-2 | Configuration for this pydantic object.
arbitrary_types_allowed = True¶
extra = 'forbid'¶ | [
7843,
369,
420,
4611,
67,
8322,
1665,
627,
277,
88951,
9962,
43255,
284,
3082,
55609,
198,
15824,
284,
364,
2000,
21301,
6,
55609
] | https://langchain.readthedocs.io/en/latest/tools/langchain.tools.spark_sql.tool.QuerySparkSQLTool.html |
504f1cadacc2-0 | langchain.tools.vectorstore.tool.BaseVectorStoreTool¶
class langchain.tools.vectorstore.tool.BaseVectorStoreTool(*, vectorstore: VectorStore, llm: BaseLanguageModel = None)[source]¶
Bases: BaseModel
Base class for tools that use a VectorStore.
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 llm: langchain.base_language.BaseLanguageModel [Optional]¶
param vectorstore: langchain.vectorstores.base.VectorStore [Required]¶
model Config[source]¶
Bases: Config
Configuration for this pydantic object.
arbitrary_types_allowed = True¶
extra = 'forbid'¶ | [
5317,
8995,
24029,
48203,
4412,
21966,
13316,
3866,
6221,
7896,
55609,
198,
1058,
8859,
8995,
24029,
48203,
4412,
21966,
13316,
3866,
6221,
7896,
4163,
11,
4724,
4412,
25,
4290,
6221,
11,
9507,
76,
25,
5464,
14126,
1747,
284,
2290,
6758,
2484,
60,
55609,
198,
33,
2315,
25,
65705,
198,
4066,
538,
369,
7526,
430,
1005,
264,
4290,
6221,
627,
4110,
264,
502,
1646,
555,
23115,
323,
69772,
1988,
828,
505,
16570,
6105,
627,
36120,
54129,
422,
279,
1988,
828,
4250,
387,
16051,
311,
1376,
264,
2764,
1646,
627,
913,
9507,
76,
25,
8859,
8995,
9105,
30121,
13316,
14126,
1747,
510,
15669,
60,
55609,
198,
913,
4724,
4412,
25,
8859,
8995,
48203,
44569,
9105,
14621,
6221,
510,
8327,
60,
55609,
198,
2590,
5649,
76747,
60,
55609,
198,
33,
2315,
25,
5649,
198,
7843,
369,
420,
4611,
67,
8322,
1665,
627,
277,
88951,
9962,
43255,
284,
3082,
55609,
198,
15824,
284,
364,
2000,
21301,
6,
55609
] | https://langchain.readthedocs.io/en/latest/tools/langchain.tools.vectorstore.tool.BaseVectorStoreTool.html |
80cd6c03fa4d-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. | [
5317,
8995,
24029,
9914,
46463,
8576,
673,
8501,
660,
30386,
2703,
55609,
198,
5317,
8995,
24029,
9914,
46463,
8576,
673,
8501,
660,
30386,
2703,
9387,
25,
8092,
11,
1217,
2703,
25,
610,
8,
11651,
8092,
76747,
60,
55609,
198,
57908,
264,
8844,
1853,
11,
19054,
459,
1493,
422,
539,
2949,
279,
3789,
6352,
13
] | https://langchain.readthedocs.io/en/latest/tools/langchain.tools.file_management.utils.get_validated_relative_path.html |
616a92532b9a-0 | langchain.tools.sql_database.tool.InfoSQLDatabaseTool¶
class langchain.tools.sql_database.tool.InfoSQLDatabaseTool(*, name: str = 'sql_db_schema', description: str = '\n Input to this tool is a comma-separated list of tables, output is the schema and sample rows for those tables. \n\n Example Input: "table1, table2, table3"\n ', args_schema: Optional[Type[BaseModel]] = None, return_direct: bool = False, verbose: bool = False, callbacks: Optional[Union[List[BaseCallbackHandler], BaseCallbackManager]] = None, callback_manager: Optional[BaseCallbackManager] = None, handle_tool_error: Optional[Union[bool, str, Callable[[ToolException], str]]] = False, db: SQLDatabase)[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 input data cannot be parsed to form a valid model.
param args_schema: Optional[Type[BaseModel]] = None¶
Pydantic model class to validate and parse the tool’s input arguments.
param callback_manager: Optional[BaseCallbackManager] = None¶
Deprecated. Please use callbacks instead.
param callbacks: Callbacks = None¶
Callbacks to be called during tool execution.
param db: langchain.sql_database.SQLDatabase [Required]¶
param description: str = '\n Input to this tool is a comma-separated list of tables, output is the schema and sample rows for those tables. \n\n Example Input: "table1, table2, table3"\n '¶
Used to tell the model how/when/why to use the tool.
You can provide few-shot examples as a part of the description. | [
5317,
8995,
24029,
10251,
28441,
21966,
20736,
6827,
6116,
7896,
55609,
198,
1058,
8859,
8995,
24029,
10251,
28441,
21966,
20736,
6827,
6116,
7896,
4163,
11,
836,
25,
610,
284,
364,
3628,
8856,
26443,
518,
4096,
25,
610,
284,
5307,
77,
46493,
5688,
311,
420,
5507,
374,
264,
32783,
73792,
1160,
315,
12920,
11,
2612,
374,
279,
11036,
323,
6205,
7123,
369,
1884,
12920,
13,
46493,
1144,
77,
1734,
46493,
13688,
5688,
25,
330,
2048,
16,
11,
2007,
17,
11,
2007,
18,
12200,
77,
46493,
6752,
2897,
26443,
25,
12536,
58,
941,
58,
4066,
1747,
5163,
284,
2290,
11,
471,
33971,
25,
1845,
284,
3641,
11,
14008,
25,
1845,
284,
3641,
11,
27777,
25,
12536,
58,
33758,
53094,
58,
4066,
7646,
3126,
1145,
5464,
7646,
2087,
5163,
284,
2290,
11,
4927,
12418,
25,
12536,
58,
4066,
7646,
2087,
60,
284,
2290,
11,
3790,
23627,
4188,
25,
12536,
58,
33758,
58,
2707,
11,
610,
11,
54223,
15873,
7896,
1378,
1145,
610,
5163,
60,
284,
3641,
11,
3000,
25,
8029,
6116,
6758,
2484,
60,
55609,
198,
33,
2315,
25,
5464,
6827,
6116,
7896,
11,
5464,
7896,
198,
7896,
369,
3794,
11408,
922,
264,
8029,
4729,
627,
4110,
264,
502,
1646,
555,
23115,
323,
69772,
1988,
828,
505,
16570,
6105,
627,
36120,
54129,
422,
279,
1988,
828,
4250,
387,
16051,
311,
1376,
264,
2764,
1646,
627,
913,
2897,
26443,
25,
12536,
58,
941,
58,
4066,
1747,
5163,
284,
2290,
55609,
198,
14149,
67,
8322,
1646,
538,
311,
9788,
323,
4820,
279,
5507,
753,
1988,
6105,
627,
913,
4927,
12418,
25,
12536,
58,
4066,
7646,
2087,
60,
284,
2290,
55609,
198,
52444,
13,
5321,
1005,
27777,
4619,
627,
913,
27777,
25,
23499,
82,
284,
2290,
55609,
198,
45561,
311,
387,
2663,
2391,
5507,
11572,
627,
913,
3000,
25,
8859,
8995,
10251,
28441,
26151,
6116,
510,
8327,
60,
55609,
198,
913,
4096,
25,
610,
284,
5307,
77,
46493,
5688,
311,
420,
5507,
374,
264,
32783,
73792,
1160,
315,
12920,
11,
2612,
374,
279,
11036,
323,
6205,
7123,
369,
1884,
12920,
13,
46493,
1144,
77,
1734,
46493,
13688,
5688,
25,
330,
2048,
16,
11,
2007,
17,
11,
2007,
18,
12200,
77,
46493,
364,
55609,
198,
23580,
311,
3371,
279,
1646,
1268,
14,
9493,
14,
35734,
311,
1005,
279,
5507,
627,
2675,
649,
3493,
2478,
64630,
10507,
439,
264,
961,
315,
279,
4096,
13
] | https://langchain.readthedocs.io/en/latest/tools/langchain.tools.sql_database.tool.InfoSQLDatabaseTool.html |
616a92532b9a-1 | You can provide few-shot examples as a part of the description.
param handle_tool_error: Optional[Union[bool, str, Callable[[ToolException], str]]] = False¶
Handle the content of the ToolException thrown.
param name: str = 'sql_db_schema'¶
The unique name of the tool that clearly communicates its purpose.
param return_direct: bool = False¶
Whether to return the tool’s output directly. Setting this to True means
that after the tool is called, the AgentExecutor will stop looping.
param verbose: bool = False¶
Whether to log the tool’s progress.
__call__(tool_input: str, callbacks: Optional[Union[List[BaseCallbackHandler], BaseCallbackManager]] = None) → str¶
Make tool callable.
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, **kwargs: Any) → Any¶
Run the tool asynchronously.
validator raise_deprecation » all fields¶
Raise deprecation warning if callback_manager is used.
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, **kwargs: Any) → Any¶
Run the tool.
property args: dict¶
property is_single_input: bool¶
Whether the tool only accepts a single input.
model Config¶
Bases: Config
Configuration for this pydantic object.
arbitrary_types_allowed = True¶
extra = 'forbid'¶ | [
2675,
649,
3493,
2478,
64630,
10507,
439,
264,
961,
315,
279,
4096,
627,
913,
3790,
23627,
4188,
25,
12536,
58,
33758,
58,
2707,
11,
610,
11,
54223,
15873,
7896,
1378,
1145,
610,
5163,
60,
284,
3641,
55609,
198,
7144,
279,
2262,
315,
279,
13782,
1378,
15338,
627,
913,
836,
25,
610,
284,
364,
3628,
8856,
26443,
6,
55609,
198,
791,
5016,
836,
315,
279,
5507,
430,
9539,
92606,
1202,
7580,
627,
913,
471,
33971,
25,
1845,
284,
3641,
55609,
198,
25729,
311,
471,
279,
5507,
753,
2612,
6089,
13,
20638,
420,
311,
3082,
3445,
198,
9210,
1306,
279,
5507,
374,
2663,
11,
279,
21372,
26321,
690,
3009,
63687,
627,
913,
14008,
25,
1845,
284,
3641,
55609,
198,
25729,
311,
1515,
279,
5507,
753,
5208,
627,
565,
6797,
3889,
14506,
6022,
25,
610,
11,
27777,
25,
12536,
58,
33758,
53094,
58,
4066,
7646,
3126,
1145,
5464,
7646,
2087,
5163,
284,
2290,
8,
11651,
610,
55609,
198,
8238,
5507,
42022,
627,
7847,
802,
359,
50050,
6022,
25,
9323,
17752,
11,
30226,
1145,
14008,
25,
12536,
58,
2707,
60,
284,
2290,
11,
1212,
6855,
25,
12536,
17752,
60,
284,
364,
13553,
518,
1933,
25,
12536,
17752,
60,
284,
364,
13553,
518,
27777,
25,
12536,
58,
33758,
53094,
58,
4066,
7646,
3126,
1145,
5464,
7646,
2087,
5163,
284,
2290,
11,
3146,
9872,
25,
5884,
8,
11651,
5884,
55609,
198,
6869,
279,
5507,
68881,
627,
16503,
4933,
2310,
70693,
4194,
8345,
4194,
682,
5151,
55609,
198,
94201,
409,
70693,
10163,
422,
4927,
12418,
374,
1511,
627,
6236,
50050,
6022,
25,
9323,
17752,
11,
30226,
1145,
14008,
25,
12536,
58,
2707,
60,
284,
2290,
11,
1212,
6855,
25,
12536,
17752,
60,
284,
364,
13553,
518,
1933,
25,
12536,
17752,
60,
284,
364,
13553,
518,
27777,
25,
12536,
58,
33758,
53094,
58,
4066,
7646,
3126,
1145,
5464,
7646,
2087,
5163,
284,
2290,
11,
3146,
9872,
25,
5884,
8,
11651,
5884,
55609,
198,
6869,
279,
5507,
627,
3784,
2897,
25,
6587,
55609,
198,
3784,
374,
20052,
6022,
25,
1845,
55609,
198,
25729,
279,
5507,
1193,
27441,
264,
3254,
1988,
627,
2590,
5649,
55609,
198,
33,
2315,
25,
5649,
198,
7843,
369,
420,
4611,
67,
8322,
1665,
627,
277,
88951,
9962,
43255,
284,
3082,
55609,
198,
15824,
284,
364,
2000,
21301,
6,
55609
] | https://langchain.readthedocs.io/en/latest/tools/langchain.tools.sql_database.tool.InfoSQLDatabaseTool.html |
b6ef424791a0-0 | langchain.tools.python.tool.sanitize_input¶
langchain.tools.python.tool.sanitize_input(query: str) → str[source]¶
Sanitize input to the python REPL.
Remove whitespace, backtick & python (if llm mistakes python console as terminal)
Parameters
query – The query to sanitize
Returns
The sanitized query
Return type
str | [
5317,
8995,
24029,
44293,
21966,
516,
59752,
6022,
55609,
198,
5317,
8995,
24029,
44293,
21966,
516,
59752,
6022,
10974,
25,
610,
8,
11651,
610,
76747,
60,
55609,
198,
24661,
27406,
1988,
311,
279,
10344,
93680,
627,
13319,
37472,
11,
1203,
35255,
612,
10344,
320,
333,
9507,
76,
21294,
10344,
2393,
439,
15372,
340,
9905,
198,
1663,
1389,
578,
3319,
311,
46283,
198,
16851,
198,
791,
40332,
3319,
198,
5715,
955,
198,
496
] | https://langchain.readthedocs.io/en/latest/tools/langchain.tools.python.tool.sanitize_input.html |
25ab5ff79557-0 | langchain.tools.azure_cognitive_services.form_recognizer.AzureCogsFormRecognizerTool¶
class langchain.tools.azure_cognitive_services.form_recognizer.AzureCogsFormRecognizerTool(*, name: str = 'azure_cognitive_services_form_recognizer', description: str = 'A wrapper around Azure Cognitive Services Form Recognizer. Useful for when you need to extract text, tables, and key-value pairs from documents. Input should be a url to a document.', args_schema: Optional[Type[BaseModel]] = None, return_direct: bool = False, verbose: bool = False, callbacks: Optional[Union[List[BaseCallbackHandler], BaseCallbackManager]] = None, callback_manager: Optional[BaseCallbackManager] = None, handle_tool_error: Optional[Union[bool, str, Callable[[ToolException], str]]] = False, azure_cogs_key: str = '', azure_cogs_endpoint: str = '', doc_analysis_client: Any = None)[source]¶
Bases: BaseTool
Tool that queries the Azure Cognitive Services Form Recognizer API.
In order to set this up, follow instructions at:
https://learn.microsoft.com/en-us/azure/applied-ai-services/form-recognizer/quickstarts/get-started-sdks-rest-api?view=form-recog-3.0.0&pivots=programming-language-python
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 args_schema: Optional[Type[BaseModel]] = None¶
Pydantic model class to validate and parse the tool’s input arguments.
param callback_manager: Optional[BaseCallbackManager] = None¶
Deprecated. Please use callbacks instead.
param callbacks: Callbacks = None¶
Callbacks to be called during tool execution. | [
5317,
8995,
24029,
71340,
669,
51549,
40946,
8726,
7225,
4021,
3213,
58927,
34,
27403,
1876,
22268,
7896,
55609,
198,
1058,
8859,
8995,
24029,
71340,
669,
51549,
40946,
8726,
7225,
4021,
3213,
58927,
34,
27403,
1876,
22268,
7896,
4163,
11,
836,
25,
610,
284,
364,
40595,
669,
51549,
40946,
8074,
7225,
4021,
3213,
518,
4096,
25,
610,
284,
364,
32,
13564,
2212,
35219,
73235,
8471,
3459,
67975,
3213,
13,
51612,
369,
994,
499,
1205,
311,
8819,
1495,
11,
12920,
11,
323,
1401,
19625,
13840,
505,
9477,
13,
5688,
1288,
387,
264,
2576,
311,
264,
2246,
16045,
2897,
26443,
25,
12536,
58,
941,
58,
4066,
1747,
5163,
284,
2290,
11,
471,
33971,
25,
1845,
284,
3641,
11,
14008,
25,
1845,
284,
3641,
11,
27777,
25,
12536,
58,
33758,
53094,
58,
4066,
7646,
3126,
1145,
5464,
7646,
2087,
5163,
284,
2290,
11,
4927,
12418,
25,
12536,
58,
4066,
7646,
2087,
60,
284,
2290,
11,
3790,
23627,
4188,
25,
12536,
58,
33758,
58,
2707,
11,
610,
11,
54223,
15873,
7896,
1378,
1145,
610,
5163,
60,
284,
3641,
11,
77630,
669,
27403,
3173,
25,
610,
284,
9158,
77630,
669,
27403,
37799,
25,
610,
284,
9158,
4733,
43782,
8342,
25,
5884,
284,
2290,
6758,
2484,
60,
55609,
198,
33,
2315,
25,
5464,
7896,
198,
7896,
430,
20126,
279,
35219,
73235,
8471,
3459,
67975,
3213,
5446,
627,
644,
2015,
311,
743,
420,
709,
11,
1833,
11470,
520,
512,
2485,
1129,
12964,
28719,
916,
13920,
26766,
14,
40595,
25697,
3523,
12,
2192,
59392,
20875,
12,
34551,
3213,
14,
28863,
66976,
24183,
19471,
291,
1355,
67,
2857,
77333,
24851,
30,
1068,
52474,
60272,
540,
12,
18,
13,
15,
13,
15,
97874,
344,
2469,
28,
92726,
44658,
73029,
198,
4110,
264,
502,
1646,
555,
23115,
323,
69772,
1988,
828,
505,
16570,
6105,
627,
36120,
54129,
422,
279,
1988,
828,
4250,
387,
16051,
311,
1376,
264,
2764,
1646,
627,
913,
2897,
26443,
25,
12536,
58,
941,
58,
4066,
1747,
5163,
284,
2290,
55609,
198,
14149,
67,
8322,
1646,
538,
311,
9788,
323,
4820,
279,
5507,
753,
1988,
6105,
627,
913,
4927,
12418,
25,
12536,
58,
4066,
7646,
2087,
60,
284,
2290,
55609,
198,
52444,
13,
5321,
1005,
27777,
4619,
627,
913,
27777,
25,
23499,
82,
284,
2290,
55609,
198,
45561,
311,
387,
2663,
2391,
5507,
11572,
13
] | https://langchain.readthedocs.io/en/latest/tools/langchain.tools.azure_cognitive_services.form_recognizer.AzureCogsFormRecognizerTool.html |
25ab5ff79557-1 | param callbacks: Callbacks = None¶
Callbacks to be called during tool execution.
param description: str = 'A wrapper around Azure Cognitive Services Form Recognizer. Useful for when you need to extract text, tables, and key-value pairs from documents. Input should be a url to a document.'¶
Used to tell the model how/when/why to use the tool.
You can provide few-shot examples as a part of the description.
param handle_tool_error: Optional[Union[bool, str, Callable[[ToolException], str]]] = False¶
Handle the content of the ToolException thrown.
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
that after the tool is called, the AgentExecutor will stop looping.
param verbose: bool = False¶
Whether to log the tool’s progress.
__call__(tool_input: str, callbacks: Optional[Union[List[BaseCallbackHandler], BaseCallbackManager]] = None) → str¶
Make tool callable.
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, **kwargs: Any) → Any¶
Run the tool asynchronously.
validator raise_deprecation » all fields¶
Raise deprecation warning if callback_manager is used. | [
913,
27777,
25,
23499,
82,
284,
2290,
55609,
198,
45561,
311,
387,
2663,
2391,
5507,
11572,
627,
913,
4096,
25,
610,
284,
364,
32,
13564,
2212,
35219,
73235,
8471,
3459,
67975,
3213,
13,
51612,
369,
994,
499,
1205,
311,
8819,
1495,
11,
12920,
11,
323,
1401,
19625,
13840,
505,
9477,
13,
5688,
1288,
387,
264,
2576,
311,
264,
2246,
3238,
55609,
198,
23580,
311,
3371,
279,
1646,
1268,
14,
9493,
14,
35734,
311,
1005,
279,
5507,
627,
2675,
649,
3493,
2478,
64630,
10507,
439,
264,
961,
315,
279,
4096,
627,
913,
3790,
23627,
4188,
25,
12536,
58,
33758,
58,
2707,
11,
610,
11,
54223,
15873,
7896,
1378,
1145,
610,
5163,
60,
284,
3641,
55609,
198,
7144,
279,
2262,
315,
279,
13782,
1378,
15338,
627,
913,
836,
25,
610,
284,
364,
40595,
669,
51549,
40946,
8074,
7225,
4021,
3213,
6,
55609,
198,
791,
5016,
836,
315,
279,
5507,
430,
9539,
92606,
1202,
7580,
627,
913,
471,
33971,
25,
1845,
284,
3641,
55609,
198,
25729,
311,
471,
279,
5507,
753,
2612,
6089,
13,
20638,
420,
311,
3082,
3445,
198,
9210,
1306,
279,
5507,
374,
2663,
11,
279,
21372,
26321,
690,
3009,
63687,
627,
913,
14008,
25,
1845,
284,
3641,
55609,
198,
25729,
311,
1515,
279,
5507,
753,
5208,
627,
565,
6797,
3889,
14506,
6022,
25,
610,
11,
27777,
25,
12536,
58,
33758,
53094,
58,
4066,
7646,
3126,
1145,
5464,
7646,
2087,
5163,
284,
2290,
8,
11651,
610,
55609,
198,
8238,
5507,
42022,
627,
7847,
802,
359,
50050,
6022,
25,
9323,
17752,
11,
30226,
1145,
14008,
25,
12536,
58,
2707,
60,
284,
2290,
11,
1212,
6855,
25,
12536,
17752,
60,
284,
364,
13553,
518,
1933,
25,
12536,
17752,
60,
284,
364,
13553,
518,
27777,
25,
12536,
58,
33758,
53094,
58,
4066,
7646,
3126,
1145,
5464,
7646,
2087,
5163,
284,
2290,
11,
3146,
9872,
25,
5884,
8,
11651,
5884,
55609,
198,
6869,
279,
5507,
68881,
627,
16503,
4933,
2310,
70693,
4194,
8345,
4194,
682,
5151,
55609,
198,
94201,
409,
70693,
10163,
422,
4927,
12418,
374,
1511,
13
] | https://langchain.readthedocs.io/en/latest/tools/langchain.tools.azure_cognitive_services.form_recognizer.AzureCogsFormRecognizerTool.html |
25ab5ff79557-2 | Raise deprecation warning if callback_manager is used.
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, **kwargs: Any) → Any¶
Run the tool.
validator validate_environment » all fields[source]¶
Validate that api key and endpoint exists in environment.
property args: dict¶
property is_single_input: bool¶
Whether the tool only accepts a single input.
model Config¶
Bases: object
Configuration for this pydantic object.
arbitrary_types_allowed = True¶
extra = 'forbid'¶ | [
94201,
409,
70693,
10163,
422,
4927,
12418,
374,
1511,
627,
6236,
50050,
6022,
25,
9323,
17752,
11,
30226,
1145,
14008,
25,
12536,
58,
2707,
60,
284,
2290,
11,
1212,
6855,
25,
12536,
17752,
60,
284,
364,
13553,
518,
1933,
25,
12536,
17752,
60,
284,
364,
13553,
518,
27777,
25,
12536,
58,
33758,
53094,
58,
4066,
7646,
3126,
1145,
5464,
7646,
2087,
5163,
284,
2290,
11,
3146,
9872,
25,
5884,
8,
11651,
5884,
55609,
198,
6869,
279,
5507,
627,
16503,
9788,
52874,
4194,
8345,
4194,
682,
5151,
76747,
60,
55609,
198,
18409,
430,
6464,
1401,
323,
15233,
6866,
304,
4676,
627,
3784,
2897,
25,
6587,
55609,
198,
3784,
374,
20052,
6022,
25,
1845,
55609,
198,
25729,
279,
5507,
1193,
27441,
264,
3254,
1988,
627,
2590,
5649,
55609,
198,
33,
2315,
25,
1665,
198,
7843,
369,
420,
4611,
67,
8322,
1665,
627,
277,
88951,
9962,
43255,
284,
3082,
55609,
198,
15824,
284,
364,
2000,
21301,
6,
55609
] | https://langchain.readthedocs.io/en/latest/tools/langchain.tools.azure_cognitive_services.form_recognizer.AzureCogsFormRecognizerTool.html |
b2068362c993-0 | langchain.tools.file_management.list_dir.ListDirectoryTool¶
class langchain.tools.file_management.list_dir.ListDirectoryTool(*, name: str = 'list_directory', description: str = 'List files and directories in a specified folder', args_schema: ~typing.Type[~pydantic.main.BaseModel] = <class 'langchain.tools.file_management.list_dir.DirectoryListingInput'>, return_direct: bool = False, verbose: bool = False, callbacks: ~typing.Optional[~typing.Union[~typing.List[~langchain.callbacks.base.BaseCallbackHandler], ~langchain.callbacks.base.BaseCallbackManager]] = None, callback_manager: ~typing.Optional[~langchain.callbacks.base.BaseCallbackManager] = None, handle_tool_error: ~typing.Optional[~typing.Union[bool, str, ~typing.Callable[[~langchain.tools.base.ToolException], str]]] = False, root_dir: ~typing.Optional[str] = None)[source]¶
Bases: BaseFileToolMixin, BaseTool
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 args_schema: Type[pydantic.main.BaseModel] = <class 'langchain.tools.file_management.list_dir.DirectoryListingInput'>¶
Pydantic model class to validate and parse the tool’s input arguments.
param callback_manager: Optional[BaseCallbackManager] = None¶
Deprecated. Please use callbacks instead.
param callbacks: Callbacks = None¶
Callbacks to be called during tool execution.
param description: str = 'List files and directories in a specified folder'¶
Used to tell the model how/when/why to use the tool.
You can provide few-shot examples as a part of the description.
param handle_tool_error: Optional[Union[bool, str, Callable[[ToolException], str]]] = False¶ | [
5317,
8995,
24029,
9914,
46463,
6556,
4432,
5937,
9494,
7896,
55609,
198,
1058,
8859,
8995,
24029,
9914,
46463,
6556,
4432,
5937,
9494,
7896,
4163,
11,
836,
25,
610,
284,
364,
1638,
15191,
518,
4096,
25,
610,
284,
364,
861,
3626,
323,
29725,
304,
264,
5300,
8695,
518,
2897,
26443,
25,
4056,
90902,
10394,
58,
93,
3368,
67,
8322,
9056,
13316,
1747,
60,
284,
366,
1058,
364,
5317,
8995,
24029,
9914,
46463,
6556,
4432,
55207,
53664,
2566,
6404,
11,
471,
33971,
25,
1845,
284,
3641,
11,
14008,
25,
1845,
284,
3641,
11,
27777,
25,
4056,
90902,
37464,
58,
93,
90902,
10840,
290,
58,
93,
90902,
5937,
58,
93,
5317,
8995,
72134,
9105,
13316,
7646,
3126,
1145,
4056,
5317,
8995,
72134,
9105,
13316,
7646,
2087,
5163,
284,
2290,
11,
4927,
12418,
25,
4056,
90902,
37464,
58,
93,
5317,
8995,
72134,
9105,
13316,
7646,
2087,
60,
284,
2290,
11,
3790,
23627,
4188,
25,
4056,
90902,
37464,
58,
93,
90902,
10840,
290,
58,
2707,
11,
610,
11,
4056,
90902,
28115,
481,
15873,
93,
5317,
8995,
24029,
9105,
25443,
1378,
1145,
610,
5163,
60,
284,
3641,
11,
3789,
4432,
25,
4056,
90902,
37464,
17752,
60,
284,
2290,
6758,
2484,
60,
55609,
198,
33,
2315,
25,
5464,
1738,
7896,
39556,
11,
5464,
7896,
198,
4110,
264,
502,
1646,
555,
23115,
323,
69772,
1988,
828,
505,
16570,
6105,
627,
36120,
54129,
422,
279,
1988,
828,
4250,
387,
16051,
311,
1376,
264,
2764,
1646,
627,
913,
2897,
26443,
25,
4078,
58,
3368,
67,
8322,
9056,
13316,
1747,
60,
284,
366,
1058,
364,
5317,
8995,
24029,
9914,
46463,
6556,
4432,
55207,
53664,
2566,
6404,
55609,
198,
14149,
67,
8322,
1646,
538,
311,
9788,
323,
4820,
279,
5507,
753,
1988,
6105,
627,
913,
4927,
12418,
25,
12536,
58,
4066,
7646,
2087,
60,
284,
2290,
55609,
198,
52444,
13,
5321,
1005,
27777,
4619,
627,
913,
27777,
25,
23499,
82,
284,
2290,
55609,
198,
45561,
311,
387,
2663,
2391,
5507,
11572,
627,
913,
4096,
25,
610,
284,
364,
861,
3626,
323,
29725,
304,
264,
5300,
8695,
6,
55609,
198,
23580,
311,
3371,
279,
1646,
1268,
14,
9493,
14,
35734,
311,
1005,
279,
5507,
627,
2675,
649,
3493,
2478,
64630,
10507,
439,
264,
961,
315,
279,
4096,
627,
913,
3790,
23627,
4188,
25,
12536,
58,
33758,
58,
2707,
11,
610,
11,
54223,
15873,
7896,
1378,
1145,
610,
5163,
60,
284,
3641,
55609
] | https://langchain.readthedocs.io/en/latest/tools/langchain.tools.file_management.list_dir.ListDirectoryTool.html |
b2068362c993-1 | Handle the content of the ToolException thrown.
param name: str = 'list_directory'¶
The unique name of the tool that clearly communicates its purpose.
param return_direct: bool = False¶
Whether to return the tool’s output directly. Setting this to True means
that after the tool is called, the AgentExecutor will stop looping.
param root_dir: Optional[str] = None¶
The final path will be chosen relative to root_dir if specified.
param verbose: bool = False¶
Whether to log the tool’s progress.
__call__(tool_input: str, callbacks: Optional[Union[List[BaseCallbackHandler], BaseCallbackManager]] = None) → str¶
Make tool callable.
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, **kwargs: Any) → Any¶
Run the tool asynchronously.
get_relative_path(file_path: str) → Path¶
Get the relative path, returning an error if unsupported.
validator raise_deprecation » all fields¶
Raise deprecation warning if callback_manager is used.
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, **kwargs: Any) → Any¶
Run the tool.
property args: dict¶
property is_single_input: bool¶
Whether the tool only accepts a single input.
model Config¶
Bases: object
Configuration for this pydantic object.
arbitrary_types_allowed = True¶
extra = 'forbid'¶ | [
7144,
279,
2262,
315,
279,
13782,
1378,
15338,
627,
913,
836,
25,
610,
284,
364,
1638,
15191,
6,
55609,
198,
791,
5016,
836,
315,
279,
5507,
430,
9539,
92606,
1202,
7580,
627,
913,
471,
33971,
25,
1845,
284,
3641,
55609,
198,
25729,
311,
471,
279,
5507,
753,
2612,
6089,
13,
20638,
420,
311,
3082,
3445,
198,
9210,
1306,
279,
5507,
374,
2663,
11,
279,
21372,
26321,
690,
3009,
63687,
627,
913,
3789,
4432,
25,
12536,
17752,
60,
284,
2290,
55609,
198,
791,
1620,
1853,
690,
387,
12146,
8844,
311,
3789,
4432,
422,
5300,
627,
913,
14008,
25,
1845,
284,
3641,
55609,
198,
25729,
311,
1515,
279,
5507,
753,
5208,
627,
565,
6797,
3889,
14506,
6022,
25,
610,
11,
27777,
25,
12536,
58,
33758,
53094,
58,
4066,
7646,
3126,
1145,
5464,
7646,
2087,
5163,
284,
2290,
8,
11651,
610,
55609,
198,
8238,
5507,
42022,
627,
7847,
802,
359,
50050,
6022,
25,
9323,
17752,
11,
30226,
1145,
14008,
25,
12536,
58,
2707,
60,
284,
2290,
11,
1212,
6855,
25,
12536,
17752,
60,
284,
364,
13553,
518,
1933,
25,
12536,
17752,
60,
284,
364,
13553,
518,
27777,
25,
12536,
58,
33758,
53094,
58,
4066,
7646,
3126,
1145,
5464,
7646,
2087,
5163,
284,
2290,
11,
3146,
9872,
25,
5884,
8,
11651,
5884,
55609,
198,
6869,
279,
5507,
68881,
627,
456,
30386,
2703,
4971,
2703,
25,
610,
8,
11651,
8092,
55609,
198,
1991,
279,
8844,
1853,
11,
13758,
459,
1493,
422,
41509,
627,
16503,
4933,
2310,
70693,
4194,
8345,
4194,
682,
5151,
55609,
198,
94201,
409,
70693,
10163,
422,
4927,
12418,
374,
1511,
627,
6236,
50050,
6022,
25,
9323,
17752,
11,
30226,
1145,
14008,
25,
12536,
58,
2707,
60,
284,
2290,
11,
1212,
6855,
25,
12536,
17752,
60,
284,
364,
13553,
518,
1933,
25,
12536,
17752,
60,
284,
364,
13553,
518,
27777,
25,
12536,
58,
33758,
53094,
58,
4066,
7646,
3126,
1145,
5464,
7646,
2087,
5163,
284,
2290,
11,
3146,
9872,
25,
5884,
8,
11651,
5884,
55609,
198,
6869,
279,
5507,
627,
3784,
2897,
25,
6587,
55609,
198,
3784,
374,
20052,
6022,
25,
1845,
55609,
198,
25729,
279,
5507,
1193,
27441,
264,
3254,
1988,
627,
2590,
5649,
55609,
198,
33,
2315,
25,
1665,
198,
7843,
369,
420,
4611,
67,
8322,
1665,
627,
277,
88951,
9962,
43255,
284,
3082,
55609,
198,
15824,
284,
364,
2000,
21301,
6,
55609
] | https://langchain.readthedocs.io/en/latest/tools/langchain.tools.file_management.list_dir.ListDirectoryTool.html |
b3581b161061-0 | langchain.tools.interaction.tool.StdInInquireTool¶
langchain.tools.interaction.tool.StdInInquireTool(*args: Any, **kwargs: Any) → HumanInputRun[source]¶
Tool for asking the user for input. | [
5317,
8995,
24029,
14471,
1335,
21966,
37186,
644,
644,
999,
7896,
55609,
198,
5317,
8995,
24029,
14471,
1335,
21966,
37186,
644,
644,
999,
7896,
4163,
2164,
25,
5884,
11,
3146,
9872,
25,
5884,
8,
11651,
11344,
2566,
6869,
76747,
60,
55609,
198,
7896,
369,
10371,
279,
1217,
369,
1988,
13
] | https://langchain.readthedocs.io/en/latest/tools/langchain.tools.interaction.tool.StdInInquireTool.html |
65bde2a572da-0 | langchain.tools.gmail.send_message.GmailSendMessage¶
class langchain.tools.gmail.send_message.GmailSendMessage(*, name: str = 'send_gmail_message', description: str = 'Use this tool to send email messages. The input is the message, recipents', args_schema: Optional[Type[BaseModel]] = None, return_direct: bool = False, verbose: bool = False, callbacks: Optional[Union[List[BaseCallbackHandler], BaseCallbackManager]] = None, callback_manager: Optional[BaseCallbackManager] = None, handle_tool_error: Optional[Union[bool, str, Callable[[ToolException], str]]] = False, api_resource: Resource = None)[source]¶
Bases: GmailBaseTool
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 api_resource: Resource [Optional]¶
param args_schema: Optional[Type[BaseModel]] = None¶
Pydantic model class to validate and parse the tool’s input arguments.
param callback_manager: Optional[BaseCallbackManager] = None¶
Deprecated. Please use callbacks instead.
param callbacks: Callbacks = None¶
Callbacks to be called during tool execution.
param description: str = 'Use this tool to send email messages. The input is the message, recipents'¶
Used to tell the model how/when/why to use the tool.
You can provide few-shot examples as a part of the description.
param handle_tool_error: Optional[Union[bool, str, Callable[[ToolException], str]]] = False¶
Handle the content of the ToolException thrown.
param name: str = 'send_gmail_message'¶
The unique name of the tool that clearly communicates its purpose.
param return_direct: bool = False¶ | [
5317,
8995,
24029,
73054,
5331,
6598,
1246,
3796,
81963,
55609,
198,
1058,
8859,
8995,
24029,
73054,
5331,
6598,
1246,
3796,
81963,
4163,
11,
836,
25,
610,
284,
364,
6820,
1928,
3796,
6598,
518,
4096,
25,
610,
284,
364,
10464,
420,
5507,
311,
3708,
2613,
6743,
13,
578,
1988,
374,
279,
1984,
11,
25455,
812,
518,
2897,
26443,
25,
12536,
58,
941,
58,
4066,
1747,
5163,
284,
2290,
11,
471,
33971,
25,
1845,
284,
3641,
11,
14008,
25,
1845,
284,
3641,
11,
27777,
25,
12536,
58,
33758,
53094,
58,
4066,
7646,
3126,
1145,
5464,
7646,
2087,
5163,
284,
2290,
11,
4927,
12418,
25,
12536,
58,
4066,
7646,
2087,
60,
284,
2290,
11,
3790,
23627,
4188,
25,
12536,
58,
33758,
58,
2707,
11,
610,
11,
54223,
15873,
7896,
1378,
1145,
610,
5163,
60,
284,
3641,
11,
6464,
18446,
25,
12027,
284,
2290,
6758,
2484,
60,
55609,
198,
33,
2315,
25,
62046,
4066,
7896,
198,
4110,
264,
502,
1646,
555,
23115,
323,
69772,
1988,
828,
505,
16570,
6105,
627,
36120,
54129,
422,
279,
1988,
828,
4250,
387,
16051,
311,
1376,
264,
2764,
1646,
627,
913,
6464,
18446,
25,
12027,
510,
15669,
60,
55609,
198,
913,
2897,
26443,
25,
12536,
58,
941,
58,
4066,
1747,
5163,
284,
2290,
55609,
198,
14149,
67,
8322,
1646,
538,
311,
9788,
323,
4820,
279,
5507,
753,
1988,
6105,
627,
913,
4927,
12418,
25,
12536,
58,
4066,
7646,
2087,
60,
284,
2290,
55609,
198,
52444,
13,
5321,
1005,
27777,
4619,
627,
913,
27777,
25,
23499,
82,
284,
2290,
55609,
198,
45561,
311,
387,
2663,
2391,
5507,
11572,
627,
913,
4096,
25,
610,
284,
364,
10464,
420,
5507,
311,
3708,
2613,
6743,
13,
578,
1988,
374,
279,
1984,
11,
25455,
812,
6,
55609,
198,
23580,
311,
3371,
279,
1646,
1268,
14,
9493,
14,
35734,
311,
1005,
279,
5507,
627,
2675,
649,
3493,
2478,
64630,
10507,
439,
264,
961,
315,
279,
4096,
627,
913,
3790,
23627,
4188,
25,
12536,
58,
33758,
58,
2707,
11,
610,
11,
54223,
15873,
7896,
1378,
1145,
610,
5163,
60,
284,
3641,
55609,
198,
7144,
279,
2262,
315,
279,
13782,
1378,
15338,
627,
913,
836,
25,
610,
284,
364,
6820,
1928,
3796,
6598,
6,
55609,
198,
791,
5016,
836,
315,
279,
5507,
430,
9539,
92606,
1202,
7580,
627,
913,
471,
33971,
25,
1845,
284,
3641,
55609
] | https://langchain.readthedocs.io/en/latest/tools/langchain.tools.gmail.send_message.GmailSendMessage.html |
65bde2a572da-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 verbose: bool = False¶
Whether to log the tool’s progress.
__call__(tool_input: str, callbacks: Optional[Union[List[BaseCallbackHandler], BaseCallbackManager]] = None) → str¶
Make tool callable.
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, **kwargs: Any) → Any¶
Run the tool asynchronously.
classmethod from_api_resource(api_resource: Resource) → GmailBaseTool¶
validator raise_deprecation » all fields¶
Raise deprecation warning if callback_manager is used.
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, **kwargs: Any) → Any¶
Run the tool.
property args: dict¶
property is_single_input: bool¶
Whether the tool only accepts a single input.
model Config¶
Bases: object
Configuration for this pydantic object.
arbitrary_types_allowed = True¶
extra = 'forbid'¶ | [
913,
471,
33971,
25,
1845,
284,
3641,
55609,
198,
25729,
311,
471,
279,
5507,
753,
2612,
6089,
13,
20638,
420,
311,
3082,
3445,
198,
9210,
1306,
279,
5507,
374,
2663,
11,
279,
21372,
26321,
690,
3009,
63687,
627,
913,
14008,
25,
1845,
284,
3641,
55609,
198,
25729,
311,
1515,
279,
5507,
753,
5208,
627,
565,
6797,
3889,
14506,
6022,
25,
610,
11,
27777,
25,
12536,
58,
33758,
53094,
58,
4066,
7646,
3126,
1145,
5464,
7646,
2087,
5163,
284,
2290,
8,
11651,
610,
55609,
198,
8238,
5507,
42022,
627,
7847,
802,
359,
50050,
6022,
25,
9323,
17752,
11,
30226,
1145,
14008,
25,
12536,
58,
2707,
60,
284,
2290,
11,
1212,
6855,
25,
12536,
17752,
60,
284,
364,
13553,
518,
1933,
25,
12536,
17752,
60,
284,
364,
13553,
518,
27777,
25,
12536,
58,
33758,
53094,
58,
4066,
7646,
3126,
1145,
5464,
7646,
2087,
5163,
284,
2290,
11,
3146,
9872,
25,
5884,
8,
11651,
5884,
55609,
198,
6869,
279,
5507,
68881,
627,
27853,
505,
11959,
18446,
25865,
18446,
25,
12027,
8,
11651,
62046,
4066,
7896,
55609,
198,
16503,
4933,
2310,
70693,
4194,
8345,
4194,
682,
5151,
55609,
198,
94201,
409,
70693,
10163,
422,
4927,
12418,
374,
1511,
627,
6236,
50050,
6022,
25,
9323,
17752,
11,
30226,
1145,
14008,
25,
12536,
58,
2707,
60,
284,
2290,
11,
1212,
6855,
25,
12536,
17752,
60,
284,
364,
13553,
518,
1933,
25,
12536,
17752,
60,
284,
364,
13553,
518,
27777,
25,
12536,
58,
33758,
53094,
58,
4066,
7646,
3126,
1145,
5464,
7646,
2087,
5163,
284,
2290,
11,
3146,
9872,
25,
5884,
8,
11651,
5884,
55609,
198,
6869,
279,
5507,
627,
3784,
2897,
25,
6587,
55609,
198,
3784,
374,
20052,
6022,
25,
1845,
55609,
198,
25729,
279,
5507,
1193,
27441,
264,
3254,
1988,
627,
2590,
5649,
55609,
198,
33,
2315,
25,
1665,
198,
7843,
369,
420,
4611,
67,
8322,
1665,
627,
277,
88951,
9962,
43255,
284,
3082,
55609,
198,
15824,
284,
364,
2000,
21301,
6,
55609
] | https://langchain.readthedocs.io/en/latest/tools/langchain.tools.gmail.send_message.GmailSendMessage.html |
e799f2dbf38f-0 | langchain.tools.requests.tool.RequestsPostTool¶
class langchain.tools.requests.tool.RequestsPostTool(*, name: str = 'requests_post', description: str = 'Use this when you want to POST to a website.\n Input should be a json string with two keys: "url" and "data".\n The value of "url" should be a string, and the value of "data" should be a dictionary of \n key-value pairs you want to POST to the url.\n Be careful to always use double quotes for strings in the json string\n The output will be the text response of the POST request.\n ', args_schema: Optional[Type[BaseModel]] = None, return_direct: bool = False, verbose: bool = False, callbacks: Optional[Union[List[BaseCallbackHandler], BaseCallbackManager]] = None, callback_manager: Optional[BaseCallbackManager] = None, handle_tool_error: Optional[Union[bool, str, Callable[[ToolException], str]]] = False, requests_wrapper: TextRequestsWrapper)[source]¶
Bases: BaseRequestsTool, BaseTool
Tool for making a POST 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 be parsed to form a valid model.
param args_schema: Optional[Type[BaseModel]] = None¶
Pydantic model class to validate and parse the tool’s input arguments.
param callback_manager: Optional[BaseCallbackManager] = None¶
Deprecated. Please use callbacks instead.
param callbacks: Callbacks = None¶
Callbacks to be called during tool execution. | [
5317,
8995,
24029,
68771,
21966,
9856,
82,
4226,
7896,
55609,
198,
1058,
8859,
8995,
24029,
68771,
21966,
9856,
82,
4226,
7896,
4163,
11,
836,
25,
610,
284,
364,
37342,
6467,
518,
4096,
25,
610,
284,
364,
10464,
420,
994,
499,
1390,
311,
13165,
311,
264,
3997,
7255,
77,
46493,
5688,
1288,
387,
264,
3024,
925,
449,
1403,
7039,
25,
330,
1103,
1,
323,
330,
695,
3343,
59,
77,
46493,
578,
907,
315,
330,
1103,
1,
1288,
387,
264,
925,
11,
323,
279,
907,
315,
330,
695,
1,
1288,
387,
264,
11240,
315,
1144,
77,
46493,
1401,
19625,
13840,
499,
1390,
311,
13165,
311,
279,
2576,
7255,
77,
46493,
2893,
16994,
311,
2744,
1005,
2033,
17637,
369,
9246,
304,
279,
3024,
925,
1734,
46493,
578,
2612,
690,
387,
279,
1495,
2077,
315,
279,
13165,
1715,
7255,
77,
46493,
6752,
2897,
26443,
25,
12536,
58,
941,
58,
4066,
1747,
5163,
284,
2290,
11,
471,
33971,
25,
1845,
284,
3641,
11,
14008,
25,
1845,
284,
3641,
11,
27777,
25,
12536,
58,
33758,
53094,
58,
4066,
7646,
3126,
1145,
5464,
7646,
2087,
5163,
284,
2290,
11,
4927,
12418,
25,
12536,
58,
4066,
7646,
2087,
60,
284,
2290,
11,
3790,
23627,
4188,
25,
12536,
58,
33758,
58,
2707,
11,
610,
11,
54223,
15873,
7896,
1378,
1145,
610,
5163,
60,
284,
3641,
11,
7540,
24474,
25,
2991,
36395,
11803,
6758,
2484,
60,
55609,
198,
33,
2315,
25,
5464,
36395,
7896,
11,
5464,
7896,
198,
7896,
369,
3339,
264,
13165,
1715,
311,
459,
5446,
15233,
627,
4110,
264,
502,
1646,
555,
23115,
323,
69772,
1988,
828,
505,
16570,
6105,
627,
36120,
54129,
422,
279,
1988,
828,
4250,
387,
16051,
311,
1376,
264,
2764,
1646,
627,
913,
2897,
26443,
25,
12536,
58,
941,
58,
4066,
1747,
5163,
284,
2290,
55609,
198,
14149,
67,
8322,
1646,
538,
311,
9788,
323,
4820,
279,
5507,
753,
1988,
6105,
627,
913,
4927,
12418,
25,
12536,
58,
4066,
7646,
2087,
60,
284,
2290,
55609,
198,
52444,
13,
5321,
1005,
27777,
4619,
627,
913,
27777,
25,
23499,
82,
284,
2290,
55609,
198,
45561,
311,
387,
2663,
2391,
5507,
11572,
13
] | https://langchain.readthedocs.io/en/latest/tools/langchain.tools.requests.tool.RequestsPostTool.html |
e799f2dbf38f-1 | param callbacks: Callbacks = None¶
Callbacks to be called during tool execution.
param description: str = 'Use this when you want to POST to a website.\n Input should be a json string with two keys: "url" and "data".\n The value of "url" should be a string, and the value of "data" should be a dictionary of \n key-value pairs you want to POST to the url.\n Be careful to always use double quotes for strings in the json string\n The output will be the text response of the POST request.\n '¶
Used to tell the model how/when/why to use the tool.
You can provide few-shot examples as a part of the description.
param handle_tool_error: Optional[Union[bool, str, Callable[[ToolException], str]]] = False¶
Handle the content of the ToolException thrown.
param name: str = 'requests_post'¶
The unique name of the tool that clearly communicates its purpose.
param requests_wrapper: langchain.requests.TextRequestsWrapper [Required]¶
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 verbose: bool = False¶
Whether to log the tool’s progress.
__call__(tool_input: str, callbacks: Optional[Union[List[BaseCallbackHandler], BaseCallbackManager]] = None) → str¶
Make tool callable.
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, **kwargs: Any) → Any¶
Run the tool asynchronously. | [
913,
27777,
25,
23499,
82,
284,
2290,
55609,
198,
45561,
311,
387,
2663,
2391,
5507,
11572,
627,
913,
4096,
25,
610,
284,
364,
10464,
420,
994,
499,
1390,
311,
13165,
311,
264,
3997,
7255,
77,
46493,
5688,
1288,
387,
264,
3024,
925,
449,
1403,
7039,
25,
330,
1103,
1,
323,
330,
695,
3343,
59,
77,
46493,
578,
907,
315,
330,
1103,
1,
1288,
387,
264,
925,
11,
323,
279,
907,
315,
330,
695,
1,
1288,
387,
264,
11240,
315,
1144,
77,
46493,
1401,
19625,
13840,
499,
1390,
311,
13165,
311,
279,
2576,
7255,
77,
46493,
2893,
16994,
311,
2744,
1005,
2033,
17637,
369,
9246,
304,
279,
3024,
925,
1734,
46493,
578,
2612,
690,
387,
279,
1495,
2077,
315,
279,
13165,
1715,
7255,
77,
46493,
364,
55609,
198,
23580,
311,
3371,
279,
1646,
1268,
14,
9493,
14,
35734,
311,
1005,
279,
5507,
627,
2675,
649,
3493,
2478,
64630,
10507,
439,
264,
961,
315,
279,
4096,
627,
913,
3790,
23627,
4188,
25,
12536,
58,
33758,
58,
2707,
11,
610,
11,
54223,
15873,
7896,
1378,
1145,
610,
5163,
60,
284,
3641,
55609,
198,
7144,
279,
2262,
315,
279,
13782,
1378,
15338,
627,
913,
836,
25,
610,
284,
364,
37342,
6467,
6,
55609,
198,
791,
5016,
836,
315,
279,
5507,
430,
9539,
92606,
1202,
7580,
627,
913,
7540,
24474,
25,
8859,
8995,
68771,
2021,
36395,
11803,
510,
8327,
60,
55609,
198,
913,
471,
33971,
25,
1845,
284,
3641,
55609,
198,
25729,
311,
471,
279,
5507,
753,
2612,
6089,
13,
20638,
420,
311,
3082,
3445,
198,
9210,
1306,
279,
5507,
374,
2663,
11,
279,
21372,
26321,
690,
3009,
63687,
627,
913,
14008,
25,
1845,
284,
3641,
55609,
198,
25729,
311,
1515,
279,
5507,
753,
5208,
627,
565,
6797,
3889,
14506,
6022,
25,
610,
11,
27777,
25,
12536,
58,
33758,
53094,
58,
4066,
7646,
3126,
1145,
5464,
7646,
2087,
5163,
284,
2290,
8,
11651,
610,
55609,
198,
8238,
5507,
42022,
627,
7847,
802,
359,
50050,
6022,
25,
9323,
17752,
11,
30226,
1145,
14008,
25,
12536,
58,
2707,
60,
284,
2290,
11,
1212,
6855,
25,
12536,
17752,
60,
284,
364,
13553,
518,
1933,
25,
12536,
17752,
60,
284,
364,
13553,
518,
27777,
25,
12536,
58,
33758,
53094,
58,
4066,
7646,
3126,
1145,
5464,
7646,
2087,
5163,
284,
2290,
11,
3146,
9872,
25,
5884,
8,
11651,
5884,
55609,
198,
6869,
279,
5507,
68881,
13
] | https://langchain.readthedocs.io/en/latest/tools/langchain.tools.requests.tool.RequestsPostTool.html |
e799f2dbf38f-2 | Run the tool asynchronously.
validator raise_deprecation » all fields¶
Raise deprecation warning if callback_manager is used.
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, **kwargs: Any) → Any¶
Run the tool.
property args: dict¶
property is_single_input: bool¶
Whether the tool only accepts a single input.
model Config¶
Bases: object
Configuration for this pydantic object.
arbitrary_types_allowed = True¶
extra = 'forbid'¶ | [
6869,
279,
5507,
68881,
627,
16503,
4933,
2310,
70693,
4194,
8345,
4194,
682,
5151,
55609,
198,
94201,
409,
70693,
10163,
422,
4927,
12418,
374,
1511,
627,
6236,
50050,
6022,
25,
9323,
17752,
11,
30226,
1145,
14008,
25,
12536,
58,
2707,
60,
284,
2290,
11,
1212,
6855,
25,
12536,
17752,
60,
284,
364,
13553,
518,
1933,
25,
12536,
17752,
60,
284,
364,
13553,
518,
27777,
25,
12536,
58,
33758,
53094,
58,
4066,
7646,
3126,
1145,
5464,
7646,
2087,
5163,
284,
2290,
11,
3146,
9872,
25,
5884,
8,
11651,
5884,
55609,
198,
6869,
279,
5507,
627,
3784,
2897,
25,
6587,
55609,
198,
3784,
374,
20052,
6022,
25,
1845,
55609,
198,
25729,
279,
5507,
1193,
27441,
264,
3254,
1988,
627,
2590,
5649,
55609,
198,
33,
2315,
25,
1665,
198,
7843,
369,
420,
4611,
67,
8322,
1665,
627,
277,
88951,
9962,
43255,
284,
3082,
55609,
198,
15824,
284,
364,
2000,
21301,
6,
55609
] | https://langchain.readthedocs.io/en/latest/tools/langchain.tools.requests.tool.RequestsPostTool.html |
a0a0db516de2-0 | langchain.tools.azure_cognitive_services.speech2text.AzureCogsSpeech2TextTool¶
class langchain.tools.azure_cognitive_services.speech2text.AzureCogsSpeech2TextTool(*, name: str = 'azure_cognitive_services_speech2text', description: str = 'A wrapper around Azure Cognitive Services Speech2Text. Useful for when you need to transcribe audio to text. Input should be a url to an audio file.', args_schema: Optional[Type[BaseModel]] = None, return_direct: bool = False, verbose: bool = False, callbacks: Optional[Union[List[BaseCallbackHandler], BaseCallbackManager]] = None, callback_manager: Optional[BaseCallbackManager] = None, handle_tool_error: Optional[Union[bool, str, Callable[[ToolException], str]]] = False, azure_cogs_key: str = '', azure_cogs_region: str = '', speech_language: str = 'en-US', speech_config: Any = None)[source]¶
Bases: BaseTool
Tool that queries the Azure Cognitive Services Speech2Text API.
In order to set this up, follow instructions at:
https://learn.microsoft.com/en-us/azure/cognitive-services/speech-service/get-started-speech-to-text?pivots=programming-language-python
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 args_schema: Optional[Type[BaseModel]] = None¶
Pydantic model class to validate and parse the tool’s input arguments.
param callback_manager: Optional[BaseCallbackManager] = None¶
Deprecated. Please use callbacks instead.
param callbacks: Callbacks = None¶
Callbacks to be called during tool execution. | [
5317,
8995,
24029,
71340,
669,
51549,
40946,
516,
40686,
17,
1342,
58927,
34,
27403,
56725,
17,
1199,
7896,
55609,
198,
1058,
8859,
8995,
24029,
71340,
669,
51549,
40946,
516,
40686,
17,
1342,
58927,
34,
27403,
56725,
17,
1199,
7896,
4163,
11,
836,
25,
610,
284,
364,
40595,
669,
51549,
40946,
646,
40686,
17,
1342,
518,
4096,
25,
610,
284,
364,
32,
13564,
2212,
35219,
73235,
8471,
39841,
17,
1199,
13,
51612,
369,
994,
499,
1205,
311,
1380,
3191,
7855,
311,
1495,
13,
5688,
1288,
387,
264,
2576,
311,
459,
7855,
1052,
16045,
2897,
26443,
25,
12536,
58,
941,
58,
4066,
1747,
5163,
284,
2290,
11,
471,
33971,
25,
1845,
284,
3641,
11,
14008,
25,
1845,
284,
3641,
11,
27777,
25,
12536,
58,
33758,
53094,
58,
4066,
7646,
3126,
1145,
5464,
7646,
2087,
5163,
284,
2290,
11,
4927,
12418,
25,
12536,
58,
4066,
7646,
2087,
60,
284,
2290,
11,
3790,
23627,
4188,
25,
12536,
58,
33758,
58,
2707,
11,
610,
11,
54223,
15873,
7896,
1378,
1145,
610,
5163,
60,
284,
3641,
11,
77630,
669,
27403,
3173,
25,
610,
284,
9158,
77630,
669,
27403,
21276,
25,
610,
284,
9158,
8982,
30121,
25,
610,
284,
364,
268,
33440,
518,
8982,
5445,
25,
5884,
284,
2290,
6758,
2484,
60,
55609,
198,
33,
2315,
25,
5464,
7896,
198,
7896,
430,
20126,
279,
35219,
73235,
8471,
39841,
17,
1199,
5446,
627,
644,
2015,
311,
743,
420,
709,
11,
1833,
11470,
520,
512,
2485,
1129,
12964,
28719,
916,
13920,
26766,
14,
40595,
2971,
51549,
59392,
2754,
40686,
24358,
24183,
19471,
291,
1355,
40686,
4791,
9529,
91242,
344,
2469,
28,
92726,
44658,
73029,
198,
4110,
264,
502,
1646,
555,
23115,
323,
69772,
1988,
828,
505,
16570,
6105,
627,
36120,
54129,
422,
279,
1988,
828,
4250,
387,
16051,
311,
1376,
264,
2764,
1646,
627,
913,
2897,
26443,
25,
12536,
58,
941,
58,
4066,
1747,
5163,
284,
2290,
55609,
198,
14149,
67,
8322,
1646,
538,
311,
9788,
323,
4820,
279,
5507,
753,
1988,
6105,
627,
913,
4927,
12418,
25,
12536,
58,
4066,
7646,
2087,
60,
284,
2290,
55609,
198,
52444,
13,
5321,
1005,
27777,
4619,
627,
913,
27777,
25,
23499,
82,
284,
2290,
55609,
198,
45561,
311,
387,
2663,
2391,
5507,
11572,
13
] | https://langchain.readthedocs.io/en/latest/tools/langchain.tools.azure_cognitive_services.speech2text.AzureCogsSpeech2TextTool.html |
a0a0db516de2-1 | param callbacks: Callbacks = None¶
Callbacks to be called during tool execution.
param description: str = 'A wrapper around Azure Cognitive Services Speech2Text. Useful for when you need to transcribe audio to text. Input should be a url to an audio file.'¶
Used to tell the model how/when/why to use the tool.
You can provide few-shot examples as a part of the description.
param handle_tool_error: Optional[Union[bool, str, Callable[[ToolException], str]]] = False¶
Handle the content of the ToolException thrown.
param name: str = 'azure_cognitive_services_speech2text'¶
The unique name of the tool that clearly communicates its purpose.
param return_direct: bool = False¶
Whether to return the tool’s output directly. Setting this to True means
that after the tool is called, the AgentExecutor will stop looping.
param verbose: bool = False¶
Whether to log the tool’s progress.
__call__(tool_input: str, callbacks: Optional[Union[List[BaseCallbackHandler], BaseCallbackManager]] = None) → str¶
Make tool callable.
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, **kwargs: Any) → Any¶
Run the tool asynchronously.
validator raise_deprecation » all fields¶
Raise deprecation warning if callback_manager is used. | [
913,
27777,
25,
23499,
82,
284,
2290,
55609,
198,
45561,
311,
387,
2663,
2391,
5507,
11572,
627,
913,
4096,
25,
610,
284,
364,
32,
13564,
2212,
35219,
73235,
8471,
39841,
17,
1199,
13,
51612,
369,
994,
499,
1205,
311,
1380,
3191,
7855,
311,
1495,
13,
5688,
1288,
387,
264,
2576,
311,
459,
7855,
1052,
3238,
55609,
198,
23580,
311,
3371,
279,
1646,
1268,
14,
9493,
14,
35734,
311,
1005,
279,
5507,
627,
2675,
649,
3493,
2478,
64630,
10507,
439,
264,
961,
315,
279,
4096,
627,
913,
3790,
23627,
4188,
25,
12536,
58,
33758,
58,
2707,
11,
610,
11,
54223,
15873,
7896,
1378,
1145,
610,
5163,
60,
284,
3641,
55609,
198,
7144,
279,
2262,
315,
279,
13782,
1378,
15338,
627,
913,
836,
25,
610,
284,
364,
40595,
669,
51549,
40946,
646,
40686,
17,
1342,
6,
55609,
198,
791,
5016,
836,
315,
279,
5507,
430,
9539,
92606,
1202,
7580,
627,
913,
471,
33971,
25,
1845,
284,
3641,
55609,
198,
25729,
311,
471,
279,
5507,
753,
2612,
6089,
13,
20638,
420,
311,
3082,
3445,
198,
9210,
1306,
279,
5507,
374,
2663,
11,
279,
21372,
26321,
690,
3009,
63687,
627,
913,
14008,
25,
1845,
284,
3641,
55609,
198,
25729,
311,
1515,
279,
5507,
753,
5208,
627,
565,
6797,
3889,
14506,
6022,
25,
610,
11,
27777,
25,
12536,
58,
33758,
53094,
58,
4066,
7646,
3126,
1145,
5464,
7646,
2087,
5163,
284,
2290,
8,
11651,
610,
55609,
198,
8238,
5507,
42022,
627,
7847,
802,
359,
50050,
6022,
25,
9323,
17752,
11,
30226,
1145,
14008,
25,
12536,
58,
2707,
60,
284,
2290,
11,
1212,
6855,
25,
12536,
17752,
60,
284,
364,
13553,
518,
1933,
25,
12536,
17752,
60,
284,
364,
13553,
518,
27777,
25,
12536,
58,
33758,
53094,
58,
4066,
7646,
3126,
1145,
5464,
7646,
2087,
5163,
284,
2290,
11,
3146,
9872,
25,
5884,
8,
11651,
5884,
55609,
198,
6869,
279,
5507,
68881,
627,
16503,
4933,
2310,
70693,
4194,
8345,
4194,
682,
5151,
55609,
198,
94201,
409,
70693,
10163,
422,
4927,
12418,
374,
1511,
13
] | https://langchain.readthedocs.io/en/latest/tools/langchain.tools.azure_cognitive_services.speech2text.AzureCogsSpeech2TextTool.html |
a0a0db516de2-2 | Raise deprecation warning if callback_manager is used.
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, **kwargs: Any) → Any¶
Run the tool.
validator validate_environment » all fields[source]¶
Validate that api key and endpoint exists in environment.
property args: dict¶
property is_single_input: bool¶
Whether the tool only accepts a single input.
model Config¶
Bases: object
Configuration for this pydantic object.
arbitrary_types_allowed = True¶
extra = 'forbid'¶ | [
94201,
409,
70693,
10163,
422,
4927,
12418,
374,
1511,
627,
6236,
50050,
6022,
25,
9323,
17752,
11,
30226,
1145,
14008,
25,
12536,
58,
2707,
60,
284,
2290,
11,
1212,
6855,
25,
12536,
17752,
60,
284,
364,
13553,
518,
1933,
25,
12536,
17752,
60,
284,
364,
13553,
518,
27777,
25,
12536,
58,
33758,
53094,
58,
4066,
7646,
3126,
1145,
5464,
7646,
2087,
5163,
284,
2290,
11,
3146,
9872,
25,
5884,
8,
11651,
5884,
55609,
198,
6869,
279,
5507,
627,
16503,
9788,
52874,
4194,
8345,
4194,
682,
5151,
76747,
60,
55609,
198,
18409,
430,
6464,
1401,
323,
15233,
6866,
304,
4676,
627,
3784,
2897,
25,
6587,
55609,
198,
3784,
374,
20052,
6022,
25,
1845,
55609,
198,
25729,
279,
5507,
1193,
27441,
264,
3254,
1988,
627,
2590,
5649,
55609,
198,
33,
2315,
25,
1665,
198,
7843,
369,
420,
4611,
67,
8322,
1665,
627,
277,
88951,
9962,
43255,
284,
3082,
55609,
198,
15824,
284,
364,
2000,
21301,
6,
55609
] | https://langchain.readthedocs.io/en/latest/tools/langchain.tools.azure_cognitive_services.speech2text.AzureCogsSpeech2TextTool.html |
203c14b30a67-0 | langchain.tools.sql_database.tool.QuerySQLDataBaseTool¶
class langchain.tools.sql_database.tool.QuerySQLDataBaseTool(*, name: str = 'sql_db_query', description: str = '\n Input to this tool is a detailed and correct SQL query, output is a result from the database.\n If the query is not correct, an error message will be returned.\n If an error is returned, rewrite the query, check the query, and try again.\n ', args_schema: Optional[Type[BaseModel]] = None, return_direct: bool = False, verbose: bool = False, callbacks: Optional[Union[List[BaseCallbackHandler], BaseCallbackManager]] = None, callback_manager: Optional[BaseCallbackManager] = None, handle_tool_error: Optional[Union[bool, str, Callable[[ToolException], str]]] = False, db: SQLDatabase)[source]¶
Bases: BaseSQLDatabaseTool, BaseTool
Tool for querying a SQL database.
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 args_schema: Optional[Type[BaseModel]] = None¶
Pydantic model class to validate and parse the tool’s input arguments.
param callback_manager: Optional[BaseCallbackManager] = None¶
Deprecated. Please use callbacks instead.
param callbacks: Callbacks = None¶
Callbacks to be called during tool execution.
param db: langchain.sql_database.SQLDatabase [Required]¶
param description: str = '\n Input to this tool is a detailed and correct SQL query, output is a result from the database.\n If the query is not correct, an error message will be returned.\n If an error is returned, rewrite the query, check the query, and try again.\n '¶ | [
5317,
8995,
24029,
10251,
28441,
21966,
16060,
6827,
83887,
7896,
55609,
198,
1058,
8859,
8995,
24029,
10251,
28441,
21966,
16060,
6827,
83887,
7896,
4163,
11,
836,
25,
610,
284,
364,
3628,
8856,
5857,
518,
4096,
25,
610,
284,
5307,
77,
46493,
5688,
311,
420,
5507,
374,
264,
11944,
323,
4495,
8029,
3319,
11,
2612,
374,
264,
1121,
505,
279,
4729,
7255,
77,
46493,
1442,
279,
3319,
374,
539,
4495,
11,
459,
1493,
1984,
690,
387,
6052,
7255,
77,
46493,
1442,
459,
1493,
374,
6052,
11,
18622,
279,
3319,
11,
1817,
279,
3319,
11,
323,
1456,
1578,
7255,
77,
46493,
6752,
2897,
26443,
25,
12536,
58,
941,
58,
4066,
1747,
5163,
284,
2290,
11,
471,
33971,
25,
1845,
284,
3641,
11,
14008,
25,
1845,
284,
3641,
11,
27777,
25,
12536,
58,
33758,
53094,
58,
4066,
7646,
3126,
1145,
5464,
7646,
2087,
5163,
284,
2290,
11,
4927,
12418,
25,
12536,
58,
4066,
7646,
2087,
60,
284,
2290,
11,
3790,
23627,
4188,
25,
12536,
58,
33758,
58,
2707,
11,
610,
11,
54223,
15873,
7896,
1378,
1145,
610,
5163,
60,
284,
3641,
11,
3000,
25,
8029,
6116,
6758,
2484,
60,
55609,
198,
33,
2315,
25,
5464,
6827,
6116,
7896,
11,
5464,
7896,
198,
7896,
369,
82198,
264,
8029,
4729,
627,
4110,
264,
502,
1646,
555,
23115,
323,
69772,
1988,
828,
505,
16570,
6105,
627,
36120,
54129,
422,
279,
1988,
828,
4250,
387,
16051,
311,
1376,
264,
2764,
1646,
627,
913,
2897,
26443,
25,
12536,
58,
941,
58,
4066,
1747,
5163,
284,
2290,
55609,
198,
14149,
67,
8322,
1646,
538,
311,
9788,
323,
4820,
279,
5507,
753,
1988,
6105,
627,
913,
4927,
12418,
25,
12536,
58,
4066,
7646,
2087,
60,
284,
2290,
55609,
198,
52444,
13,
5321,
1005,
27777,
4619,
627,
913,
27777,
25,
23499,
82,
284,
2290,
55609,
198,
45561,
311,
387,
2663,
2391,
5507,
11572,
627,
913,
3000,
25,
8859,
8995,
10251,
28441,
26151,
6116,
510,
8327,
60,
55609,
198,
913,
4096,
25,
610,
284,
5307,
77,
46493,
5688,
311,
420,
5507,
374,
264,
11944,
323,
4495,
8029,
3319,
11,
2612,
374,
264,
1121,
505,
279,
4729,
7255,
77,
46493,
1442,
279,
3319,
374,
539,
4495,
11,
459,
1493,
1984,
690,
387,
6052,
7255,
77,
46493,
1442,
459,
1493,
374,
6052,
11,
18622,
279,
3319,
11,
1817,
279,
3319,
11,
323,
1456,
1578,
7255,
77,
46493,
364,
55609
] | https://langchain.readthedocs.io/en/latest/tools/langchain.tools.sql_database.tool.QuerySQLDataBaseTool.html |
203c14b30a67-1 | Used to tell the model how/when/why to use the tool.
You can provide few-shot examples as a part of the description.
param handle_tool_error: Optional[Union[bool, str, Callable[[ToolException], str]]] = False¶
Handle the content of the ToolException thrown.
param name: str = 'sql_db_query'¶
The unique name of the tool that clearly communicates its purpose.
param return_direct: bool = False¶
Whether to return the tool’s output directly. Setting this to True means
that after the tool is called, the AgentExecutor will stop looping.
param verbose: bool = False¶
Whether to log the tool’s progress.
__call__(tool_input: str, callbacks: Optional[Union[List[BaseCallbackHandler], BaseCallbackManager]] = None) → str¶
Make tool callable.
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, **kwargs: Any) → Any¶
Run the tool asynchronously.
validator raise_deprecation » all fields¶
Raise deprecation warning if callback_manager is used.
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, **kwargs: Any) → Any¶
Run the tool.
property args: dict¶
property is_single_input: bool¶
Whether the tool only accepts a single input.
model Config¶
Bases: Config
Configuration for this pydantic object.
arbitrary_types_allowed = True¶ | [
23580,
311,
3371,
279,
1646,
1268,
14,
9493,
14,
35734,
311,
1005,
279,
5507,
627,
2675,
649,
3493,
2478,
64630,
10507,
439,
264,
961,
315,
279,
4096,
627,
913,
3790,
23627,
4188,
25,
12536,
58,
33758,
58,
2707,
11,
610,
11,
54223,
15873,
7896,
1378,
1145,
610,
5163,
60,
284,
3641,
55609,
198,
7144,
279,
2262,
315,
279,
13782,
1378,
15338,
627,
913,
836,
25,
610,
284,
364,
3628,
8856,
5857,
6,
55609,
198,
791,
5016,
836,
315,
279,
5507,
430,
9539,
92606,
1202,
7580,
627,
913,
471,
33971,
25,
1845,
284,
3641,
55609,
198,
25729,
311,
471,
279,
5507,
753,
2612,
6089,
13,
20638,
420,
311,
3082,
3445,
198,
9210,
1306,
279,
5507,
374,
2663,
11,
279,
21372,
26321,
690,
3009,
63687,
627,
913,
14008,
25,
1845,
284,
3641,
55609,
198,
25729,
311,
1515,
279,
5507,
753,
5208,
627,
565,
6797,
3889,
14506,
6022,
25,
610,
11,
27777,
25,
12536,
58,
33758,
53094,
58,
4066,
7646,
3126,
1145,
5464,
7646,
2087,
5163,
284,
2290,
8,
11651,
610,
55609,
198,
8238,
5507,
42022,
627,
7847,
802,
359,
50050,
6022,
25,
9323,
17752,
11,
30226,
1145,
14008,
25,
12536,
58,
2707,
60,
284,
2290,
11,
1212,
6855,
25,
12536,
17752,
60,
284,
364,
13553,
518,
1933,
25,
12536,
17752,
60,
284,
364,
13553,
518,
27777,
25,
12536,
58,
33758,
53094,
58,
4066,
7646,
3126,
1145,
5464,
7646,
2087,
5163,
284,
2290,
11,
3146,
9872,
25,
5884,
8,
11651,
5884,
55609,
198,
6869,
279,
5507,
68881,
627,
16503,
4933,
2310,
70693,
4194,
8345,
4194,
682,
5151,
55609,
198,
94201,
409,
70693,
10163,
422,
4927,
12418,
374,
1511,
627,
6236,
50050,
6022,
25,
9323,
17752,
11,
30226,
1145,
14008,
25,
12536,
58,
2707,
60,
284,
2290,
11,
1212,
6855,
25,
12536,
17752,
60,
284,
364,
13553,
518,
1933,
25,
12536,
17752,
60,
284,
364,
13553,
518,
27777,
25,
12536,
58,
33758,
53094,
58,
4066,
7646,
3126,
1145,
5464,
7646,
2087,
5163,
284,
2290,
11,
3146,
9872,
25,
5884,
8,
11651,
5884,
55609,
198,
6869,
279,
5507,
627,
3784,
2897,
25,
6587,
55609,
198,
3784,
374,
20052,
6022,
25,
1845,
55609,
198,
25729,
279,
5507,
1193,
27441,
264,
3254,
1988,
627,
2590,
5649,
55609,
198,
33,
2315,
25,
5649,
198,
7843,
369,
420,
4611,
67,
8322,
1665,
627,
277,
88951,
9962,
43255,
284,
3082,
55609
] | https://langchain.readthedocs.io/en/latest/tools/langchain.tools.sql_database.tool.QuerySQLDataBaseTool.html |
203c14b30a67-2 | Configuration for this pydantic object.
arbitrary_types_allowed = True¶
extra = 'forbid'¶ | [
7843,
369,
420,
4611,
67,
8322,
1665,
627,
277,
88951,
9962,
43255,
284,
3082,
55609,
198,
15824,
284,
364,
2000,
21301,
6,
55609
] | https://langchain.readthedocs.io/en/latest/tools/langchain.tools.sql_database.tool.QuerySQLDataBaseTool.html |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.