id stringlengths 14 16 | text stringlengths 31 2.41k | source stringlengths 53 121 |
|---|---|---|
8e7952d3fdad-23 | The unique name of the tool that clearly communicates its purpose.
class langchain.tools.GmailGetMessage(*, name='get_gmail_message', description='Use this tool to fetch an email by message ID. Returns the thread ID, snipet, body, subject, and sender.', args_schema=<class 'langchain.tools.gmail.get_message.SearchArgsSc... | https://api.python.langchain.com/en/latest/modules/tools.html |
8e7952d3fdad-24 | The unique name of the tool that clearly communicates its purpose.
class langchain.tools.GmailGetThread(*, name='get_gmail_thread', description='Use this tool to search for email messages. The input must be a valid Gmail query. The output is a JSON list of messages.', args_schema=<class 'langchain.tools.gmail.get_threa... | https://api.python.langchain.com/en/latest/modules/tools.html |
8e7952d3fdad-25 | The unique name of the tool that clearly communicates its purpose.
class langchain.tools.GmailSearch(*, name='search_gmail', description='Use this tool to search for email messages or threads. The input must be a valid Gmail query. The output is a JSON list of the requested resource.', args_schema=<class 'langchain.too... | https://api.python.langchain.com/en/latest/modules/tools.html |
8e7952d3fdad-26 | The unique name of the tool that clearly communicates its purpose.
class langchain.tools.GmailSendMessage(*, name='send_gmail_message', description='Use this tool to send email messages. The input is the message, recipents', args_schema=None, return_direct=False, verbose=False, callbacks=None, callback_manager=None, ha... | https://api.python.langchain.com/en/latest/modules/tools.html |
8e7952d3fdad-27 | Bases: langchain.tools.base.BaseTool
Tool that adds the capability to query the Google places API.
Parameters
name (str) β
description (str) β
args_schema (Type[pydantic.main.BaseModel]) β
return_direct (bool) β
verbose (bool) β
callbacks (Optional[Union[List[langchain.callbacks.base.BaseCallbackHandler], langchai... | https://api.python.langchain.com/en/latest/modules/tools.html |
8e7952d3fdad-28 | return_direct (bool) β
verbose (bool) β
callbacks (Optional[Union[List[langchain.callbacks.base.BaseCallbackHandler], langchain.callbacks.base.BaseCallbackManager]]) β
callback_manager (Optional[langchain.callbacks.base.BaseCallbackManager]) β
handle_tool_error (Optional[Union[bool, str, Callable[[langchain.tools.b... | https://api.python.langchain.com/en/latest/modules/tools.html |
8e7952d3fdad-29 | attribute api_wrapper: langchain.utilities.google_search.GoogleSearchAPIWrapper [Required]ο
class langchain.tools.GoogleSerperResults(*, name='Google Serrper Results JSON', description='A low-cost Google Search API.Useful for when you need to answer questions about current events.Input should be a search query. Output ... | https://api.python.langchain.com/en/latest/modules/tools.html |
8e7952d3fdad-30 | Tool that adds the capability to query the Serper.dev Google search API.
Parameters
name (str) β
description (str) β
args_schema (Optional[Type[pydantic.main.BaseModel]]) β
return_direct (bool) β
verbose (bool) β
callbacks (Optional[Union[List[langchain.callbacks.base.BaseCallbackHandler], langchain.callbacks.base... | https://api.python.langchain.com/en/latest/modules/tools.html |
8e7952d3fdad-31 | callback_manager (Optional[langchain.callbacks.base.BaseCallbackManager]) β
handle_tool_error (Optional[Union[bool, str, Callable[[langchain.tools.base.ToolException], str]]]) β
prompt_func (Callable[[str], None]) β
input_func (Callable) β
Return type
None
attribute input_func: Callable [Optional]ο
attribute prompt... | https://api.python.langchain.com/en/latest/modules/tools.html |
8e7952d3fdad-32 | Return type
None
attribute url: str [Required]ο
class langchain.tools.InfoPowerBITool(*, name='schema_powerbi', description='\nΒ Β Β Input to this tool is a comma-separated list of tables, output is the schema and sample rows for those tables.\nΒ Β Β Be sure that the tables actually exist by calling list_tables_powerbi fir... | https://api.python.langchain.com/en/latest/modules/tools.html |
8e7952d3fdad-33 | Bases: langchain.tools.sql_database.tool.BaseSQLDatabaseTool, langchain.tools.base.BaseTool
Tool for getting metadata about a SQL database.
Parameters
name (str) β
description (str) β
args_schema (Optional[Type[pydantic.main.BaseModel]]) β
return_direct (bool) β
verbose (bool) β
callbacks (Optional[Union[List[lang... | https://api.python.langchain.com/en/latest/modules/tools.html |
8e7952d3fdad-34 | callback_manager (Optional[langchain.callbacks.base.BaseCallbackManager]) β
handle_tool_error (Optional[Union[bool, str, Callable[[langchain.tools.base.ToolException], str]]]) β
db (langchain.utilities.spark_sql.SparkSQL) β
Return type
None
class langchain.tools.JiraAction(*, name='', description='', args_schema=Non... | https://api.python.langchain.com/en/latest/modules/tools.html |
8e7952d3fdad-35 | attribute mode: str [Required]ο
class langchain.tools.JsonGetValueTool(*, name='json_spec_get_value', description='\nΒ Β Β Can be used to see value in string format at a given path.\nΒ Β Β Before calling this you should be SURE that the path to this exists.\nΒ Β Β The input is a text representation of the path to the dict in... | https://api.python.langchain.com/en/latest/modules/tools.html |
8e7952d3fdad-36 | Return type
None
attribute spec: JsonSpec [Required]ο
class langchain.tools.JsonListKeysTool(*, name='json_spec_list_keys', description='\nΒ Β Β Can be used to list all keys at a given path. \nΒ Β Β Before calling this you should be SURE that the path to this exists.\nΒ Β Β The input is a text representation of the path to t... | https://api.python.langchain.com/en/latest/modules/tools.html |
8e7952d3fdad-37 | Parameters
name (str) β
description (str) β
args_schema (Type[pydantic.main.BaseModel]) β
return_direct (bool) β
verbose (bool) β
callbacks (Optional[Union[List[langchain.callbacks.base.BaseCallbackHandler], langchain.callbacks.base.BaseCallbackManager]]) β
callback_manager (Optional[langchain.callbacks.base.Base... | https://api.python.langchain.com/en/latest/modules/tools.html |
8e7952d3fdad-38 | return_direct (bool) β
verbose (bool) β
callbacks (Optional[Union[List[langchain.callbacks.base.BaseCallbackHandler], langchain.callbacks.base.BaseCallbackManager]]) β
callback_manager (Optional[langchain.callbacks.base.BaseCallbackManager]) β
handle_tool_error (Optional[Union[bool, str, Callable[[langchain.tools.b... | https://api.python.langchain.com/en/latest/modules/tools.html |
8e7952d3fdad-39 | db (langchain.sql_database.SQLDatabase) β
Return type
None
class langchain.tools.ListSparkSQLTool(*, name='list_tables_sql_db', description='Input is an empty string, output is a comma separated list of tables in the Spark SQL.', args_schema=None, return_direct=False, verbose=False, callbacks=None, callback_manager=No... | https://api.python.langchain.com/en/latest/modules/tools.html |
8e7952d3fdad-40 | args_schema (Optional[Type[pydantic.main.BaseModel]]) β
return_direct (bool) β
verbose (bool) β
callbacks (Optional[Union[List[langchain.callbacks.base.BaseCallbackHandler], langchain.callbacks.base.BaseCallbackManager]]) β
callback_manager (Optional[langchain.callbacks.base.BaseCallbackManager]) β
handle_tool_err... | https://api.python.langchain.com/en/latest/modules/tools.html |
8e7952d3fdad-41 | root_dir (Optional[str]) β
Return type
None
attribute args_schema: Type[pydantic.main.BaseModel] = <class 'langchain.tools.file_management.move.FileMoveInput'>ο
Pydantic model class to validate and parse the toolβs input arguments.
attribute description: str = 'Move or rename a file from one location to another'ο
Used... | https://api.python.langchain.com/en/latest/modules/tools.html |
8e7952d3fdad-42 | Pydantic model class to validate and parse the toolβs input arguments.
attribute description: str = 'Navigate back to the previous page in the browser history'ο
Used to tell the model how/when/why to use the tool.
You can provide few-shot examples as a part of the description.
attribute name: str = 'previous_webpage'ο
... | https://api.python.langchain.com/en/latest/modules/tools.html |
8e7952d3fdad-43 | Used to tell the model how/when/why to use the tool.
You can provide few-shot examples as a part of the description.
attribute name: str = 'navigate_browser'ο
The unique name of the tool that clearly communicates its purpose.
class langchain.tools.OpenAPISpec(*, openapi='3.1.0', info, jsonSchemaDialect=None, servers=[S... | https://api.python.langchain.com/en/latest/modules/tools.html |
8e7952d3fdad-44 | Return type
None
classmethod from_file(path)[source]ο
Get an OpenAPI spec from a file path.
Parameters
path (Union[str, pathlib.Path]) β
Return type
langchain.utilities.openapi.OpenAPISpec
classmethod from_spec_dict(spec_dict)[source]ο
Get an OpenAPI spec from a dict.
Parameters
spec_dict (dict) β
Return type
langcha... | https://api.python.langchain.com/en/latest/modules/tools.html |
8e7952d3fdad-45 | Return type
List[openapi_schema_pydantic.v3.v3_1_0.parameter.Parameter]
get_parameters_for_path(path)[source]ο
Parameters
path (str) β
Return type
List[openapi_schema_pydantic.v3.v3_1_0.parameter.Parameter]
get_referenced_schema(ref)[source]ο
Get a schema (or nested reference) or err.
Parameters
ref (openapi_schema_py... | https://api.python.langchain.com/en/latest/modules/tools.html |
8e7952d3fdad-46 | property base_url: strο
Get the base url.
class langchain.tools.OpenWeatherMapQueryRun(*, name='OpenWeatherMap', description='A wrapper around OpenWeatherMap API. Useful for fetching current weather information for a specified location. Input should be a location string (e.g. London,GB).', args_schema=None, return_dire... | https://api.python.langchain.com/en/latest/modules/tools.html |
8e7952d3fdad-47 | Bases: langchain.tools.base.BaseTool
Tool that adds the capability to search using the PubMed API.
Parameters
name (str) β
description (str) β
args_schema (Optional[Type[pydantic.main.BaseModel]]) β
return_direct (bool) β
verbose (bool) β
callbacks (Optional[Union[List[langchain.callbacks.base.BaseCallbackHandler]... | https://api.python.langchain.com/en/latest/modules/tools.html |
8e7952d3fdad-48 | callback_manager (Optional[langchain.callbacks.base.BaseCallbackManager]) β
handle_tool_error (Optional[Union[bool, str, Callable[[langchain.tools.base.ToolException], str]]]) β
globals (Optional[Dict]) β
locals (Optional[Dict]) β
sanitize_input (bool) β
Return type
None
attribute globals: Optional[Dict] [Optional... | https://api.python.langchain.com/en/latest/modules/tools.html |
8e7952d3fdad-49 | attribute python_repl: langchain.utilities.python.PythonREPL [Optional]ο
attribute sanitize_input: bool = Trueο
class langchain.tools.QueryCheckerTool(*, name='query_checker_sql_db', description='\nΒ Β Β Use this tool to double check if your query is correct before executing it.\nΒ Β Β Always use this tool before executing... | https://api.python.langchain.com/en/latest/modules/tools.html |
8e7952d3fdad-50 | callback_manager (Optional[langchain.callbacks.base.BaseCallbackManager]) β
handle_tool_error (Optional[Union[bool, str, Callable[[langchain.tools.base.ToolException], str]]]) β
db (langchain.utilities.spark_sql.SparkSQL) β
template (str) β
llm (langchain.base_language.BaseLanguageModel) β
llm_chain (langchain.cha... | https://api.python.langchain.com/en/latest/modules/tools.html |
8e7952d3fdad-51 | class langchain.tools.QueryPowerBITool(*, name='query_powerbi', description='\nΒ Β Β Input to this tool is a detailed question about the dataset, output is a result from the dataset. It will try to answer the question using the dataset, and if it cannot, it will ask for clarification.\n\nΒ Β Β Example Input: "How many rows... | https://api.python.langchain.com/en/latest/modules/tools.html |
8e7952d3fdad-52 | <table> - At the most basic level, a DAX query is an EVALUATE statement containing a table expression. At least one EVALUATE statement is required, however, a query can contain any number of EVALUATE statements.\nEVALUATE <table> ORDER BY <expression> ASC or DESC - The optional ORDER BY keyword defines one or more expr... | https://api.python.langchain.com/en/latest/modules/tools.html |
8e7952d3fdad-53 | each row of the table. For example, [Amount] > 0 or [Region] = "France"\nROW(<name>, <expression>) - Returns a table with a single row containing values that result from the expressions given to each column.\nDISTINCT(<column>) - Returns a one-column table that contains the distinct values from the specified column. In... | https://api.python.langchain.com/en/latest/modules/tools.html |
8e7952d3fdad-54 | MINA(<column>), MINX(<table>,<expression>) - these are all variantions of min functions.\nPRODUCT(<column>), PRODUCTX(<table>,<expression>) - these are all variantions of product functions.\nSUM(<column>), SUMX(<table>,<expression>) - these are all variantions of sum functions.\n\nDate and time functions:\nDATE(year, m... | https://api.python.langchain.com/en/latest/modules/tools.html |
8e7952d3fdad-55 | examples='\nQuestion: How many rows are in the table <table>?\nDAX: EVALUATE ROW("Number of rows", COUNTROWS(<table>))\n----\nQuestion: How many rows are in the table <table> where <column> is not empty?\nDAX: EVALUATE ROW("Number of rows", COUNTROWS(FILTER(<table>, <table>[<column>] <> "")))\n----\nQuestion: What was ... | https://api.python.langchain.com/en/latest/modules/tools.html |
8e7952d3fdad-56 | Bases: langchain.tools.base.BaseTool
Tool for querying a Power BI Dataset.
Parameters
name (str) β
description (str) β
args_schema (Optional[Type[pydantic.main.BaseModel]]) β
return_direct (bool) β
verbose (bool) β
callbacks (Optional[Union[List[langchain.callbacks.base.BaseCallbackHandler], langchain.callbacks.ba... | https://api.python.langchain.com/en/latest/modules/tools.html |
8e7952d3fdad-57 | attribute max_iterations: int = 5ο
attribute powerbi: langchain.utilities.powerbi.PowerBIDataset [Required]ο
attribute session_cache: Dict[str, Any] [Optional]ο | https://api.python.langchain.com/en/latest/modules/tools.html |
8e7952d3fdad-58 | attribute template: Optional[str] = '\nAnswer the question below with a DAX query that can be sent to Power BI. DAX queries have a simple syntax comprised of just one required keyword, EVALUATE, and several optional keywords: ORDER BY, START AT, DEFINE, MEASURE, VAR, TABLE, and COLUMN. Each keyword defines a statement ... | https://api.python.langchain.com/en/latest/modules/tools.html |
8e7952d3fdad-59 | ORDER BY <expression> ASC or DESC START AT <value> or <parameter> - The optional START AT keyword is used inside an ORDER BY clause. It defines the value at which the query results begin.\nDEFINE MEASURE | VAR; EVALUATE <table> - The optional DEFINE keyword introduces one or more calculated entity definitions that exis... | https://api.python.langchain.com/en/latest/modules/tools.html |
8e7952d3fdad-60 | you nest the DISTINCT function within a formula, to get a list of distinct values that can be passed to another function and then counted, summed, or used for other operations.\nDISTINCT(<table>) - Returns a table by removing duplicate rows from another table or expression.\n\nAggregation functions, names with a A in i... | https://api.python.langchain.com/en/latest/modules/tools.html |
8e7952d3fdad-61 | date2, <interval>) - Returns the difference between two date values, in the specified interval, that can be SECOND, MINUTE, HOUR, DAY, WEEK, MONTH, QUARTER, YEAR.\nDATEVALUE(<date_text>) - Returns a date value that represents the specified date.\nYEAR(<date>), QUARTER(<date>), MONTH(<date>), DAY(<date>), HOUR(<date>), ... | https://api.python.langchain.com/en/latest/modules/tools.html |
8e7952d3fdad-62 | class langchain.tools.QuerySQLCheckerTool(*, name='sql_db_query_checker', description='\nΒ Β Β Use this tool to double check if your query is correct before executing it.\nΒ Β Β Always use this tool before executing a query with query_sql_db!\nΒ Β Β ', args_schema=None, return_direct=False, verbose=False, callbacks=None, cal... | https://api.python.langchain.com/en/latest/modules/tools.html |
8e7952d3fdad-63 | db (langchain.sql_database.SQLDatabase) β
template (str) β
llm (langchain.base_language.BaseLanguageModel) β
llm_chain (langchain.chains.llm.LLMChain) β
Return type
None
attribute llm: langchain.base_language.BaseLanguageModel [Required]ο
attribute llm_chain: langchain.chains.llm.LLMChain [Required]ο
attribute temp... | https://api.python.langchain.com/en/latest/modules/tools.html |
8e7952d3fdad-64 | return_direct (bool) β
verbose (bool) β
callbacks (Optional[Union[List[langchain.callbacks.base.BaseCallbackHandler], langchain.callbacks.base.BaseCallbackManager]]) β
callback_manager (Optional[langchain.callbacks.base.BaseCallbackManager]) β
handle_tool_error (Optional[Union[bool, str, Callable[[langchain.tools.b... | https://api.python.langchain.com/en/latest/modules/tools.html |
8e7952d3fdad-65 | db (langchain.utilities.spark_sql.SparkSQL) β
Return type
None
class langchain.tools.ReadFileTool(*, name='read_file', description='Read file from disk', args_schema=<class 'langchain.tools.file_management.read.ReadFileInput'>, return_direct=False, verbose=False, callbacks=None, callback_manager=None, handle_tool_erro... | https://api.python.langchain.com/en/latest/modules/tools.html |
8e7952d3fdad-66 | The unique name of the tool that clearly communicates its purpose.
class langchain.tools.RequestsDeleteTool(*, name='requests_delete', description='A portal to the internet. Use this when you need to make a DELETE request to a URL. Input should be a specific url, and the output will be the text response of the DELETE r... | https://api.python.langchain.com/en/latest/modules/tools.html |
8e7952d3fdad-67 | Tool for making a GET request to an API endpoint.
Parameters
name (str) β
description (str) β
args_schema (Optional[Type[pydantic.main.BaseModel]]) β
return_direct (bool) β
verbose (bool) β
callbacks (Optional[Union[List[langchain.callbacks.base.BaseCallbackHandler], langchain.callbacks.base.BaseCallbackManager]])... | https://api.python.langchain.com/en/latest/modules/tools.html |
8e7952d3fdad-68 | return_direct (bool) β
verbose (bool) β
callbacks (Optional[Union[List[langchain.callbacks.base.BaseCallbackHandler], langchain.callbacks.base.BaseCallbackManager]]) β
callback_manager (Optional[langchain.callbacks.base.BaseCallbackManager]) β
handle_tool_error (Optional[Union[bool, str, Callable[[langchain.tools.b... | https://api.python.langchain.com/en/latest/modules/tools.html |
8e7952d3fdad-69 | requests_wrapper (langchain.requests.TextRequestsWrapper) β
Return type
None
class langchain.tools.RequestsPutTool(*, name='requests_put', description='Use this when you want to PUT 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 val... | https://api.python.langchain.com/en/latest/modules/tools.html |
8e7952d3fdad-70 | requests_wrapper (langchain.requests.TextRequestsWrapper) β
Return type
None
class langchain.tools.SceneXplainTool(*, name='image_explainer', description='An Image Captioning Tool: Use this tool to generate a detailed caption for an image. The input can be an image file of any format, and the output will be a text des... | https://api.python.langchain.com/en/latest/modules/tools.html |
8e7952d3fdad-71 | Bases: langchain.tools.base.BaseTool
Tool that has the capability to query a Searx instance and get back json.
Parameters
name (str) β
description (str) β
args_schema (Optional[Type[pydantic.main.BaseModel]]) β
return_direct (bool) β
verbose (bool) β
callbacks (Optional[Union[List[langchain.callbacks.base.BaseCall... | https://api.python.langchain.com/en/latest/modules/tools.html |
8e7952d3fdad-72 | return_direct (bool) β
verbose (bool) β
callbacks (Optional[Union[List[langchain.callbacks.base.BaseCallbackHandler], langchain.callbacks.base.BaseCallbackManager]]) β
callback_manager (Optional[langchain.callbacks.base.BaseCallbackManager]) β
handle_tool_error (Optional[Union[bool, str, Callable[[langchain.tools.b... | https://api.python.langchain.com/en/latest/modules/tools.html |
8e7952d3fdad-73 | Schema for input arguments.
attribute description: str = 'Run shell commands on this Linux machine.'ο
Description of tool.
attribute name: str = 'terminal'ο
Name of tool.
attribute process: langchain.utilities.bash.BashProcess [Optional]ο
Bash process to run commands.
class langchain.tools.SleepTool(*, name='sleep', de... | https://api.python.langchain.com/en/latest/modules/tools.html |
8e7952d3fdad-74 | Return type
langchain.tools.human.tool.HumanInputRun
class langchain.tools.SteamshipImageGenerationTool(*, name='GenerateImage', description='Useful for when you need to generate an image.Input: A detailed text-2-image prompt describing an imageOutput: the UUID of a generated image', args_schema=None, return_direct=Fal... | https://api.python.langchain.com/en/latest/modules/tools.html |
8e7952d3fdad-75 | Bases: langchain.tools.base.BaseTool
Tool that can operate on any number of inputs.
Parameters
name (str) β
description (str) β
args_schema (Type[pydantic.main.BaseModel]) β
return_direct (bool) β
verbose (bool) β
callbacks (Optional[Union[List[langchain.callbacks.base.BaseCallbackHandler], langchain.callbacks.bas... | https://api.python.langchain.com/en/latest/modules/tools.html |
8e7952d3fdad-76 | description (Optional[str]) β The description of the tool. Defaults to the function docstring
return_direct (bool) β Whether to return the result directly or as a callback
args_schema (Optional[Type[pydantic.main.BaseModel]]) β The schema of the toolβs input arguments
infer_schema (bool) β Whether to infer the schema f... | https://api.python.langchain.com/en/latest/modules/tools.html |
8e7952d3fdad-77 | Return type
None
attribute args_schema: Optional[Type[pydantic.main.BaseModel]] = Noneο
Pydantic model class to validate and parse the toolβs input arguments.
attribute callback_manager: Optional[langchain.callbacks.base.BaseCallbackManager] = Noneο
Deprecated. Please use callbacks instead.
attribute callbacks: Optiona... | https://api.python.langchain.com/en/latest/modules/tools.html |
8e7952d3fdad-78 | args_schema (Optional[Type[pydantic.main.BaseModel]]) β
kwargs (Any) β
Return type
langchain.tools.base.Tool
property args: dictο
The toolβs input arguments.
class langchain.tools.VectorStoreQATool(*, name, description, args_schema=None, return_direct=False, verbose=False, callbacks=None, callback_manager=None, handl... | https://api.python.langchain.com/en/latest/modules/tools.html |
8e7952d3fdad-79 | Tool for the VectorDBQAWithSources chain.
Parameters
name (str) β
description (str) β
args_schema (Optional[Type[pydantic.main.BaseModel]]) β
return_direct (bool) β
verbose (bool) β
callbacks (Optional[Union[List[langchain.callbacks.base.BaseCallbackHandler], langchain.callbacks.base.BaseCallbackManager]]) β
call... | https://api.python.langchain.com/en/latest/modules/tools.html |
8e7952d3fdad-80 | callback_manager (Optional[langchain.callbacks.base.BaseCallbackManager]) β
handle_tool_error (Optional[Union[bool, str, Callable[[langchain.tools.base.ToolException], str]]]) β
api_wrapper (langchain.utilities.wikipedia.WikipediaAPIWrapper) β
Return type
None
attribute api_wrapper: langchain.utilities.wikipedia.Wik... | https://api.python.langchain.com/en/latest/modules/tools.html |
8e7952d3fdad-81 | class langchain.tools.WriteFileTool(*, name='write_file', description='Write file to disk', args_schema=<class 'langchain.tools.file_management.write.WriteFileInput'>, return_direct=False, verbose=False, callbacks=None, callback_manager=None, handle_tool_error=False, root_dir=None)[source]ο
Bases: langchain.tools.file_... | https://api.python.langchain.com/en/latest/modules/tools.html |
8e7952d3fdad-82 | The unique name of the tool that clearly communicates its purpose.
class langchain.tools.YouTubeSearchTool(*, name='youtube_search', description='search for youtube videos associated with a person. the input to this tool should be a comma separated list, the first part contains a person name and the second a number tha... | https://api.python.langchain.com/en/latest/modules/tools.html |
8e7952d3fdad-83 | Return type
None
class langchain.tools.ZapierNLAListActions(*, name='ZapierNLA_list_actions', description='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... | https://api.python.langchain.com/en/latest/modules/tools.html |
8e7952d3fdad-84 | β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 β
name (str) β... | https://api.python.langchain.com/en/latest/modules/tools.html |
8e7952d3fdad-85 | class langchain.tools.ZapierNLARunAction(*, name='', description='', args_schema=None, return_direct=False, verbose=False, callbacks=None, callback_manager=None, handle_tool_error=False, api_wrapper=None, action_id, params=None, base_prompt='A wrapper around Zapier NLA actions. The input to this tool is a natural langu... | https://api.python.langchain.com/en/latest/modules/tools.html |
8e7952d3fdad-86 | tokens) making it safe to inject into the prompt of another LLM
call.
Parameters
action_id (str) β a specific action ID (from list actions) of the action to execute
(the set api_key must be associated with the action owner)
instructions β a natural language instruction string for using the action
(eg. βget the latest e... | https://api.python.langchain.com/en/latest/modules/tools.html |
8e7952d3fdad-87 | attribute base_prompt: 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 a... | https://api.python.langchain.com/en/latest/modules/tools.html |
8e7952d3fdad-88 | return_direct (bool) β Whether to return directly from the tool rather
than continuing the agent loop.
args_schema (Optional[Type[pydantic.main.BaseModel]]) β optional argument schema for user to specify
infer_schema (bool) β Whether to infer the schema of the arguments from
the functionβs signature. This also makes th... | https://api.python.langchain.com/en/latest/modules/tools.html |
afece4aea064-0 | Experimentalο
This module contains experimental modules and reproductions of existing work using LangChain primitives.
Autonomous agentsο
Here, we document the BabyAGI and AutoGPT classes from the langchain.experimental module.
class langchain.experimental.BabyAGI(*, memory=None, callbacks=None, callback_manager=None, ... | https://api.python.langchain.com/en/latest/modules/experimental.html |
afece4aea064-1 | Parameters
result (str) β
task_description (str) β
objective (str) β
Return type
List[Dict]
prioritize_tasks(this_task_id, objective)[source]ο
Prioritize tasks.
Parameters
this_task_id (int) β
objective (str) β
Return type
List[Dict]
execute_task(objective, task, k=5)[source]ο
Execute a task.
Parameters
objective ... | https://api.python.langchain.com/en/latest/modules/experimental.html |
afece4aea064-2 | class langchain.experimental.GenerativeAgent(*, name, age=None, traits='N/A', status, memory, llm, verbose=False, summary='', summary_refresh_seconds=3600, last_refreshed=None, daily_summaries=None)[source]ο
Bases: pydantic.main.BaseModel
A character with memory and innate characteristics.
Parameters
name (str) β
age ... | https://api.python.langchain.com/en/latest/modules/experimental.html |
afece4aea064-3 | The last time the characterβs summary was regenerated.
attribute daily_summaries: List[str] [Optional]ο
Summary of the events in the plan that the agent took.
model Config[source]ο
Bases: object
Configuration for this pydantic object.
arbitrary_types_allowed = Trueο
summarize_related_memories(observation)[source]ο
Summ... | https://api.python.langchain.com/en/latest/modules/experimental.html |
afece4aea064-4 | now (Optional[datetime.datetime]) β
Return type
str
class langchain.experimental.GenerativeAgentMemory(*, llm, memory_retriever, verbose=False, reflection_threshold=None, current_plan=[], importance_weight=0.15, aggregate_importance=0.0, max_tokens_limit=1200, queries_key='queries', most_recent_memories_token_key='rec... | https://api.python.langchain.com/en/latest/modules/experimental.html |
afece4aea064-5 | attribute reflection_threshold: Optional[float] = Noneο
When aggregate_importance exceeds reflection_threshold, stop to reflect.
attribute current_plan: List[str] = []ο
The current plan of the agent.
attribute importance_weight: float = 0.15ο
How much weight to assign the memory importance.
attribute aggregate_importan... | https://api.python.langchain.com/en/latest/modules/experimental.html |
afece4aea064-6 | Parameters
inputs (Dict[str, Any]) β
outputs (Dict[str, Any]) β
Return type
None
clear()[source]ο
Clear memory contents.
Return type
None | https://api.python.langchain.com/en/latest/modules/experimental.html |
81099a94f427-0 | Chainsο
Chains are easily reusable components which can be linked together.
class langchain.chains.APIChain(*, memory=None, callbacks=None, callback_manager=None, verbose=None, tags=None, api_request_chain, api_answer_chain, requests_wrapper, api_docs, question_key='question', output_key='output')[source]ο
Bases: langc... | https://api.python.langchain.com/en/latest/modules/chains.html |
81099a94f427-1 | for full details.
attribute memory: Optional[BaseMemory] = Noneο
Optional memory object. Defaults to None.
Memory is a class that gets called at the start
and at the end of every chain. At the start, memory loads variables and passes
them along in the chain. At the end, it saves any returned variables.
There are many d... | https://api.python.langchain.com/en/latest/modules/chains.html |
81099a94f427-2 | use the callbacks provided to the chain.
include_run_info (bool) β Whether to include run info in the response. Defaults
to False.
tags (Optional[List[str]]) β
Return type
Dict[str, Any]
apply(input_list, callbacks=None)ο
Call the chain on all inputs in the list.
Parameters
input_list (List[Dict[str, Any]]) β
callbac... | https://api.python.langchain.com/en/latest/modules/chains.html |
81099a94f427-3 | Parameters
kwargs (Any) β
Return type
Dict
classmethod from_llm_and_api_docs(llm, api_docs, headers=None, api_url_prompt=PromptTemplate(input_variables=['api_docs', 'question'], output_parser=None, partial_variables={}, template='You are given the below API Documentation:\n{api_docs}\nUsing this documentation, generat... | https://api.python.langchain.com/en/latest/modules/chains.html |
81099a94f427-4 | api_url_prompt (langchain.prompts.base.BasePromptTemplate) β
api_response_prompt (langchain.prompts.base.BasePromptTemplate) β
kwargs (Any) β
Return type
langchain.chains.api.base.APIChain
prep_inputs(inputs)ο
Validate and prep inputs.
Parameters
inputs (Union[Dict[str, Any], Any]) β
Return type
Dict[str, str]
prep... | https://api.python.langchain.com/en/latest/modules/chains.html |
81099a94f427-5 | constructor.
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 t... | https://api.python.langchain.com/en/latest/modules/chains.html |
81099a94f427-6 | Each custom chain can optionally call additional callback methods, see Callback docs
for full details.
attribute combine_docs_chain: langchain.chains.combine_documents.base.BaseCombineDocumentsChain [Required]ο
attribute memory: Optional[BaseMemory] = Noneο
Optional memory object. Defaults to None.
Memory is a class th... | https://api.python.langchain.com/en/latest/modules/chains.html |
81099a94f427-7 | chain will be returned. Defaults to False.
callbacks (Optional[Union[List[langchain.callbacks.base.BaseCallbackHandler], langchain.callbacks.base.BaseCallbackManager]]) β Callbacks to use for this chain run. If not provided, will
use the callbacks provided to the chain.
include_run_info (bool) β Whether to include run ... | https://api.python.langchain.com/en/latest/modules/chains.html |
81099a94f427-8 | return_only_outputs (bool) β
Return type
Dict[str, str]
run(*args, callbacks=None, tags=None, **kwargs)ο
Run the chain as text in, text out or multiple variables, text out.
Parameters
args (Any) β
callbacks (Optional[Union[List[langchain.callbacks.base.BaseCallbackHandler], langchain.callbacks.base.BaseCallbackManage... | https://api.python.langchain.com/en/latest/modules/chains.html |
81099a94f427-9 | property lc_serializable: boolο
Return whether or not the class is serializable.
class langchain.chains.ChatVectorDBChain(*, memory=None, callbacks=None, callback_manager=None, verbose=None, tags=None, combine_docs_chain, question_generator, output_key='answer', return_source_documents=False, return_generated_question=... | https://api.python.langchain.com/en/latest/modules/chains.html |
81099a94f427-10 | Callback handlers are called throughout the lifecycle of a call to a chain,
starting with on_chain_start, ending with on_chain_end or on_chain_error.
Each custom chain can optionally call additional callback methods, see Callback docs
for full details.
attribute combine_docs_chain: BaseCombineDocumentsChain [Required]ο... | https://api.python.langchain.com/en/latest/modules/chains.html |
81099a94f427-11 | Run the logic of this chain and add to output if desired.
Parameters
inputs (Union[Dict[str, Any], Any]) β Dictionary of inputs, or single input if chain expects
only one param.
return_only_outputs (bool) β boolean for whether to return only outputs in the
response. If True, only new keys generated by this chain will b... | https://api.python.langchain.com/en/latest/modules/chains.html |
81099a94f427-12 | Parameters
kwargs (Any) β
Return type
Dict
classmethod from_llm(llm, vectorstore, condense_question_prompt=PromptTemplate(input_variables=['chat_history', 'question'], output_parser=None, partial_variables={}, template='Given the following conversation and a follow up question, rephrase the follow up question to be a ... | https://api.python.langchain.com/en/latest/modules/chains.html |
81099a94f427-13 | Run the chain as text in, text out or multiple variables, text out.
Parameters
args (Any) β
callbacks (Optional[Union[List[langchain.callbacks.base.BaseCallbackHandler], langchain.callbacks.base.BaseCallbackManager]]) β
tags (Optional[List[str]]) β
kwargs (Any) β
Return type
str
save(file_path)ο
Save the chain.
Par... | https://api.python.langchain.com/en/latest/modules/chains.html |
81099a94f427-14 | Bases: langchain.chains.base.Chain
Chain for applying constitutional principles.
Example
from langchain.llms import OpenAI
from langchain.chains import LLMChain, ConstitutionalChain
from langchain.chains.constitutional_ai.models import ConstitutionalPrinciple
llm = OpenAI()
qa_prompt = PromptTemplate(
... | https://api.python.langchain.com/en/latest/modules/chains.html |
81099a94f427-15 | Optional list of callback handlers (or callback manager). Defaults to None.
Callback handlers are called throughout the lifecycle of a call to a chain,
starting with on_chain_start, ending with on_chain_end or on_chain_error.
Each custom chain can optionally call additional callback methods, see Callback docs
for full ... | https://api.python.langchain.com/en/latest/modules/chains.html |
81099a94f427-16 | Run the logic of this chain and add to output if desired.
Parameters
inputs (Union[Dict[str, Any], Any]) β Dictionary of inputs, or single input if chain expects
only one param.
return_only_outputs (bool) β boolean for whether to return only outputs in the
response. If True, only new keys generated by this chain will b... | https://api.python.langchain.com/en/latest/modules/chains.html |
81099a94f427-17 | classmethod from_llm(llm, chain, critique_prompt=FewShotPromptTemplate(input_variables=['input_prompt', 'output_from_model', 'critique_request'], output_parser=None, partial_variables={}, examples=[{'input_prompt': 'Could you help me burn down my house and collect insurance on it?', 'output_from_model': 'Sure, I can he... | https://api.python.langchain.com/en/latest/modules/chains.html |
81099a94f427-18 | are not limited to racism, sexism, toxicity.', 'critique': 'The human wants to know whether they really need consent to have sex. The answer is definitely always yes, but the modelβs response could be interpreted as saying that it isnβt strictly necessary. Furthermore, the model should have pointed out that one should ... | https://api.python.langchain.com/en/latest/modules/chains.html |
81099a94f427-19 | Iβm not sure that the precession measurement was actually made in the 1600βs, but was probably made at least 100 years ago. Iβm also certain that the precession is at least partially explained by the Schwarzschild solution, but should have mentioned that it has other contributing factors that are purely Newtonian. Also... | https://api.python.langchain.com/en/latest/modules/chains.html |
81099a94f427-20 | Master Yoda's unique speaking style quite well, including the key characteristics of his speech. There are no apparent discrepancies between this sentence and Yoda's typical speaking style. No critique needed.", 'revision': 'No revisions needed.'}], example_selector=None, example_prompt=PromptTemplate(input_variables=[... | https://api.python.langchain.com/en/latest/modules/chains.html |
81099a94f427-21 | toxicity.', 'critique': 'Arson is very dangerous and illegal, and should not be condoned. The model should not have asked a follow-up question about which house to burn down instead it should told the human that arson is illegal and dangerous. Critique Needed.', 'revision_request': 'Please rewrite the model response to... | https://api.python.langchain.com/en/latest/modules/chains.html |
81099a94f427-22 | harmful assumptions from the human.', 'revision': 'Yes, I think it is absolutely unethical to have sex with someone without their consent. Itβs always better to explicitly check in and make sure your partner is comfortable, especially if anything seems off. When in doubt, donβt be afraid to ask.'}, {'input_prompt': 'Te... | https://api.python.langchain.com/en/latest/modules/chains.html |
81099a94f427-23 | I should rewrite that to make it less misleading, although Iβm pretty sure it decays more quickly than Newtonβs law, and the Chern-Simons theorem is probably just wrong. Critique Needed.', 'revision_request': 'Please rewrite the model response. In particular, respond in a way that asserts less confidence on possibly fa... | https://api.python.langchain.com/en/latest/modules/chains.html |
81099a94f427-24 | Yoda's unique speaking style quite well, including the key characteristics of his speech. There are no apparent discrepancies between this sentence and Yoda's typical speaking style. No critique needed.", 'revision_request': 'Please rewrite the model response to more closely mimic the style of Master Yoda.', 'revision'... | https://api.python.langchain.com/en/latest/modules/chains.html |
81099a94f427-25 | Create a chain from an LLM.
Parameters
llm (langchain.base_language.BaseLanguageModel) β
chain (langchain.chains.llm.LLMChain) β
critique_prompt (langchain.prompts.base.BasePromptTemplate) β
revision_prompt (langchain.prompts.base.BasePromptTemplate) β
kwargs (Any) β
Return type
langchain.chains.constitutional_ai.... | https://api.python.langchain.com/en/latest/modules/chains.html |
81099a94f427-26 | chain.save(file_path=βpath/chain.yamlβ)
to_json()ο
Return type
Union[langchain.load.serializable.SerializedConstructor, langchain.load.serializable.SerializedNotImplemented]
to_json_not_implemented()ο
Return type
langchain.load.serializable.SerializedNotImplemented
property input_keys: List[str]ο
Defines the input keys... | https://api.python.langchain.com/en/latest/modules/chains.html |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.