id stringlengths 14 16 | text stringlengths 36 2.73k | source stringlengths 49 117 |
|---|---|---|
64eaf8b74d74-34 | format for a human, also make sure to represent numbers in readable ways, like 1M instead of 1000000. Unless the user specifies a specific number of examples they wish to obtain, always limit your query to at most {top_k} results.\n', suffix: str = 'Begin!\n\nQuestion: {input}\nThought: I can first ask which tables I h... | https://python.langchain.com/en/latest/reference/modules/agents.html |
64eaf8b74d74-35 | Optional[List[str]] = None, top_k: int = 10, verbose: bool = False, agent_executor_kwargs: Optional[Dict[str, Any]] = None, **kwargs: Dict[str, Any]) β langchain.agents.agent.AgentExecutor[source]# | https://python.langchain.com/en/latest/reference/modules/agents.html |
64eaf8b74d74-36 | Construct a pbi agent from an LLM and tools. | https://python.langchain.com/en/latest/reference/modules/agents.html |
64eaf8b74d74-37 | langchain.agents.create_pbi_chat_agent(llm: langchain.chat_models.base.BaseChatModel, toolkit: Optional[langchain.agents.agent_toolkits.powerbi.toolkit.PowerBIToolkit], powerbi: Optional[langchain.utilities.powerbi.PowerBIDataset] = None, callback_manager: Optional[langchain.callbacks.base.BaseCallbackManager] = None, ... | https://python.langchain.com/en/latest/reference/modules/agents.html |
64eaf8b74d74-38 | rows are asked find a way to write that in a easily readible format for a human, also make sure to represent numbers in readable ways, like 1M instead of 1000000. Unless the user specifies a specific number of examples they wish to obtain, always limit your query to at most {top_k} results.\n', suffix: str = "TOOLS\n--... | https://python.langchain.com/en/latest/reference/modules/agents.html |
64eaf8b74d74-39 | Construct a pbi agent from an Chat LLM and tools.
If you supply only a toolkit and no powerbi dataset, the same LLM is used for both.
langchain.agents.create_spark_dataframe_agent(llm: langchain.llms.base.BaseLLM, df: Any, callback_manager: Optional[langchain.callbacks.base.BaseCallbackManager] = None, prefix: str = '\... | https://python.langchain.com/en/latest/reference/modules/agents.html |
64eaf8b74d74-40 | langchain.agents.create_spark_sql_agent(llm: langchain.base_language.BaseLanguageModel, toolkit: langchain.agents.agent_toolkits.spark_sql.toolkit.SparkSQLToolkit, callback_manager: Optional[langchain.callbacks.base.BaseCallbackManager] = None, prefix: str = 'You are an agent designed to interact with Spark SQL.\nGiven... | https://python.langchain.com/en/latest/reference/modules/agents.html |
64eaf8b74d74-41 | rewrite the query and try again.\n\nDO NOT make any DML statements (INSERT, UPDATE, DELETE, DROP etc.) to the database.\n\nIf the question does not seem related to the database, just return "I don\'t know" as the answer.\n', suffix: str = 'Begin!\n\nQuestion: {input}\nThought: I should look at the tables in the databas... | https://python.langchain.com/en/latest/reference/modules/agents.html |
64eaf8b74d74-42 | str = 'force', verbose: bool = False, agent_executor_kwargs: Optional[Dict[str, Any]] = None, **kwargs: Dict[str, Any]) β langchain.agents.agent.AgentExecutor[source]# | https://python.langchain.com/en/latest/reference/modules/agents.html |
64eaf8b74d74-43 | Construct a sql agent from an LLM and tools. | https://python.langchain.com/en/latest/reference/modules/agents.html |
64eaf8b74d74-44 | langchain.agents.create_sql_agent(llm: langchain.base_language.BaseLanguageModel, toolkit: langchain.agents.agent_toolkits.sql.toolkit.SQLDatabaseToolkit, callback_manager: Optional[langchain.callbacks.base.BaseCallbackManager] = None, prefix: str = 'You are an agent designed to interact with a SQL database.\nGiven an ... | https://python.langchain.com/en/latest/reference/modules/agents.html |
64eaf8b74d74-45 | rewrite the query and try again.\n\nDO NOT make any DML statements (INSERT, UPDATE, DELETE, DROP etc.) to the database.\n\nIf the question does not seem related to the database, just return "I don\'t know" as the answer.\n', suffix: str = 'Begin!\n\nQuestion: {input}\nThought: I should look at the tables in the databas... | https://python.langchain.com/en/latest/reference/modules/agents.html |
64eaf8b74d74-46 | str = 'force', verbose: bool = False, agent_executor_kwargs: Optional[Dict[str, Any]] = None, **kwargs: Dict[str, Any]) β langchain.agents.agent.AgentExecutor[source]# | https://python.langchain.com/en/latest/reference/modules/agents.html |
64eaf8b74d74-47 | Construct a sql agent from an LLM and tools.
langchain.agents.create_vectorstore_agent(llm: langchain.base_language.BaseLanguageModel, toolkit: langchain.agents.agent_toolkits.vectorstore.toolkit.VectorStoreToolkit, callback_manager: Optional[langchain.callbacks.base.BaseCallbackManager] = None, prefix: str = 'You are ... | https://python.langchain.com/en/latest/reference/modules/agents.html |
64eaf8b74d74-48 | Construct a vectorstore router agent from an LLM and tools.
langchain.agents.get_all_tool_names() β List[str][source]#
Get a list of all possible tool names.
langchain.agents.initialize_agent(tools: Sequence[langchain.tools.base.BaseTool], llm: langchain.base_language.BaseLanguageModel, agent: Optional[langchain.agents... | https://python.langchain.com/en/latest/reference/modules/agents.html |
64eaf8b74d74-49 | langchain.agents.load_tools(tool_names: List[str], llm: Optional[langchain.base_language.BaseLanguageModel] = None, callbacks: Optional[Union[List[langchain.callbacks.base.BaseCallbackHandler], langchain.callbacks.base.BaseCallbackManager]] = None, **kwargs: Any) β List[langchain.tools.base.BaseTool][source]#
Load tool... | https://python.langchain.com/en/latest/reference/modules/agents.html |
64eaf8b74d74-50 | Tools
By Harrison Chase
Β© Copyright 2023, Harrison Chase.
Last updated on May 28, 2023. | https://python.langchain.com/en/latest/reference/modules/agents.html |
11b51c9535ff-0 | .rst
.pdf
Experimental Modules
Contents
Autonomous Agents
Generative Agents
Experimental Modules#
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 ... | https://python.langchain.com/en/latest/reference/modules/experimental.html |
11b51c9535ff-1 | Get the next task.
property input_keys: List[str]#
Input keys this chain expects.
property output_keys: List[str]#
Output keys this chain expects.
prioritize_tasks(this_task_id: int, objective: str) β List[Dict][source]#
Prioritize tasks.
class langchain.experimental.AutoGPT(ai_name: str, memory: langchain.vectorstores... | https://python.langchain.com/en/latest/reference/modules/experimental.html |
11b51c9535ff-2 | Summary of the events in the plan that the agent took.
generate_dialogue_response(observation: str, now: Optional[datetime.datetime] = None) β Tuple[bool, str][source]#
React to a given observation.
generate_reaction(observation: str, now: Optional[datetime.datetime] = None) β Tuple[bool, str][source]#
React to a given... | https://python.langchain.com/en/latest/reference/modules/experimental.html |
11b51c9535ff-3 | field traits: str = 'N/A'#
Permanent traits to ascribe to the character.
class langchain.experimental.GenerativeAgentMemory(*, llm: langchain.base_language.BaseLanguageModel, memory_retriever: langchain.retrievers.time_weighted_retriever.TimeWeightedVectorStoreRetriever, verbose: bool = False, reflection_threshold: Opt... | https://python.langchain.com/en/latest/reference/modules/experimental.html |
11b51c9535ff-4 | The core language model.
load_memory_variables(inputs: Dict[str, Any]) β Dict[str, str][source]#
Return key-value pairs given the text input to the chain.
field memory_retriever: langchain.retrievers.time_weighted_retriever.TimeWeightedVectorStoreRetriever [Required]#
The retriever to fetch related memories.
property m... | https://python.langchain.com/en/latest/reference/modules/experimental.html |
06ac4c31a46d-0 | .rst
.pdf
Memory
Memory#
class langchain.memory.CassandraChatMessageHistory(contact_points: List[str], session_id: str, port: int = 9042, username: str = 'cassandra', password: str = 'cassandra', keyspace_name: str = 'chat_history', table_name: str = 'message_store')[source]#
Chat message history that stores history in... | https://python.langchain.com/en/latest/reference/modules/memory.html |
06ac4c31a46d-1 | Validators
check_input_key Β» memories
check_repeated_memory_variable Β» memories
field memories: List[langchain.schema.BaseMemory] [Required]#
For tracking all the memories that should be accessed.
clear() β None[source]#
Clear context from this session for every memory.
load_memory_variables(inputs: Dict[str, Any]) β D... | https://python.langchain.com/en/latest/reference/modules/memory.html |
06ac4c31a46d-2 | field entity_extraction_prompt: langchain.prompts.base.BasePromptTemplate = PromptTemplate(input_variables=['history', 'input'], output_parser=None, partial_variables={}, template='You are an AI assistant reading the transcript of a conversation between an AI and a human. Extract all of the proper nouns from the last l... | https://python.langchain.com/en/latest/reference/modules/memory.html |
06ac4c31a46d-3 | a lot of work! What kind of things are you doing to make Langchain better?"\nLast line:\nPerson #1: i\'m trying to improve Langchain\'s interfaces, the UX, its integrations with various products the user might want ... a lot of stuff.\nOutput: Langchain\nEND OF EXAMPLE\n\nEXAMPLE\nConversation history:\nPerson #1: how\... | https://python.langchain.com/en/latest/reference/modules/memory.html |
06ac4c31a46d-4 | field entity_store: langchain.memory.entity.BaseEntityStore [Optional]#
field entity_summarization_prompt: langchain.prompts.base.BasePromptTemplate = PromptTemplate(input_variables=['entity', 'summary', 'history', 'input'], output_parser=None, partial_variables={}, template='You are an AI assistant helping a human kee... | https://python.langchain.com/en/latest/reference/modules/memory.html |
06ac4c31a46d-5 | Knowledge graph memory for storing conversation memory.
Integrates with external knowledge graph to store and retrieve
information about knowledge triples in the conversation.
field ai_prefix: str = 'AI'# | https://python.langchain.com/en/latest/reference/modules/memory.html |
06ac4c31a46d-6 | field entity_extraction_prompt: langchain.prompts.base.BasePromptTemplate = PromptTemplate(input_variables=['history', 'input'], output_parser=None, partial_variables={}, template='You are an AI assistant reading the transcript of a conversation between an AI and a human. Extract all of the proper nouns from the last l... | https://python.langchain.com/en/latest/reference/modules/memory.html |
06ac4c31a46d-7 | a lot of work! What kind of things are you doing to make Langchain better?"\nLast line:\nPerson #1: i\'m trying to improve Langchain\'s interfaces, the UX, its integrations with various products the user might want ... a lot of stuff.\nOutput: Langchain\nEND OF EXAMPLE\n\nEXAMPLE\nConversation history:\nPerson #1: how\... | https://python.langchain.com/en/latest/reference/modules/memory.html |
06ac4c31a46d-8 | field human_prefix: str = 'Human'#
field k: int = 2#
field kg: langchain.graphs.networkx_graph.NetworkxEntityGraph [Optional]# | https://python.langchain.com/en/latest/reference/modules/memory.html |
06ac4c31a46d-9 | field knowledge_extraction_prompt: langchain.prompts.base.BasePromptTemplate = PromptTemplate(input_variables=['history', 'input'], output_parser=None, partial_variables={}, template="You are a networked intelligence helping a human track knowledge triples about all relevant people, things, concepts, etc. and integrati... | https://python.langchain.com/en/latest/reference/modules/memory.html |
06ac4c31a46d-10 | It's also the number 1 producer of gold in the US.\n\nOutput: (Nevada, is a, state)<|>(Nevada, is in, US)<|>(Nevada, is the number 1 producer of, gold)\nEND OF EXAMPLE\n\nEXAMPLE\nConversation history:\nPerson #1: Hello.\nAI: Hi! How are you?\nPerson #1: I'm good. How are you?\nAI: I'm good too.\nLast line of conversat... | https://python.langchain.com/en/latest/reference/modules/memory.html |
06ac4c31a46d-11 | huh. I know Descartes likes to drive antique scooters and play the mandolin.\nOutput: (Descartes, likes to drive, antique scooters)<|>(Descartes, plays, mandolin)\nEND OF EXAMPLE\n\nConversation history (for reference only):\n{history}\nLast line of conversation (for extraction):\nHuman: {input}\n\nOutput:", template_f... | https://python.langchain.com/en/latest/reference/modules/memory.html |
06ac4c31a46d-12 | field llm: langchain.base_language.BaseLanguageModel [Required]#
field summary_message_cls: Type[langchain.schema.BaseMessage] = <class 'langchain.schema.SystemMessage'>#
Number of previous utterances to include in the context.
clear() β None[source]#
Clear memory contents.
get_current_entities(input_string: str) β Lis... | https://python.langchain.com/en/latest/reference/modules/memory.html |
06ac4c31a46d-13 | field memory_key: str = 'history'#
field moving_summary_buffer: str = ''#
clear() β None[source]#
Clear memory contents.
load_memory_variables(inputs: Dict[str, Any]) β Dict[str, Any][source]#
Return history buffer.
prune() β None[source]#
Prune buffer if it exceeds max token limit
save_context(inputs: Dict[str, Any], ... | https://python.langchain.com/en/latest/reference/modules/memory.html |
06ac4c31a46d-14 | Save context from this conversation to buffer. Pruned.
property buffer: List[langchain.schema.BaseMessage]#
String buffer of memory.
class langchain.memory.CosmosDBChatMessageHistory(cosmos_endpoint: str, cosmos_database: str, cosmos_container: str, session_id: str, user_id: str, credential: Any = None, connection_stri... | https://python.langchain.com/en/latest/reference/modules/memory.html |
06ac4c31a46d-15 | add_user_message(message: str) β None[source]#
Add a user message to the store
append(message: langchain.schema.BaseMessage) β None[source]#
Append the message to the record in DynamoDB
clear() β None[source]#
Clear session memory from DynamoDB
property messages: List[langchain.schema.BaseMessage]#
Retrieve the message... | https://python.langchain.com/en/latest/reference/modules/memory.html |
06ac4c31a46d-16 | Set entity value in store.
store: Dict[str, Optional[str]] = {}#
class langchain.memory.MomentoChatMessageHistory(session_id: str, cache_client: momento.CacheClient, cache_name: str, *, key_prefix: str = 'message_store:', ttl: Optional[timedelta] = None, ensure_cache_exists: bool = True)[source]#
Chat message history c... | https://python.langchain.com/en/latest/reference/modules/memory.html |
06ac4c31a46d-17 | session_id β arbitrary key that is used to store the messages
of a single chat session.
database_name β name of the database to use
collection_name β name of the collection to use
add_ai_message(message: str) β None[source]#
Add an AI message to the store
add_user_message(message: str) β None[source]#
Add a user messag... | https://python.langchain.com/en/latest/reference/modules/memory.html |
06ac4c31a46d-18 | Nothing should be saved or changed
property memory_variables: List[str]#
Return memory variables.
class langchain.memory.RedisChatMessageHistory(session_id: str, url: str = 'redis://localhost:6379/0', key_prefix: str = 'message_store:', ttl: Optional[int] = None)[source]#
add_ai_message(message: str) β None[source]#
Ad... | https://python.langchain.com/en/latest/reference/modules/memory.html |
06ac4c31a46d-19 | recall_ttl: Optional[int] = 259200#
redis_client: Any#
session_id: str = 'default'#
set(key: str, value: Optional[str]) β None[source]#
Set entity value in store.
ttl: Optional[int] = 86400#
pydantic model langchain.memory.SimpleMemory[source]#
Simple memory for storing context or other bits of information that shouldn... | https://python.langchain.com/en/latest/reference/modules/memory.html |
06ac4c31a46d-20 | Return history buffer.
save_context(inputs: Dict[str, Any], outputs: Dict[str, str]) β None[source]#
Save context from this conversation to buffer.
property memory_variables: List[str]#
The list of keys emitted from the load_memory_variables method.
previous
Document Transformers
next
Agents
By Harrison Chase
... | https://python.langchain.com/en/latest/reference/modules/memory.html |
e0d2e27fbce5-0 | .rst
.pdf
Tools
Tools#
Core toolkit implementations.
pydantic model langchain.tools.AIPluginTool[source]#
field api_spec: str [Required]#
field args_schema: Type[AIPluginToolSchema] = <class 'langchain.tools.plugin.AIPluginToolSchema'>#
Pydantic model class to validate and parse the toolβs input arguments.
field plugin... | https://python.langchain.com/en/latest/reference/modules/tools.html |
e0d2e27fbce5-1 | to_typescript() β str[source]#
Get typescript string representation of the operation.
static ts_type_from_python(type_: Union[str, Type, tuple, None, enum.Enum]) β str[source]#
property body_params: List[str]#
property path_params: List[str]#
property query_params: List[str]#
pydantic model langchain.tools.AzureCogsFor... | https://python.langchain.com/en/latest/reference/modules/tools.html |
e0d2e27fbce5-2 | pydantic model langchain.tools.BaseTool[source]#
Interface LangChain tools must implement.
field args_schema: Optional[Type[pydantic.main.BaseModel]] = None#
Pydantic model class to validate and parse the toolβs input arguments.
field callback_manager: Optional[langchain.callbacks.base.BaseCallbackManager] = None#
Depr... | https://python.langchain.com/en/latest/reference/modules/tools.html |
e0d2e27fbce5-3 | Run the tool.
property args: dict#
property is_single_input: bool#
Whether the tool only accepts a single input.
pydantic model langchain.tools.BingSearchResults[source]#
Tool that has capability to query the Bing Search API and get back json.
field api_wrapper: langchain.utilities.bing_search.BingSearchAPIWrapper [Req... | https://python.langchain.com/en/latest/reference/modules/tools.html |
e0d2e27fbce5-4 | Pydantic model class to validate and parse the toolβs input arguments.
field description: str = 'Create a copy of a file in a specified location'#
Used to tell the model how/when/why to use the tool.
You can provide few-shot examples as a part of the description.
field name: str = 'copy_file'#
The unique name of the to... | https://python.langchain.com/en/latest/reference/modules/tools.html |
e0d2e27fbce5-5 | field num_results: int = 4#
pydantic model langchain.tools.DuckDuckGoSearchRun[source]#
Tool that adds the capability to query the DuckDuckGo search API.
field api_wrapper: langchain.utilities.duckduckgo_search.DuckDuckGoSearchAPIWrapper [Optional]#
pydantic model langchain.tools.ExtractHyperlinksTool[source]#
Extract ... | https://python.langchain.com/en/latest/reference/modules/tools.html |
e0d2e27fbce5-6 | Pydantic model class to validate and parse the toolβs input arguments.
field description: str = 'Recursively search for files in a subdirectory that match the regex pattern'#
Used to tell the model how/when/why to use the tool.
You can provide few-shot examples as a part of the description.
field name: str = 'file_sear... | https://python.langchain.com/en/latest/reference/modules/tools.html |
e0d2e27fbce5-7 | pydantic model langchain.tools.GmailGetMessage[source]#
field args_schema: Type[langchain.tools.gmail.get_message.SearchArgsSchema] = <class 'langchain.tools.gmail.get_message.SearchArgsSchema'>#
Pydantic model class to validate and parse the toolβs input arguments.
field description: str = 'Use this tool to fetch an e... | https://python.langchain.com/en/latest/reference/modules/tools.html |
e0d2e27fbce5-8 | Pydantic model class to validate and parse the toolβs input arguments.
field description: str = '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.'#
Used to tell the model how/when/why to use the tool.
You can provide few-s... | https://python.langchain.com/en/latest/reference/modules/tools.html |
e0d2e27fbce5-9 | Tool that has capability to query the Serper.dev Google Search API
and get back json.
field api_wrapper: langchain.utilities.google_serper.GoogleSerperAPIWrapper [Optional]#
pydantic model langchain.tools.GoogleSerperRun[source]#
Tool that adds the capability to query the Serper.dev Google search API.
field api_wrapper... | https://python.langchain.com/en/latest/reference/modules/tools.html |
e0d2e27fbce5-10 | Tool for getting tables names.
field powerbi: langchain.utilities.powerbi.PowerBIDataset [Required]#
pydantic model langchain.tools.MetaphorSearchResults[source]#
Tool that has capability to query the Metaphor Search API and get back json.
field api_wrapper: langchain.utilities.metaphor_search.MetaphorSearchAPIWrapper ... | https://python.langchain.com/en/latest/reference/modules/tools.html |
e0d2e27fbce5-11 | Pydantic model class to validate and parse the toolβs input arguments.
field description: str = 'Navigate a browser to the specified URL'#
Used to tell the model how/when/why to use the tool.
You can provide few-shot examples as a part of the description.
field name: str = 'navigate_browser'#
The unique name of the too... | https://python.langchain.com/en/latest/reference/modules/tools.html |
e0d2e27fbce5-12 | Get the operation object for a given path and HTTP method.
get_parameters_for_operation(operation: openapi_schema_pydantic.v3.v3_1_0.operation.Operation) β List[openapi_schema_pydantic.v3.v3_1_0.parameter.Parameter][source]#
Get the components for a given operation.
get_referenced_schema(ref: openapi_schema_pydantic.v3... | https://python.langchain.com/en/latest/reference/modules/tools.html |
e0d2e27fbce5-13 | Validators
raise_deprecation Β» all fields
validate_llm_chain_input_variables Β» llm_chain
field examples: Optional[str] = '\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... | https://python.langchain.com/en/latest/reference/modules/tools.html |
e0d2e27fbce5-14 | field 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 used... | https://python.langchain.com/en/latest/reference/modules/tools.html |
e0d2e27fbce5-15 | columns, expressions, and values. However, some functions, such as PI, do not require any arguments, but always require parentheses to indicate the null argument. For example, you must always type PI(), not PI. You can also nest functions within other functions. \n\nSome commonly used functions are:\nEVALUATE <table> -... | https://python.langchain.com/en/latest/reference/modules/tools.html |
e0d2e27fbce5-16 | VAR; EVALUATE <table> - The optional DEFINE keyword introduces one or more calculated entity definitions that exist only for the duration of the query. Definitions precede the EVALUATE statement and are valid for all EVALUATE statements in the query. Definitions can be variables, measures, tables1, and columns1. Defini... | https://python.langchain.com/en/latest/reference/modules/tools.html |
e0d2e27fbce5-17 | <filter> is a Boolean expression that is to be evaluated for 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 th... | https://python.langchain.com/en/latest/reference/modules/tools.html |
e0d2e27fbce5-18 | Functions names with an X in it can include a expression as an argument, this will be evaluated for each row in the table and the result will be used in the regular function calculation, these are the functions:\nCOUNT(<column>), COUNTA(<column>), COUNTX(<table>,<expression>), COUNTAX(<table>,<expression>), COUNTROWS([... | https://python.langchain.com/en/latest/reference/modules/tools.html |
e0d2e27fbce5-19 | Returns a date value that represents the specified year, month, and day.\nDATEDIFF(date1, 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 ... | https://python.langchain.com/en/latest/reference/modules/tools.html |
e0d2e27fbce5-20 | case you need to rewrite the DAX query to get the correct answer.\n\nThe following tables exist: {tables}\n\nand the schema\'s for some are given here:\n{schemas}\n\nExamples:\n{examples}\n\nQuestion: {tool_input}\nDAX: \n'# | https://python.langchain.com/en/latest/reference/modules/tools.html |
e0d2e27fbce5-21 | pydantic model langchain.tools.ReadFileTool[source]#
field args_schema: Type[pydantic.main.BaseModel] = <class 'langchain.tools.file_management.read.ReadFileInput'>#
Pydantic model class to validate and parse the toolβs input arguments.
field description: str = 'Read file from disk'#
Used to tell the model how/when/why... | https://python.langchain.com/en/latest/reference/modules/tools.html |
e0d2e27fbce5-22 | The input argumentsβ schema.
The tool schema.
field coroutine: Optional[Callable[[...], Awaitable[Any]]] = None#
The asynchronous version of the function.
field 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.
field func: Callabl... | https://python.langchain.com/en/latest/reference/modules/tools.html |
e0d2e27fbce5-23 | The function to run when the tool is called.
field name: str [Required]#
The unique name of the tool that clearly communicates its purpose.
field 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.
fiel... | https://python.langchain.com/en/latest/reference/modules/tools.html |
e0d2e27fbce5-24 | Pydantic model class to validate and parse the toolβs input arguments.
field description: str = 'Write file to disk'#
Used to tell the model how/when/why to use the tool.
You can provide few-shot examples as a part of the description.
field name: str = 'write_file'#
The unique name of the tool that clearly communicates... | https://python.langchain.com/en/latest/reference/modules/tools.html |
e0d2e27fbce5-25 | Parameters
action_id β 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 email from Mike Knoopβ for βGmail: find emailβ action)
params β a dict, optio... | https://python.langchain.com/en/latest/reference/modules/tools.html |
e0d2e27fbce5-26 | field params: Optional[dict] = None#
field params_schema: Dict[str, str] [Optional]#
field zapier_description: str [Required]#
langchain.tools.tool(*args: Union[str, Callable], return_direct: bool = False, args_schema: Optional[Type[pydantic.main.BaseModel]] = None, infer_schema: bool = True) β Callable[source]#
Make t... | https://python.langchain.com/en/latest/reference/modules/tools.html |
7f302f332238-0 | .rst
.pdf
SerpAPI
SerpAPI#
For backwards compatiblity.
pydantic model langchain.serpapi.SerpAPIWrapper[source]#
Wrapper around SerpAPI.
To use, you should have the google-search-results python package installed,
and the environment variable SERPAPI_API_KEY set with your API key, or pass
serpapi_api_key as a named param... | https://python.langchain.com/en/latest/reference/modules/serpapi.html |
648bb2b8f036-0 | .rst
.pdf
Agent Toolkits
Agent Toolkits#
Agent toolkits.
pydantic model langchain.agents.agent_toolkits.AzureCognitiveServicesToolkit[source]#
Toolkit for Azure Cognitive Services.
get_tools() β List[langchain.tools.base.BaseTool][source]#
Get the tools in the toolkit.
pydantic model langchain.agents.agent_toolkits.Fil... | https://python.langchain.com/en/latest/reference/modules/agent_toolkits.html |
648bb2b8f036-1 | get_tools() β List[langchain.tools.base.BaseTool][source]#
Get the tools in the toolkit.
pydantic model langchain.agents.agent_toolkits.NLAToolkit[source]#
Natural Language API Toolkit Definition.
field nla_tools: Sequence[langchain.agents.agent_toolkits.nla.tool.NLATool] [Required]#
List of API Endpoint Tools.
classme... | https://python.langchain.com/en/latest/reference/modules/agent_toolkits.html |
648bb2b8f036-2 | Instantiate the toolkit from an OpenAPI Spec URL
get_tools() β List[langchain.tools.base.BaseTool][source]#
Get the tools for all the API operations.
pydantic model langchain.agents.agent_toolkits.OpenAPIToolkit[source]#
Toolkit for interacting with a OpenAPI api.
field json_agent: langchain.agents.agent.AgentExecutor ... | https://python.langchain.com/en/latest/reference/modules/agent_toolkits.html |
648bb2b8f036-3 | field max_iterations: int = 5#
field powerbi: langchain.utilities.powerbi.PowerBIDataset [Required]#
get_tools() β List[langchain.tools.base.BaseTool][source]#
Get the tools in the toolkit.
pydantic model langchain.agents.agent_toolkits.SQLDatabaseToolkit[source]#
Toolkit for interacting with SQL databases.
field db: l... | https://python.langchain.com/en/latest/reference/modules/agent_toolkits.html |
648bb2b8f036-4 | Get the tools in the toolkit.
pydantic model langchain.agents.agent_toolkits.VectorStoreToolkit[source]#
Toolkit for interacting with a vector store.
field llm: langchain.base_language.BaseLanguageModel [Optional]#
field vectorstore_info: langchain.agents.agent_toolkits.vectorstore.toolkit.VectorStoreInfo [Required]#
g... | https://python.langchain.com/en/latest/reference/modules/agent_toolkits.html |
648bb2b8f036-5 | langchain.agents.agent_toolkits.create_json_agent(llm: langchain.base_language.BaseLanguageModel, toolkit: langchain.agents.agent_toolkits.json.toolkit.JsonToolkit, callback_manager: Optional[langchain.callbacks.base.BaseCallbackManager] = None, prefix: str = 'You are an agent designed to interact with JSON.\nYour goal... | https://python.langchain.com/en/latest/reference/modules/agent_toolkits.html |
648bb2b8f036-6 | you cannot use it.\nYou should only add one key at a time to the path. You cannot add multiple keys at once.\nIf you encounter a "KeyError", go back to the previous key, look at the available keys, and try again.\n\nIf the question does not seem to be related to the JSON, just return "I don\'t know" as the answer.\nAlw... | https://python.langchain.com/en/latest/reference/modules/agent_toolkits.html |
648bb2b8f036-7 | str = 'Begin!"\n\nQuestion: {input}\nThought: I should look at the keys that exist in data to see what I have access to\n{agent_scratchpad}', format_instructions: str = 'Use the following format:\n\nQuestion: the input question you must answer\nThought: you should always think about what to do\nAction: the action to ta... | https://python.langchain.com/en/latest/reference/modules/agent_toolkits.html |
648bb2b8f036-8 | Construct a json agent from an LLM and tools. | https://python.langchain.com/en/latest/reference/modules/agent_toolkits.html |
648bb2b8f036-9 | langchain.agents.agent_toolkits.create_openapi_agent(llm: langchain.base_language.BaseLanguageModel, toolkit: langchain.agents.agent_toolkits.openapi.toolkit.OpenAPIToolkit, callback_manager: Optional[langchain.callbacks.base.BaseCallbackManager] = None, prefix: str = "You are an agent designed to answer questions by m... | https://python.langchain.com/en/latest/reference/modules/agent_toolkits.html |
648bb2b8f036-10 | checking which parameters are required. For parameters with a fixed set of values, please use the spec to look at which values are allowed.\n\nUse the exact parameter names as listed in the spec, do not make up any names or abbreviate the names of parameters.\nIf you get a not found error, ensure that you are using a p... | https://python.langchain.com/en/latest/reference/modules/agent_toolkits.html |
648bb2b8f036-11 | None, max_iterations: Optional[int] = 15, max_execution_time: Optional[float] = None, early_stopping_method: str = 'force', verbose: bool = False, return_intermediate_steps: bool = False, agent_executor_kwargs: Optional[Dict[str, Any]] = None, **kwargs: Dict[str, Any]) β langchain.agents.agent.AgentExecutor[source]# | https://python.langchain.com/en/latest/reference/modules/agent_toolkits.html |
648bb2b8f036-12 | Construct a json agent from an LLM and tools.
langchain.agents.agent_toolkits.create_pandas_dataframe_agent(llm: langchain.base_language.BaseLanguageModel, df: Any, callback_manager: Optional[langchain.callbacks.base.BaseCallbackManager] = None, prefix: Optional[str] = None, suffix: Optional[str] = None, input_variable... | https://python.langchain.com/en/latest/reference/modules/agent_toolkits.html |
648bb2b8f036-13 | langchain.agents.agent_toolkits.create_pbi_agent(llm: langchain.base_language.BaseLanguageModel, toolkit: Optional[langchain.agents.agent_toolkits.powerbi.toolkit.PowerBIToolkit], powerbi: Optional[langchain.utilities.powerbi.PowerBIDataset] = None, callback_manager: Optional[langchain.callbacks.base.BaseCallbackManage... | https://python.langchain.com/en/latest/reference/modules/agent_toolkits.html |
648bb2b8f036-14 | easily readible format for a human, also make sure to represent numbers in readable ways, like 1M instead of 1000000. Unless the user specifies a specific number of examples they wish to obtain, always limit your query to at most {top_k} results.\n', suffix: str = 'Begin!\n\nQuestion: {input}\nThought: I can first ask ... | https://python.langchain.com/en/latest/reference/modules/agent_toolkits.html |
648bb2b8f036-15 | None, input_variables: Optional[List[str]] = None, top_k: int = 10, verbose: bool = False, agent_executor_kwargs: Optional[Dict[str, Any]] = None, **kwargs: Dict[str, Any]) β langchain.agents.agent.AgentExecutor[source]# | https://python.langchain.com/en/latest/reference/modules/agent_toolkits.html |
648bb2b8f036-16 | Construct a pbi agent from an LLM and tools. | https://python.langchain.com/en/latest/reference/modules/agent_toolkits.html |
648bb2b8f036-17 | langchain.agents.agent_toolkits.create_pbi_chat_agent(llm: langchain.chat_models.base.BaseChatModel, toolkit: Optional[langchain.agents.agent_toolkits.powerbi.toolkit.PowerBIToolkit], powerbi: Optional[langchain.utilities.powerbi.PowerBIDataset] = None, callback_manager: Optional[langchain.callbacks.base.BaseCallbackMa... | https://python.langchain.com/en/latest/reference/modules/agent_toolkits.html |
648bb2b8f036-18 | multiple rows are asked find a way to write that in a easily readible format for a human, also make sure to represent numbers in readable ways, like 1M instead of 1000000. Unless the user specifies a specific number of examples they wish to obtain, always limit your query to at most {top_k} results.\n', suffix: str = "... | https://python.langchain.com/en/latest/reference/modules/agent_toolkits.html |
648bb2b8f036-19 | Construct a pbi agent from an Chat LLM and tools.
If you supply only a toolkit and no powerbi dataset, the same LLM is used for both.
langchain.agents.agent_toolkits.create_python_agent(llm: langchain.base_language.BaseLanguageModel, tool: langchain.tools.python.tool.PythonREPLTool, callback_manager: Optional[langchain... | https://python.langchain.com/en/latest/reference/modules/agent_toolkits.html |
648bb2b8f036-20 | Construct a python agent from an LLM and tool.
langchain.agents.agent_toolkits.create_spark_dataframe_agent(llm: langchain.llms.base.BaseLLM, df: Any, callback_manager: Optional[langchain.callbacks.base.BaseCallbackManager] = None, prefix: str = '\nYou are working with a spark dataframe in Python. The name of the dataf... | https://python.langchain.com/en/latest/reference/modules/agent_toolkits.html |
648bb2b8f036-21 | langchain.agents.agent_toolkits.create_spark_sql_agent(llm: langchain.base_language.BaseLanguageModel, toolkit: langchain.agents.agent_toolkits.spark_sql.toolkit.SparkSQLToolkit, callback_manager: Optional[langchain.callbacks.base.BaseCallbackManager] = None, prefix: str = 'You are an agent designed to interact with Sp... | https://python.langchain.com/en/latest/reference/modules/agent_toolkits.html |
648bb2b8f036-22 | a query, rewrite the query and try again.\n\nDO NOT make any DML statements (INSERT, UPDATE, DELETE, DROP etc.) to the database.\n\nIf the question does not seem related to the database, just return "I don\'t know" as the answer.\n', suffix: str = 'Begin!\n\nQuestion: {input}\nThought: I should look at the tables in th... | https://python.langchain.com/en/latest/reference/modules/agent_toolkits.html |
648bb2b8f036-23 | early_stopping_method: str = 'force', verbose: bool = False, agent_executor_kwargs: Optional[Dict[str, Any]] = None, **kwargs: Dict[str, Any]) β langchain.agents.agent.AgentExecutor[source]# | https://python.langchain.com/en/latest/reference/modules/agent_toolkits.html |
648bb2b8f036-24 | Construct a sql agent from an LLM and tools. | https://python.langchain.com/en/latest/reference/modules/agent_toolkits.html |
648bb2b8f036-25 | langchain.agents.agent_toolkits.create_sql_agent(llm: langchain.base_language.BaseLanguageModel, toolkit: langchain.agents.agent_toolkits.sql.toolkit.SQLDatabaseToolkit, callback_manager: Optional[langchain.callbacks.base.BaseCallbackManager] = None, prefix: str = 'You are an agent designed to interact with a SQL datab... | https://python.langchain.com/en/latest/reference/modules/agent_toolkits.html |
648bb2b8f036-26 | query, rewrite the query and try again.\n\nDO NOT make any DML statements (INSERT, UPDATE, DELETE, DROP etc.) to the database.\n\nIf the question does not seem related to the database, just return "I don\'t know" as the answer.\n', suffix: str = 'Begin!\n\nQuestion: {input}\nThought: I should look at the tables in the ... | https://python.langchain.com/en/latest/reference/modules/agent_toolkits.html |
648bb2b8f036-27 | early_stopping_method: str = 'force', verbose: bool = False, agent_executor_kwargs: Optional[Dict[str, Any]] = None, **kwargs: Dict[str, Any]) β langchain.agents.agent.AgentExecutor[source]# | https://python.langchain.com/en/latest/reference/modules/agent_toolkits.html |
648bb2b8f036-28 | Construct a sql agent from an LLM and tools.
langchain.agents.agent_toolkits.create_vectorstore_agent(llm: langchain.base_language.BaseLanguageModel, toolkit: langchain.agents.agent_toolkits.vectorstore.toolkit.VectorStoreToolkit, callback_manager: Optional[langchain.callbacks.base.BaseCallbackManager] = None, prefix: ... | https://python.langchain.com/en/latest/reference/modules/agent_toolkits.html |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.