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