id stringlengths 14 16 | text stringlengths 4 1.28k | source stringlengths 54 121 |
|---|---|---|
159549d20e18-32 | attribute 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 integ... | https://api.python.langchain.com/en/latest/modules/memory.html |
159549d20e18-33 | military base in Nevada.\nAI: What do you know about Nevada?\nLast line of conversation:\nPerson #1: It's a state in the US. 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 hi... | https://api.python.langchain.com/en/latest/modules/memory.html |
159549d20e18-34 | was a French philosopher, mathematician, and scientist who lived in the 17th century.\nPerson #1: The Descartes I'm referring to is a standup comedian and interior designer from Montreal.\nAI: Oh yes, He is a comedian and an interior designer. He has been in the industry for 30 years. His favorite food is baked bean pi... | https://api.python.langchain.com/en/latest/modules/memory.html |
159549d20e18-35 | attribute llm: langchain.base_language.BaseLanguageModel [Required]ο
attribute summary_message_cls: Type[langchain.schema.BaseMessage] = <class 'langchain.schema.SystemMessage'>ο
Number of previous utterances to include in the context.
clear()[source]ο
Clear memory contents.
Return type
None
get_current_entities(input_... | https://api.python.langchain.com/en/latest/modules/memory.html |
159549d20e18-36 | Parameters
inputs (Dict[str, Any]) β
outputs (Dict[str, str]) β
Return type
None
class langchain.memory.ConversationStringBufferMemory(*, human_prefix='Human', ai_prefix='AI', buffer='', output_key=None, input_key=None, memory_key='history')[source]ο
Bases: langchain.schema.BaseMemory
Buffer for storing conversation ... | https://api.python.langchain.com/en/latest/modules/memory.html |
159549d20e18-37 | attribute output_key: Optional[str] = Noneο
clear()[source]ο
Clear memory contents.
Return type
None
load_memory_variables(inputs)[source]ο
Return history buffer.
Parameters
inputs (Dict[str, Any]) β
Return type
Dict[str, str]
save_context(inputs, outputs)[source]ο
Save context from this conversation to buffer.
Parame... | https://api.python.langchain.com/en/latest/modules/memory.html |
159549d20e18-38 | class langchain.memory.ConversationSummaryBufferMemory(*, human_prefix='Human', ai_prefix='AI', llm, prompt=PromptTemplate(input_variables=['summary', 'new_lines'], output_parser=None, partial_variables={}, template='Progressively summarize the lines of conversation provided, adding onto the previous summary returning ... | https://api.python.langchain.com/en/latest/modules/memory.html |
159549d20e18-39 | summary:', template_format='f-string', validate_template=True), summary_message_cls=<class 'langchain.schema.SystemMessage'>, chat_memory=None, output_key=None, input_key=None, return_messages=False, max_token_limit=2000, moving_summary_buffer='', memory_key='history')[source]ο | https://api.python.langchain.com/en/latest/modules/memory.html |
159549d20e18-40 | Bases: langchain.memory.chat_memory.BaseChatMemory, langchain.memory.summary.SummarizerMixin
Buffer with summarizer for storing conversation memory.
Parameters
human_prefix (str) β
ai_prefix (str) β
llm (langchain.base_language.BaseLanguageModel) β
prompt (langchain.prompts.base.BasePromptTemplate) β
summary_messag... | https://api.python.langchain.com/en/latest/modules/memory.html |
159549d20e18-41 | clear()[source]ο
Clear memory contents.
Return type
None
load_memory_variables(inputs)[source]ο
Return history buffer.
Parameters
inputs (Dict[str, Any]) β
Return type
Dict[str, Any]
prune()[source]ο
Prune buffer if it exceeds max token limit
Return type
None
save_context(inputs, outputs)[source]ο
Save context from th... | https://api.python.langchain.com/en/latest/modules/memory.html |
159549d20e18-42 | class langchain.memory.ConversationSummaryMemory(*, human_prefix='Human', ai_prefix='AI', llm, prompt=PromptTemplate(input_variables=['summary', 'new_lines'], output_parser=None, partial_variables={}, template='Progressively summarize the lines of conversation provided, adding onto the previous summary returning a new ... | https://api.python.langchain.com/en/latest/modules/memory.html |
159549d20e18-43 | summary:', template_format='f-string', validate_template=True), summary_message_cls=<class 'langchain.schema.SystemMessage'>, chat_memory=None, output_key=None, input_key=None, return_messages=False, buffer='', memory_key='history')[source]ο | https://api.python.langchain.com/en/latest/modules/memory.html |
159549d20e18-44 | Bases: langchain.memory.chat_memory.BaseChatMemory, langchain.memory.summary.SummarizerMixin
Conversation summarizer to memory.
Parameters
human_prefix (str) β
ai_prefix (str) β
llm (langchain.base_language.BaseLanguageModel) β
prompt (langchain.prompts.base.BasePromptTemplate) β
summary_message_cls (Type[langchain... | https://api.python.langchain.com/en/latest/modules/memory.html |
159549d20e18-45 | Parameters
llm (langchain.base_language.BaseLanguageModel) β
chat_memory (langchain.schema.BaseChatMessageHistory) β
summarize_step (int) β
kwargs (Any) β
Return type
langchain.memory.summary.ConversationSummaryMemory
load_memory_variables(inputs)[source]ο
Return history buffer.
Parameters
inputs (Dict[str, Any]) β... | https://api.python.langchain.com/en/latest/modules/memory.html |
159549d20e18-46 | Bases: langchain.memory.chat_memory.BaseChatMemory
Buffer for storing conversation memory.
Parameters
chat_memory (langchain.schema.BaseChatMessageHistory) β
output_key (Optional[str]) β
input_key (Optional[str]) β
return_messages (bool) β
human_prefix (str) β
ai_prefix (str) β
llm (langchain.base_language.BaseLa... | https://api.python.langchain.com/en/latest/modules/memory.html |
159549d20e18-47 | Return history buffer.
Parameters
inputs (Dict[str, Any]) β
Return type
Dict[str, Any]
save_context(inputs, outputs)[source]ο
Save context from this conversation to buffer. Pruned.
Parameters
inputs (Dict[str, Any]) β
outputs (Dict[str, str]) β
Return type
None
property buffer: List[langchain.schema.BaseMessage]ο
St... | https://api.python.langchain.com/en/latest/modules/memory.html |
159549d20e18-48 | session_id (str) β
user_id (str) β
credential (Any) β
connection_string (Optional[str]) β
ttl (Optional[int]) β
cosmos_client_kwargs (Optional[dict]) β
prepare_cosmos()[source]ο
Prepare the CosmosDB client.
Use this function or the context manager to make sure your database is ready.
Return type
None
load_message... | https://api.python.langchain.com/en/latest/modules/memory.html |
159549d20e18-49 | Return type
None
class langchain.memory.DynamoDBChatMessageHistory(table_name, session_id, endpoint_url=None)[source]ο
Bases: langchain.schema.BaseChatMessageHistory
Chat message history that stores history in AWS DynamoDB.
This class expects that a DynamoDB table with name table_name
and a partition Key of SessionId i... | https://api.python.langchain.com/en/latest/modules/memory.html |
159549d20e18-50 | Retrieve the messages from DynamoDB
add_message(message)[source]ο
Append the message to the record in DynamoDB
Parameters
message (langchain.schema.BaseMessage) β
Return type
None
clear()[source]ο
Clear session memory from DynamoDB
Return type
None
class langchain.memory.FileChatMessageHistory(file_path)[source]ο
Base... | https://api.python.langchain.com/en/latest/modules/memory.html |
159549d20e18-51 | Return type
None
class langchain.memory.InMemoryEntityStore(*, store={})[source]ο
Bases: langchain.memory.entity.BaseEntityStore
Basic in-memory entity store.
Parameters
store (Dict[str, Optional[str]]) β
Return type
None
attribute store: Dict[str, Optional[str]] = {}ο
clear()[source]ο
Delete all entities from store.
... | https://api.python.langchain.com/en/latest/modules/memory.html |
159549d20e18-52 | Return type
Optional[str]
set(key, value)[source]ο
Set entity value in store.
Parameters
key (str) β
value (Optional[str]) β
Return type
None
class langchain.memory.MomentoChatMessageHistory(session_id, cache_client, cache_name, *, key_prefix='message_store:', ttl=None, ensure_cache_exists=True)[source]ο
Bases: langc... | https://api.python.langchain.com/en/latest/modules/memory.html |
159549d20e18-53 | ensure_cache_exists (bool) β
classmethod from_client_params(session_id, cache_name, ttl, *, configuration=None, auth_token=None, **kwargs)[source]ο
Construct cache from CacheClient parameters.
Parameters
session_id (str) β
cache_name (str) β
ttl (timedelta) β
configuration (Optional[momento.config.Configuration]) β... | https://api.python.langchain.com/en/latest/modules/memory.html |
159549d20e18-54 | Raises
SdkException β Momento service or network error.
Exception β Unexpected response.
Return type
None
clear()[source]ο
Remove the sessionβs messages from the cache.
Raises
SdkException β Momento service or network error.
Exception β Unexpected response.
Return type
None
class langchain.memory.MongoDBChatMessageHist... | https://api.python.langchain.com/en/latest/modules/memory.html |
159549d20e18-55 | Retrieve the messages from MongoDB
add_message(message)[source]ο
Append the message to the record in MongoDB
Parameters
message (langchain.schema.BaseMessage) β
Return type
None
clear()[source]ο
Clear session memory from MongoDB
Return type
None
class langchain.memory.MotorheadMemory(*, chat_memory=None, output_key=No... | https://api.python.langchain.com/en/latest/modules/memory.html |
159549d20e18-56 | session_id (str) β
context (Optional[str]) β
api_key (Optional[str]) β
client_id (Optional[str]) β
timeout (int) β
memory_key (str) β
Return type
None
attribute api_key: Optional[str] = Noneο
attribute client_id: Optional[str] = Noneο
attribute context: Optional[str] = Noneο
attribute session_id: str [Required]ο
... | https://api.python.langchain.com/en/latest/modules/memory.html |
159549d20e18-57 | Return type
Dict[str, Any]
save_context(inputs, outputs)[source]ο
Save context from this conversation to buffer.
Parameters
inputs (Dict[str, Any]) β
outputs (Dict[str, str]) β
Return type
None
property memory_variables: List[str]ο
Input keys this memory class will load dynamically.
class langchain.memory.PostgresCha... | https://api.python.langchain.com/en/latest/modules/memory.html |
159549d20e18-58 | Append the message to the record in PostgreSQL
Parameters
message (langchain.schema.BaseMessage) β
Return type
None
clear()[source]ο
Clear session memory from PostgreSQL
Return type
None
class langchain.memory.ReadOnlySharedMemory(*, memory)[source]ο
Bases: langchain.schema.BaseMemory
A memory wrapper that is read-onl... | https://api.python.langchain.com/en/latest/modules/memory.html |
159549d20e18-59 | Nothing should be saved or changed
Parameters
inputs (Dict[str, Any]) β
outputs (Dict[str, str]) β
Return type
None
property memory_variables: List[str]ο
Return memory variables.
class langchain.memory.RedisChatMessageHistory(session_id, url='redis://localhost:6379/0', key_prefix='message_store:', ttl=None)[source]ο
... | https://api.python.langchain.com/en/latest/modules/memory.html |
159549d20e18-60 | Parameters
message (langchain.schema.BaseMessage) β
Return type
None
clear()[source]ο
Clear session memory from Redis
Return type
None
class langchain.memory.RedisEntityStore(session_id='default', url='redis://localhost:6379/0', key_prefix='memory_store', ttl=86400, recall_ttl=259200, *args, redis_client=None)[source]... | https://api.python.langchain.com/en/latest/modules/memory.html |
159549d20e18-61 | Return type
None
attribute key_prefix: str = 'memory_store'ο
attribute recall_ttl: Optional[int] = 259200ο
attribute redis_client: Any = Noneο
attribute session_id: str = 'default'ο
attribute ttl: Optional[int] = 86400ο
clear()[source]ο
Delete all entities from store.
Return type
None
delete(key)[source]ο
Delete entity... | https://api.python.langchain.com/en/latest/modules/memory.html |
159549d20e18-62 | set(key, value)[source]ο
Set entity value in store.
Parameters
key (str) β
value (Optional[str]) β
Return type
None
property full_key_prefix: strο
class langchain.memory.SQLChatMessageHistory(session_id, connection_string, table_name='message_store')[source]ο
Bases: langchain.schema.BaseChatMessageHistory
Chat messag... | https://api.python.langchain.com/en/latest/modules/memory.html |
159549d20e18-63 | Return type
None
class langchain.memory.SQLiteEntityStore(session_id='default', db_file='entities.db', table_name='memory_store', *args)[source]ο
Bases: langchain.memory.entity.BaseEntityStore
SQLite-backed Entity store
Parameters
session_id (str) β
db_file (str) β
table_name (str) β
args (Any) β
Return type
None
a... | https://api.python.langchain.com/en/latest/modules/memory.html |
159549d20e18-64 | Return type
bool
get(key, default=None)[source]ο
Get entity value from store.
Parameters
key (str) β
default (Optional[str]) β
Return type
Optional[str]
set(key, value)[source]ο
Set entity value in store.
Parameters
key (str) β
value (Optional[str]) β
Return type
None
property full_table_name: strο
class langchain.... | https://api.python.langchain.com/en/latest/modules/memory.html |
159549d20e18-65 | Return type
None
load_memory_variables(inputs)[source]ο
Return key-value pairs given the text input to the chain.
If None, return all memories
Parameters
inputs (Dict[str, Any]) β
Return type
Dict[str, str]
save_context(inputs, outputs)[source]ο
Nothing should be saved or changed, my memory is set in stone.
Parameters... | https://api.python.langchain.com/en/latest/modules/memory.html |
159549d20e18-66 | Parameters
retriever (langchain.vectorstores.base.VectorStoreRetriever) β
memory_key (str) β
input_key (Optional[str]) β
return_docs (bool) β
Return type
None
attribute input_key: Optional[str] = Noneο
Key name to index the inputs to load_memory_variables.
attribute memory_key: str = 'history'ο
Key name to locate t... | https://api.python.langchain.com/en/latest/modules/memory.html |
159549d20e18-67 | inputs (Dict[str, Any]) β
Return type
Dict[str, Union[List[langchain.schema.Document], str]]
save_context(inputs, outputs)[source]ο
Save context from this conversation to buffer.
Parameters
inputs (Dict[str, Any]) β
outputs (Dict[str, str]) β
Return type
None
property memory_variables: List[str]ο
The list of keys em... | https://api.python.langchain.com/en/latest/modules/memory.html |
159549d20e18-68 | )
# Use a standard ConversationBufferMemory to encapsulate the Zep chat history
memory = ConversationBufferMemory(
memory_key="chat_history", chat_memory=zep_chat_history
)
Zep provides long-term conversation storage for LLM apps. The server stores,
summarizes, embeds, indexes, and enriches conversational AI chat
h... | https://api.python.langchain.com/en/latest/modules/memory.html |
159549d20e18-69 | Return type
None
property messages: List[langchain.schema.BaseMessage]ο
Retrieve messages from Zep memory
property zep_messages: List[Message]ο
Retrieve summary from Zep memory
property zep_summary: Optional[str]ο
Retrieve summary from Zep memory
add_message(message)[source]ο
Append the message to the Zep memory histor... | https://api.python.langchain.com/en/latest/modules/memory.html |
159549d20e18-70 | Return type
None | https://api.python.langchain.com/en/latest/modules/memory.html |
0d6fa1b1b310-0 | Output Parsersο
class langchain.output_parsers.BooleanOutputParser(*, true_val='YES', false_val='NO')[source]ο
Bases: langchain.schema.BaseOutputParser[bool]
Parameters
true_val (str) β
false_val (str) β
Return type
None
attribute false_val: str = 'NO'ο
attribute true_val: str = 'YES'ο
parse(text)[source]ο
Parse the ... | https://api.python.langchain.com/en/latest/modules/output_parsers.html |
0d6fa1b1b310-1 | Return type
None
attribute parsers: List[langchain.schema.BaseOutputParser] [Required]ο
get_format_instructions()[source]ο
Instructions on how the LLM output should be formatted.
Return type
str
parse(text)[source]ο
Parse the output of an LLM call.
Parameters
text (str) β
Return type
Dict[str, Any]
class langchain.out... | https://api.python.langchain.com/en/latest/modules/output_parsers.html |
0d6fa1b1b310-2 | Return type
List[str]
class langchain.output_parsers.DatetimeOutputParser(*, format='%Y-%m-%dT%H:%M:%S.%fZ')[source]ο
Bases: langchain.schema.BaseOutputParser[datetime.datetime]
Parameters
format (str) β
Return type
None
attribute format: str = '%Y-%m-%dT%H:%M:%S.%fZ'ο
get_format_instructions()[source]ο
Instructions o... | https://api.python.langchain.com/en/latest/modules/output_parsers.html |
0d6fa1b1b310-3 | structured output
Return type
datetime.datetime
class langchain.output_parsers.EnumOutputParser(*, enum)[source]ο
Bases: langchain.schema.BaseOutputParser
Parameters
enum (Type[enum.Enum]) β
Return type
None
attribute enum: Type[enum.Enum] [Required]ο
get_format_instructions()[source]ο
Instructions on how the LLM outp... | https://api.python.langchain.com/en/latest/modules/output_parsers.html |
0d6fa1b1b310-4 | Bases: langchain.schema.BaseOutputParser
Parameters
guard (Any) β
api (Optional[Callable]) β
args (Any) β
kwargs (Any) β
Return type
None
attribute api: Optional[Callable] = Noneο
attribute args: Any = Noneο
attribute guard: Any = Noneο
attribute kwargs: Any = Noneο
classmethod from_rail(rail_file, num_reasks=1, ap... | https://api.python.langchain.com/en/latest/modules/output_parsers.html |
0d6fa1b1b310-5 | classmethod from_rail_string(rail_str, num_reasks=1, api=None, *args, **kwargs)[source]ο
Parameters
rail_str (str) β
num_reasks (int) β
api (Optional[Callable]) β
args (Any) β
kwargs (Any) β
Return type
langchain.output_parsers.rail_parser.GuardrailsOutputParser
get_format_instructions()[source]ο
Instructions on h... | https://api.python.langchain.com/en/latest/modules/output_parsers.html |
0d6fa1b1b310-6 | Bases: langchain.schema.BaseOutputParser
Class to parse the output of an LLM call to a list.
Return type
None
abstract parse(text)[source]ο
Parse the output of an LLM call.
Parameters
text (str) β
Return type
List[str]
class langchain.output_parsers.OutputFixingParser(*, parser, retry_chain)[source]ο
Bases: langchain.... | https://api.python.langchain.com/en/latest/modules/output_parsers.html |
0d6fa1b1b310-7 | attribute retry_chain: langchain.chains.llm.LLMChain [Required]ο
classmethod from_llm(llm, parser, prompt=PromptTemplate(input_variables=['completion', 'error', 'instructions'], output_parser=None, partial_variables={}, template='Instructions:\n--------------\n{instructions}\n--------------\nCompletion:\n--------------... | https://api.python.langchain.com/en/latest/modules/output_parsers.html |
0d6fa1b1b310-8 | Return type
langchain.output_parsers.fix.OutputFixingParser[langchain.output_parsers.fix.T]
get_format_instructions()[source]ο
Instructions on how the LLM output should be formatted.
Return type
str
parse(completion)[source]ο
Parse the output of an LLM call.
A method which takes in a string (assumed output of a languag... | https://api.python.langchain.com/en/latest/modules/output_parsers.html |
0d6fa1b1b310-9 | Return type
None
attribute pydantic_object: Type[langchain.output_parsers.pydantic.T] [Required]ο
get_format_instructions()[source]ο
Instructions on how the LLM output should be formatted.
Return type
str
parse(text)[source]ο
Parse the output of an LLM call.
A method which takes in a string (assumed output of a languag... | https://api.python.langchain.com/en/latest/modules/output_parsers.html |
0d6fa1b1b310-10 | Parameters
regex_pattern (str) β
output_key_to_format (Dict[str, str]) β
no_update_value (Optional[str]) β
Return type
None
attribute no_update_value: Optional[str] = Noneο
attribute output_key_to_format: Dict[str, str] [Required]ο
attribute regex_pattern: str = "{}:\\s?([^.'\\n']*)\\.?"ο
parse(text)[source]ο
Parse ... | https://api.python.langchain.com/en/latest/modules/output_parsers.html |
0d6fa1b1b310-11 | default_output_key (Optional[str]) β
Return type
None
attribute default_output_key: Optional[str] = Noneο
attribute output_keys: List[str] [Required]ο
attribute regex: str [Required]ο
parse(text)[source]ο
Parse the output of an LLM call.
Parameters
text (str) β
Return type
Dict[str, str]
class langchain.output_parser... | https://api.python.langchain.com/en/latest/modules/output_parsers.html |
0d6fa1b1b310-12 | class langchain.output_parsers.RetryOutputParser(*, parser, retry_chain)[source]ο
Bases: langchain.schema.BaseOutputParser[langchain.output_parsers.retry.T]
Wraps a parser and tries to fix parsing errors.
Does this by passing the original prompt and the completion to another
LLM, and telling it the completion did not s... | https://api.python.langchain.com/en/latest/modules/output_parsers.html |
0d6fa1b1b310-13 | classmethod from_llm(llm, parser, prompt=PromptTemplate(input_variables=['completion', 'prompt'], output_parser=None, partial_variables={}, template='Prompt:\n{prompt}\nCompletion:\n{completion}\n\nAbove, the Completion did not satisfy the constraints given in the Prompt.\nPlease try again:', template_format='f-string'... | https://api.python.langchain.com/en/latest/modules/output_parsers.html |
0d6fa1b1b310-14 | 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
completion (str) β
Returns
structured output
Return type
langchain.output_parsers.retry.T
parse_with_prompt(completion, prompt_value)[sou... | https://api.python.langchain.com/en/latest/modules/output_parsers.html |
0d6fa1b1b310-15 | Bases: langchain.schema.BaseOutputParser[langchain.output_parsers.retry.T]
Wraps a parser and tries to fix parsing errors.
Does this by passing the original prompt, the completion, AND the error
that was raised to another language model and telling it that the completion
did not work, and raised the given error. Differ... | https://api.python.langchain.com/en/latest/modules/output_parsers.html |
0d6fa1b1b310-16 | classmethod from_llm(llm, parser, prompt=PromptTemplate(input_variables=['completion', 'error', 'prompt'], output_parser=None, partial_variables={}, template='Prompt:\n{prompt}\nCompletion:\n{completion}\n\nAbove, the Completion did not satisfy the constraints given in the Prompt.\nDetails: {error}\nPlease try again:',... | https://api.python.langchain.com/en/latest/modules/output_parsers.html |
0d6fa1b1b310-17 | str
parse(completion)[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
completion (str) β
Returns
structured output
Return type
langchain.output_parsers.retry.T
parse_with_promp... | https://api.python.langchain.com/en/latest/modules/output_parsers.html |
0d6fa1b1b310-18 | langchain.output_parsers.retry.T
class langchain.output_parsers.StructuredOutputParser(*, response_schemas)[source]ο
Bases: langchain.schema.BaseOutputParser
Parameters
response_schemas (List[langchain.output_parsers.structured.ResponseSchema]) β
Return type
None
attribute response_schemas: List[langchain.output_parse... | https://api.python.langchain.com/en/latest/modules/output_parsers.html |
0d6fa1b1b310-19 | and parses it into some structure.
Parameters
text (str) β output of language model
Returns
structured output
Return type
Any | https://api.python.langchain.com/en/latest/modules/output_parsers.html |
1a14bb6b1a14-0 | Toolsο
Core toolkit implementations.
class langchain.tools.AIPluginTool(*, name, description, args_schema=<class 'langchain.tools.plugin.AIPluginToolSchema'>, return_direct=False, verbose=False, callbacks=None, callback_manager=None, handle_tool_error=False, plugin, api_spec)[source]ο
Bases: langchain.tools.base.BaseTo... | https://api.python.langchain.com/en/latest/modules/tools.html |
1a14bb6b1a14-1 | plugin (langchain.tools.plugin.AIPlugin) β
api_spec (str) β
Return type
None
attribute api_spec: str [Required]ο
attribute args_schema: Type[AIPluginToolSchema] = <class 'langchain.tools.plugin.AIPluginToolSchema'>ο
Pydantic model class to validate and parse the toolβs input arguments.
attribute plugin: AIPlugin [Req... | https://api.python.langchain.com/en/latest/modules/tools.html |
1a14bb6b1a14-2 | base_url (str) β
path (str) β
method (langchain.utilities.openapi.HTTPVerb) β
properties (Sequence[langchain.tools.openapi.utils.api_models.APIProperty]) β
request_body (Optional[langchain.tools.openapi.utils.api_models.APIRequestBody]) β
Return type
None
attribute base_url: str [Required]ο
The base URL of the ope... | https://api.python.langchain.com/en/latest/modules/tools.html |
1a14bb6b1a14-3 | attribute request_body: Optional[langchain.tools.openapi.utils.api_models.APIRequestBody] = Noneο
The request body of the operation.
classmethod from_openapi_spec(spec, path, method)[source]ο
Create an APIOperation from an OpenAPI spec.
Parameters
spec (langchain.utilities.openapi.OpenAPISpec) β
path (str) β
method (... | https://api.python.langchain.com/en/latest/modules/tools.html |
1a14bb6b1a14-4 | Return type
str
static ts_type_from_python(type_)[source]ο
Parameters
type_ (Union[str, Type, tuple, None, enum.Enum]) β
Return type
str
property body_params: List[str]ο
property path_params: List[str]ο
property query_params: List[str]ο
class langchain.tools.ArxivQueryRun(*, name='arxiv', description='A wrapper around... | https://api.python.langchain.com/en/latest/modules/tools.html |
1a14bb6b1a14-5 | 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]]) β
callback_manager (Optional[langchain.callbacks... | https://api.python.langchain.com/en/latest/modules/tools.html |
1a14bb6b1a14-6 | class langchain.tools.AzureCogsFormRecognizerTool(*, name='azure_cognitive_services_form_recognizer', description='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=None, ret... | https://api.python.langchain.com/en/latest/modules/tools.html |
1a14bb6b1a14-7 | 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]]) β
callback_manager (Optional[langchain.callbacks... | https://api.python.langchain.com/en/latest/modules/tools.html |
1a14bb6b1a14-8 | Return type
None
class langchain.tools.AzureCogsImageAnalysisTool(*, name='azure_cognitive_services_image_analysis', description='A wrapper around Azure Cognitive Services Image Analysis. Useful for when you need to analyze images. Input should be a url to an image.', args_schema=None, return_direct=False, verbose=Fals... | https://api.python.langchain.com/en/latest/modules/tools.html |
1a14bb6b1a14-9 | 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 |
1a14bb6b1a14-10 | Return type
None
class langchain.tools.AzureCogsSpeech2TextTool(*, name='azure_cognitive_services_speech2text', description='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=None, return_direct=False, verbo... | https://api.python.langchain.com/en/latest/modules/tools.html |
1a14bb6b1a14-11 | 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]]) β
callback_manager (Optional[langchain.callbacks.base.BaseCallbackManager... | https://api.python.langchain.com/en/latest/modules/tools.html |
1a14bb6b1a14-12 | Return type
None
class langchain.tools.AzureCogsText2SpeechTool(*, name='azure_cognitive_services_text2speech', description='A wrapper around Azure Cognitive Services Text2Speech. Useful for when you need to convert text to speech. ', args_schema=None, return_direct=False, verbose=False, callbacks=None, callback_manage... | https://api.python.langchain.com/en/latest/modules/tools.html |
1a14bb6b1a14-13 | 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 |
1a14bb6b1a14-14 | Return type
None
class langchain.tools.BaseGraphQLTool(*, name='query_graphql', description="Β Β Β Input to this tool is a detailed and correct GraphQL query, output is a result from the API.\nΒ Β Β If the query is not correct, an error message will be returned.\nΒ Β Β If an error is returned with 'Bad request' in it, rewrit... | https://api.python.langchain.com/en/latest/modules/tools.html |
1a14bb6b1a14-15 | 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]]) β
callback_manager (Optional[langchain.callbacks.base.BaseCallbackManager... | https://api.python.langchain.com/en/latest/modules/tools.html |
1a14bb6b1a14-16 | Return type
None
attribute requests_wrapper: langchain.requests.TextRequestsWrapper [Required]ο
class langchain.tools.BaseSQLDatabaseTool(*, db)[source]ο
Bases: pydantic.main.BaseModel
Base tool for interacting with a SQL database.
Parameters
db (langchain.sql_database.SQLDatabase) β
Return type
None
attribute db: lan... | https://api.python.langchain.com/en/latest/modules/tools.html |
1a14bb6b1a14-17 | class langchain.tools.BaseTool(*, name, description, args_schema=None, return_direct=False, verbose=False, callbacks=None, callback_manager=None, handle_tool_error=False)[source]ο
Bases: abc.ABC, pydantic.main.BaseModel
Interface LangChain tools must implement.
Parameters
name (str) β
description (str) β
args_schema ... | https://api.python.langchain.com/en/latest/modules/tools.html |
1a14bb6b1a14-18 | 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 |
1a14bb6b1a14-19 | attribute name: str [Required]ο
The unique name of the tool that clearly communicates its purpose.
attribute 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.
attribute verbose: bool = Falseο
Whether ... | https://api.python.langchain.com/en/latest/modules/tools.html |
1a14bb6b1a14-20 | Return type
Any
run(tool_input, verbose=None, start_color='green', color='green', callbacks=None, **kwargs)[source]ο
Run the tool.
Parameters
tool_input (Union[str, Dict]) β
verbose (Optional[bool]) β
start_color (Optional[str]) β
color (Optional[str]) β
callbacks (Optional[Union[List[langchain.callbacks.base.BaseC... | https://api.python.langchain.com/en/latest/modules/tools.html |
1a14bb6b1a14-21 | Whether the tool only accepts a single input.
class langchain.tools.BingSearchResults(*, name='Bing Search Results JSON', description='A wrapper around Bing Search. Useful for when you need to answer questions about current events. Input should be a search query. Output is a JSON array of the query results', args_schem... | https://api.python.langchain.com/en/latest/modules/tools.html |
1a14bb6b1a14-22 | 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.base.ToolException], str]... | https://api.python.langchain.com/en/latest/modules/tools.html |
1a14bb6b1a14-23 | class langchain.tools.BingSearchRun(*, name='bing_search', description='A wrapper around Bing Search. Useful for when you need to answer questions about current events. Input should be a search query.', args_schema=None, return_direct=False, verbose=False, callbacks=None, callback_manager=None, handle_tool_error=False,... | https://api.python.langchain.com/en/latest/modules/tools.html |
1a14bb6b1a14-24 | handle_tool_error (Optional[Union[bool, str, Callable[[langchain.tools.base.ToolException], str]]]) β
api_wrapper (langchain.utilities.bing_search.BingSearchAPIWrapper) β
Return type
None
attribute api_wrapper: langchain.utilities.bing_search.BingSearchAPIWrapper [Required]ο
class langchain.tools.BraveSearch(*, name=... | https://api.python.langchain.com/en/latest/modules/tools.html |
1a14bb6b1a14-25 | 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.base.ToolException], str]... | https://api.python.langchain.com/en/latest/modules/tools.html |
1a14bb6b1a14-26 | class langchain.tools.ClickTool(*, name='click_element', description='Click on an element with the given CSS selector', args_schema=<class 'langchain.tools.playwright.click.ClickToolInput'>, return_direct=False, verbose=False, callbacks=None, callback_manager=None, handle_tool_error=False, sync_browser=None, async_brow... | https://api.python.langchain.com/en/latest/modules/tools.html |
1a14bb6b1a14-27 | handle_tool_error (Optional[Union[bool, str, Callable[[langchain.tools.base.ToolException], str]]]) β
sync_browser (Optional['SyncBrowser']) β
async_browser (Optional['AsyncBrowser']) β
visible_only (bool) β
playwright_strict (bool) β
playwright_timeout (float) β
Return type
None
attribute args_schema: Type[BaseM... | https://api.python.langchain.com/en/latest/modules/tools.html |
1a14bb6b1a14-28 | attribute playwright_strict: bool = Falseο
Whether to employ Playwrightβs strict mode when clicking on elements.
attribute playwright_timeout: float = 1000ο
Timeout (in ms) for Playwright to wait for element to be ready.
attribute visible_only: bool = Trueο
Whether to consider only visible elements.
class langchain.too... | https://api.python.langchain.com/en/latest/modules/tools.html |
1a14bb6b1a14-29 | 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 |
1a14bb6b1a14-30 | attribute name: str = 'copy_file'ο
The unique name of the tool that clearly communicates its purpose.
class langchain.tools.CurrentWebPageTool(*, name='current_webpage', description='Returns the URL of the current page', args_schema=<class 'pydantic.main.BaseModel'>, return_direct=False, verbose=False, callbacks=None, ... | https://api.python.langchain.com/en/latest/modules/tools.html |
1a14bb6b1a14-31 | handle_tool_error (Optional[Union[bool, str, Callable[[langchain.tools.base.ToolException], str]]]) β
sync_browser (Optional['SyncBrowser']) β
async_browser (Optional['AsyncBrowser']) β
Return type
None
attribute args_schema: Type[BaseModel] = <class 'pydantic.main.BaseModel'>ο
Pydantic model class to validate and p... | https://api.python.langchain.com/en/latest/modules/tools.html |
1a14bb6b1a14-32 | class langchain.tools.DeleteFileTool(*, name='file_delete', description='Delete a file', args_schema=<class 'langchain.tools.file_management.delete.FileDeleteInput'>, return_direct=False, verbose=False, callbacks=None, callback_manager=None, handle_tool_error=False, root_dir=None)[source]ο
Bases: langchain.tools.file_m... | https://api.python.langchain.com/en/latest/modules/tools.html |
1a14bb6b1a14-33 | root_dir (Optional[str]) β
Return type
None
attribute args_schema: Type[pydantic.main.BaseModel] = <class 'langchain.tools.file_management.delete.FileDeleteInput'>ο
Pydantic model class to validate and parse the toolβs input arguments.
attribute description: str = 'Delete a file'ο
Used to tell the model how/when/why t... | https://api.python.langchain.com/en/latest/modules/tools.html |
1a14bb6b1a14-34 | class langchain.tools.DuckDuckGoSearchResults(*, name='DuckDuckGo Results JSON', description='A wrapper around Duck Duck Go Search. Useful for when you need to answer questions about current events. Input should be a search query. Output is a JSON array of the query results', args_schema=None, return_direct=False, verb... | https://api.python.langchain.com/en/latest/modules/tools.html |
1a14bb6b1a14-35 | callback_manager (Optional[langchain.callbacks.base.BaseCallbackManager]) β
handle_tool_error (Optional[Union[bool, str, Callable[[langchain.tools.base.ToolException], str]]]) β
num_results (int) β
api_wrapper (langchain.utilities.duckduckgo_search.DuckDuckGoSearchAPIWrapper) β
Return type
None
attribute api_wrappe... | https://api.python.langchain.com/en/latest/modules/tools.html |
1a14bb6b1a14-36 | Bases: langchain.tools.base.BaseTool
Tool that adds the capability to query the DuckDuckGo 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.BaseCallbackHand... | https://api.python.langchain.com/en/latest/modules/tools.html |
1a14bb6b1a14-37 | class langchain.tools.ExtractHyperlinksTool(*, name='extract_hyperlinks', description='Extract all hyperlinks on the current webpage', args_schema=<class 'langchain.tools.playwright.extract_hyperlinks.ExtractHyperlinksToolInput'>, return_direct=False, verbose=False, callbacks=None, callback_manager=None, handle_tool_er... | https://api.python.langchain.com/en/latest/modules/tools.html |
1a14bb6b1a14-38 | handle_tool_error (Optional[Union[bool, str, Callable[[langchain.tools.base.ToolException], str]]]) β
sync_browser (Optional['SyncBrowser']) β
async_browser (Optional['AsyncBrowser']) β
Return type
None
attribute args_schema: Type[BaseModel] = <class 'langchain.tools.playwright.extract_hyperlinks.ExtractHyperlinksTo... | https://api.python.langchain.com/en/latest/modules/tools.html |
1a14bb6b1a14-39 | Parameters
page (Any) β
html_content (str) β
absolute_urls (bool) β
Return type
str
class langchain.tools.ExtractTextTool(*, name='extract_text', description='Extract all the text on the current webpage', args_schema=<class 'pydantic.main.BaseModel'>, return_direct=False, verbose=False, callbacks=None, callback_mana... | https://api.python.langchain.com/en/latest/modules/tools.html |
1a14bb6b1a14-40 | callback_manager (Optional[langchain.callbacks.base.BaseCallbackManager]) β
handle_tool_error (Optional[Union[bool, str, Callable[[langchain.tools.base.ToolException], str]]]) β
sync_browser (Optional['SyncBrowser']) β
async_browser (Optional['AsyncBrowser']) β
Return type
None
attribute args_schema: Type[BaseModel... | https://api.python.langchain.com/en/latest/modules/tools.html |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.