id
stringlengths
14
15
text
stringlengths
35
2.51k
source
stringlengths
61
154
927a88a8937f-0
langchain.experimental.autonomous_agents.autogpt.output_parser.AutoGPTAction¶ class langchain.experimental.autonomous_agents.autogpt.output_parser.AutoGPTAction(name, args)[source]¶ Bases: NamedTuple Create new instance of AutoGPTAction(name, args) Methods __init__() count(value, /) Return number of occurrences of valu...
https://api.python.langchain.com/en/latest/experimental/langchain.experimental.autonomous_agents.autogpt.output_parser.AutoGPTAction.html
6580bfa076e6-0
langchain.experimental.plan_and_execute.schema.Step¶ class langchain.experimental.plan_and_execute.schema.Step(*, value: str)[source]¶ Bases: BaseModel Create a new model by parsing and validating input data from keyword arguments. Raises ValidationError if the input data cannot be parsed to form a valid model. param v...
https://api.python.langchain.com/en/latest/experimental/langchain.experimental.plan_and_execute.schema.Step.html
3b427c7259b1-0
langchain.experimental.autonomous_agents.baby_agi.task_creation.TaskCreationChain¶ class langchain.experimental.autonomous_agents.baby_agi.task_creation.TaskCreationChain(*, memory: Optional[BaseMemory] = None, callbacks: Optional[Union[List[BaseCallbackHandler], BaseCallbackManager]] = None, callback_manager: Optional...
https://api.python.langchain.com/en/latest/experimental/langchain.experimental.autonomous_agents.baby_agi.task_creation.TaskCreationChain.html
3b427c7259b1-1
There are many different types of memory - please see memory docs for the full catalog. param output_key: str = 'text'¶ param output_parser: BaseLLMOutputParser [Optional]¶ Output parser to use. Defaults to one that takes the most likely string but does not change it otherwise. param prompt: BasePromptTemplate [Require...
https://api.python.langchain.com/en/latest/experimental/langchain.experimental.autonomous_agents.baby_agi.task_creation.TaskCreationChain.html
3b427c7259b1-2
chain will be returned. Defaults to False. callbacks – Callbacks to use for this chain run. If not provided, will use the callbacks provided to the chain. include_run_info – Whether to include run info in the response. Defaults to False. async aapply(input_list: List[Dict[str, Any]], callbacks: Optional[Union[List[Base...
https://api.python.langchain.com/en/latest/experimental/langchain.experimental.autonomous_agents.baby_agi.task_creation.TaskCreationChain.html
3b427c7259b1-3
Generate LLM result from inputs. apply(input_list: List[Dict[str, Any]], callbacks: Optional[Union[List[BaseCallbackHandler], BaseCallbackManager]] = None) → List[Dict[str, str]]¶ Utilize the LLM generate method for speed gains. apply_and_parse(input_list: List[Dict[str, Any]], callbacks: Optional[Union[List[BaseCallba...
https://api.python.langchain.com/en/latest/experimental/langchain.experimental.autonomous_agents.baby_agi.task_creation.TaskCreationChain.html
3b427c7259b1-4
Create outputs from response. dict(**kwargs: Any) → Dict¶ Return dictionary representation of chain. classmethod from_llm(llm: BaseLanguageModel, verbose: bool = True) → LLMChain[source]¶ Get the response parser. classmethod from_string(llm: BaseLanguageModel, template: str) → LLMChain¶ Create LLMChain from LLM and tem...
https://api.python.langchain.com/en/latest/experimental/langchain.experimental.autonomous_agents.baby_agi.task_creation.TaskCreationChain.html
3b427c7259b1-5
Raise deprecation warning if callback_manager is used. run(*args: Any, callbacks: Optional[Union[List[BaseCallbackHandler], BaseCallbackManager]] = None, tags: Optional[List[str]] = None, **kwargs: Any) → str¶ Run the chain as text in, text out or multiple variables, text out. save(file_path: Union[Path, str]) → None¶ ...
https://api.python.langchain.com/en/latest/experimental/langchain.experimental.autonomous_agents.baby_agi.task_creation.TaskCreationChain.html
10546f797014-0
langchain.experimental.autonomous_agents.baby_agi.task_execution.TaskExecutionChain¶ class langchain.experimental.autonomous_agents.baby_agi.task_execution.TaskExecutionChain(*, memory: Optional[BaseMemory] = None, callbacks: Optional[Union[List[BaseCallbackHandler], BaseCallbackManager]] = None, callback_manager: Opti...
https://api.python.langchain.com/en/latest/experimental/langchain.experimental.autonomous_agents.baby_agi.task_execution.TaskExecutionChain.html
10546f797014-1
There are many different types of memory - please see memory docs for the full catalog. param output_key: str = 'text'¶ param output_parser: BaseLLMOutputParser [Optional]¶ Output parser to use. Defaults to one that takes the most likely string but does not change it otherwise. param prompt: BasePromptTemplate [Require...
https://api.python.langchain.com/en/latest/experimental/langchain.experimental.autonomous_agents.baby_agi.task_execution.TaskExecutionChain.html
10546f797014-2
chain will be returned. Defaults to False. callbacks – Callbacks to use for this chain run. If not provided, will use the callbacks provided to the chain. include_run_info – Whether to include run info in the response. Defaults to False. async aapply(input_list: List[Dict[str, Any]], callbacks: Optional[Union[List[Base...
https://api.python.langchain.com/en/latest/experimental/langchain.experimental.autonomous_agents.baby_agi.task_execution.TaskExecutionChain.html
10546f797014-3
Generate LLM result from inputs. apply(input_list: List[Dict[str, Any]], callbacks: Optional[Union[List[BaseCallbackHandler], BaseCallbackManager]] = None) → List[Dict[str, str]]¶ Utilize the LLM generate method for speed gains. apply_and_parse(input_list: List[Dict[str, Any]], callbacks: Optional[Union[List[BaseCallba...
https://api.python.langchain.com/en/latest/experimental/langchain.experimental.autonomous_agents.baby_agi.task_execution.TaskExecutionChain.html
10546f797014-4
Create outputs from response. dict(**kwargs: Any) → Dict¶ Return dictionary representation of chain. classmethod from_llm(llm: BaseLanguageModel, verbose: bool = True) → LLMChain[source]¶ Get the response parser. classmethod from_string(llm: BaseLanguageModel, template: str) → LLMChain¶ Create LLMChain from LLM and tem...
https://api.python.langchain.com/en/latest/experimental/langchain.experimental.autonomous_agents.baby_agi.task_execution.TaskExecutionChain.html
10546f797014-5
Raise deprecation warning if callback_manager is used. run(*args: Any, callbacks: Optional[Union[List[BaseCallbackHandler], BaseCallbackManager]] = None, tags: Optional[List[str]] = None, **kwargs: Any) → str¶ Run the chain as text in, text out or multiple variables, text out. save(file_path: Union[Path, str]) → None¶ ...
https://api.python.langchain.com/en/latest/experimental/langchain.experimental.autonomous_agents.baby_agi.task_execution.TaskExecutionChain.html
084e9893b2a9-0
langchain.experimental.llms.rellm_decoder.RELLM¶ class langchain.experimental.llms.rellm_decoder.RELLM(*, cache: Optional[bool] = None, verbose: bool = None, callbacks: Optional[Union[List[BaseCallbackHandler], BaseCallbackManager]] = None, callback_manager: Optional[BaseCallbackManager] = None, tags: Optional[List[str...
https://api.python.langchain.com/en/latest/experimental/langchain.experimental.llms.rellm_decoder.RELLM.html
084e9893b2a9-1
Check Cache and run the LLM on the given prompt and input. async agenerate(prompts: List[str], stop: Optional[List[str]] = None, callbacks: Optional[Union[List[BaseCallbackHandler], BaseCallbackManager]] = None, *, tags: Optional[List[str]] = None, **kwargs: Any) → LLMResult¶ Run the LLM on the given prompt and input. ...
https://api.python.langchain.com/en/latest/experimental/langchain.experimental.llms.rellm_decoder.RELLM.html
084e9893b2a9-2
Run the LLM on the given prompt and input. generate_prompt(prompts: List[PromptValue], stop: Optional[List[str]] = None, callbacks: Optional[Union[List[BaseCallbackHandler], BaseCallbackManager]] = None, **kwargs: Any) → LLMResult¶ Take in a list of prompt values and return an LLMResult. get_num_tokens(text: str) → int...
https://api.python.langchain.com/en/latest/experimental/langchain.experimental.llms.rellm_decoder.RELLM.html
084e9893b2a9-3
constructor. property lc_namespace: List[str]¶ Return the namespace of the langchain object. eg. [“langchain”, “llms”, “openai”] property lc_secrets: Dict[str, str]¶ Return a map of constructor argument names to secret ids. eg. {“openai_api_key”: “OPENAI_API_KEY”} property lc_serializable: bool¶ Return whether or not t...
https://api.python.langchain.com/en/latest/experimental/langchain.experimental.llms.rellm_decoder.RELLM.html
84aaffdf5197-0
langchain.experimental.plan_and_execute.schema.PlanOutputParser¶ class langchain.experimental.plan_and_execute.schema.PlanOutputParser[source]¶ Bases: BaseOutputParser Create a new model by parsing and validating input data from keyword arguments. Raises ValidationError if the input data cannot be parsed to form a vali...
https://api.python.langchain.com/en/latest/experimental/langchain.experimental.plan_and_execute.schema.PlanOutputParser.html
b692c16784e0-0
langchain.experimental.autonomous_agents.autogpt.output_parser.BaseAutoGPTOutputParser¶ class langchain.experimental.autonomous_agents.autogpt.output_parser.BaseAutoGPTOutputParser[source]¶ Bases: BaseOutputParser Create a new model by parsing and validating input data from keyword arguments. Raises ValidationError if ...
https://api.python.langchain.com/en/latest/experimental/langchain.experimental.autonomous_agents.autogpt.output_parser.BaseAutoGPTOutputParser.html
b692c16784e0-1
property lc_serializable: bool¶ Return whether or not the class is serializable. model Config¶ Bases: object extra = 'ignore'¶
https://api.python.langchain.com/en/latest/experimental/langchain.experimental.autonomous_agents.autogpt.output_parser.BaseAutoGPTOutputParser.html
9b1194f2bd29-0
langchain.experimental.plan_and_execute.planners.base.LLMPlanner¶ class langchain.experimental.plan_and_execute.planners.base.LLMPlanner(*, llm_chain: LLMChain, output_parser: PlanOutputParser, stop: Optional[List] = None)[source]¶ Bases: BasePlanner Create a new model by parsing and validating input data from keyword ...
https://api.python.langchain.com/en/latest/experimental/langchain.experimental.plan_and_execute.planners.base.LLMPlanner.html
671210717557-0
langchain.experimental.generative_agents.generative_agent.GenerativeAgent¶ class langchain.experimental.generative_agents.generative_agent.GenerativeAgent(*, name: str, age: Optional[int] = None, traits: str = 'N/A', status: str, memory: GenerativeAgentMemory, llm: BaseLanguageModel, verbose: bool = False, summary: str...
https://api.python.langchain.com/en/latest/experimental/langchain.experimental.generative_agents.generative_agent.GenerativeAgent.html
671210717557-1
Permanent traits to ascribe to the character. param verbose: bool = False¶ chain(prompt: PromptTemplate) → LLMChain[source]¶ generate_dialogue_response(observation: str, now: Optional[datetime] = None) → Tuple[bool, str][source]¶ React to a given observation. generate_reaction(observation: str, now: Optional[datetime] ...
https://api.python.langchain.com/en/latest/experimental/langchain.experimental.generative_agents.generative_agent.GenerativeAgent.html
44ac4d809d21-0
langchain.experimental.autonomous_agents.autogpt.output_parser.AutoGPTOutputParser¶ class langchain.experimental.autonomous_agents.autogpt.output_parser.AutoGPTOutputParser[source]¶ Bases: BaseAutoGPTOutputParser Create a new model by parsing and validating input data from keyword arguments. Raises ValidationError if t...
https://api.python.langchain.com/en/latest/experimental/langchain.experimental.autonomous_agents.autogpt.output_parser.AutoGPTOutputParser.html
44ac4d809d21-1
property lc_serializable: bool¶ Return whether or not the class is serializable. model Config¶ Bases: object extra = 'ignore'¶
https://api.python.langchain.com/en/latest/experimental/langchain.experimental.autonomous_agents.autogpt.output_parser.AutoGPTOutputParser.html
831e625db8dd-0
langchain.experimental.llms.jsonformer_decoder.JsonFormer¶ class langchain.experimental.llms.jsonformer_decoder.JsonFormer(*, cache: Optional[bool] = None, verbose: bool = None, callbacks: Optional[Union[List[BaseCallbackHandler], BaseCallbackManager]] = None, callback_manager: Optional[BaseCallbackManager] = None, tag...
https://api.python.langchain.com/en/latest/experimental/langchain.experimental.llms.jsonformer_decoder.JsonFormer.html
831e625db8dd-1
param verbose: bool [Optional]¶ Whether to print out response text. __call__(prompt: str, stop: Optional[List[str]] = None, callbacks: Optional[Union[List[BaseCallbackHandler], BaseCallbackManager]] = None, **kwargs: Any) → str¶ Check Cache and run the LLM on the given prompt and input. async agenerate(prompts: List[st...
https://api.python.langchain.com/en/latest/experimental/langchain.experimental.llms.jsonformer_decoder.JsonFormer.html
831e625db8dd-2
Construct the pipeline object from model_id and task. generate(prompts: List[str], stop: Optional[List[str]] = None, callbacks: Optional[Union[List[BaseCallbackHandler], BaseCallbackManager]] = None, *, tags: Optional[List[str]] = None, **kwargs: Any) → LLMResult¶ Run the LLM on the given prompt and input. generate_pro...
https://api.python.langchain.com/en/latest/experimental/langchain.experimental.llms.jsonformer_decoder.JsonFormer.html
831e625db8dd-3
This allows users to pass in None as verbose to access the global setting. to_json() → Union[SerializedConstructor, SerializedNotImplemented]¶ to_json_not_implemented() → SerializedNotImplemented¶ property lc_attributes: Dict¶ Return a list of attribute names that should be included in the serialized kwargs. These attr...
https://api.python.langchain.com/en/latest/experimental/langchain.experimental.llms.jsonformer_decoder.JsonFormer.html
1400d4ecb3d6-0
langchain.experimental.autonomous_agents.autogpt.prompt_generator.get_prompt¶ langchain.experimental.autonomous_agents.autogpt.prompt_generator.get_prompt(tools: List[BaseTool]) → str[source]¶ This function generates a prompt string. It includes various constraints, commands, resources, and performance evaluations. Ret...
https://api.python.langchain.com/en/latest/experimental/langchain.experimental.autonomous_agents.autogpt.prompt_generator.get_prompt.html
4cddf6888d78-0
langchain.experimental.autonomous_agents.baby_agi.baby_agi.BabyAGI¶ class langchain.experimental.autonomous_agents.baby_agi.baby_agi.BabyAGI(*, memory: Optional[BaseMemory] = None, callbacks: Optional[Union[List[BaseCallbackHandler], BaseCallbackManager]] = None, callback_manager: Optional[BaseCallbackManager] = None, ...
https://api.python.langchain.com/en/latest/experimental/langchain.experimental.autonomous_agents.baby_agi.baby_agi.BabyAGI.html
4cddf6888d78-1
There are many different types of memory - please see memory docs for the full catalog. param tags: Optional[List[str]] = None¶ Optional list of tags associated with the chain. Defaults to None These tags will be associated with each call to this chain, and passed as arguments to the handlers defined in callbacks. You ...
https://api.python.langchain.com/en/latest/experimental/langchain.experimental.autonomous_agents.baby_agi.baby_agi.BabyAGI.html
4cddf6888d78-2
include_run_info – Whether to include run info in the response. Defaults to False. async acall(inputs: Union[Dict[str, Any], Any], return_only_outputs: bool = False, callbacks: Optional[Union[List[BaseCallbackHandler], BaseCallbackManager]] = None, *, tags: Optional[List[str]] = None, include_run_info: bool = False) → ...
https://api.python.langchain.com/en/latest/experimental/langchain.experimental.autonomous_agents.baby_agi.baby_agi.BabyAGI.html
4cddf6888d78-3
Execute a task. classmethod from_llm(llm: BaseLanguageModel, vectorstore: VectorStore, verbose: bool = False, task_execution_chain: Optional[Chain] = None, **kwargs: Dict[str, Any]) → BabyAGI[source]¶ Initialize the BabyAGI Controller. get_next_task(result: str, task_description: str, objective: str) → List[Dict][sourc...
https://api.python.langchain.com/en/latest/experimental/langchain.experimental.autonomous_agents.baby_agi.baby_agi.BabyAGI.html
4cddf6888d78-4
This allows users to pass in None as verbose to access the global setting. to_json() → Union[SerializedConstructor, SerializedNotImplemented]¶ to_json_not_implemented() → SerializedNotImplemented¶ property input_keys: List[str]¶ Input keys this chain expects. property lc_attributes: Dict¶ Return a list of attribute nam...
https://api.python.langchain.com/en/latest/experimental/langchain.experimental.autonomous_agents.baby_agi.baby_agi.BabyAGI.html
4fe62f0bb946-0
langchain.experimental.plan_and_execute.executors.base.ChainExecutor¶ class langchain.experimental.plan_and_execute.executors.base.ChainExecutor(*, chain: Chain)[source]¶ Bases: BaseExecutor Create a new model by parsing and validating input data from keyword arguments. Raises ValidationError if the input data cannot b...
https://api.python.langchain.com/en/latest/experimental/langchain.experimental.plan_and_execute.executors.base.ChainExecutor.html
780edbba953b-0
langchain.experimental.autonomous_agents.autogpt.prompt.AutoGPTPrompt¶ class langchain.experimental.autonomous_agents.autogpt.prompt.AutoGPTPrompt(*, input_variables: List[str], output_parser: Optional[BaseOutputParser] = None, partial_variables: Mapping[str, Union[str, Callable[[], str]]] = None, ai_name: str, ai_role...
https://api.python.langchain.com/en/latest/experimental/langchain.experimental.autonomous_agents.autogpt.prompt.AutoGPTPrompt.html
780edbba953b-1
Format kwargs into a list of messages. format_prompt(**kwargs: Any) → PromptValue¶ Create Chat Messages. partial(**kwargs: Union[str, Callable[[], str]]) → BasePromptTemplate¶ Return a partial of the prompt template. save(file_path: Union[Path, str]) → None¶ Save the prompt. Parameters file_path – Path to directory to ...
https://api.python.langchain.com/en/latest/experimental/langchain.experimental.autonomous_agents.autogpt.prompt.AutoGPTPrompt.html
7132b8c349c9-0
langchain.experimental.llms.rellm_decoder.import_rellm¶ langchain.experimental.llms.rellm_decoder.import_rellm() → rellm[source]¶ Lazily import rellm.
https://api.python.langchain.com/en/latest/experimental/langchain.experimental.llms.rellm_decoder.import_rellm.html
abea71de3fe9-0
langchain.experimental.plan_and_execute.planners.chat_planner.load_chat_planner¶ langchain.experimental.plan_and_execute.planners.chat_planner.load_chat_planner(llm: BaseLanguageModel, system_prompt: str = "Let's first understand the problem and devise a plan to solve the problem. Please output the plan starting with t...
https://api.python.langchain.com/en/latest/experimental/langchain.experimental.plan_and_execute.planners.chat_planner.load_chat_planner.html
bb8421ceddbe-0
langchain.experimental.plan_and_execute.schema.Plan¶ class langchain.experimental.plan_and_execute.schema.Plan(*, steps: List[Step])[source]¶ Bases: BaseModel Create a new model by parsing and validating input data from keyword arguments. Raises ValidationError if the input data cannot be parsed to form a valid model. ...
https://api.python.langchain.com/en/latest/experimental/langchain.experimental.plan_and_execute.schema.Plan.html
973196172085-0
langchain.cache.SQLiteCache¶ class langchain.cache.SQLiteCache(database_path: str = '.langchain.db')[source]¶ Bases: SQLAlchemyCache Cache that uses SQLite as a backend. Initialize by creating the engine and all tables. Methods __init__([database_path]) Initialize by creating the engine and all tables. clear(**kwargs) ...
https://api.python.langchain.com/en/latest/cache/langchain.cache.SQLiteCache.html
4dc7992557df-0
langchain.cache.BaseCache¶ class langchain.cache.BaseCache[source]¶ Bases: ABC Base interface for cache. Methods __init__() clear(**kwargs) Clear cache that can take additional keyword arguments. lookup(prompt, llm_string) Look up based on prompt and llm_string. update(prompt, llm_string, return_val) Update cache based...
https://api.python.langchain.com/en/latest/cache/langchain.cache.BaseCache.html
749781a81e8f-0
langchain.cache.RedisCache¶ class langchain.cache.RedisCache(redis_: Any)[source]¶ Bases: BaseCache Cache that uses Redis as a backend. Initialize by passing in Redis instance. Methods __init__(redis_) Initialize by passing in Redis instance. clear(**kwargs) Clear cache. lookup(prompt, llm_string) Look up based on prom...
https://api.python.langchain.com/en/latest/cache/langchain.cache.RedisCache.html
1618c09e37fc-0
langchain.cache.InMemoryCache¶ class langchain.cache.InMemoryCache[source]¶ Bases: BaseCache Cache that stores things in memory. Initialize with empty cache. Methods __init__() Initialize with empty cache. clear(**kwargs) Clear cache. lookup(prompt, llm_string) Look up based on prompt and llm_string. update(prompt, llm...
https://api.python.langchain.com/en/latest/cache/langchain.cache.InMemoryCache.html
c6ee11fb34fe-0
langchain.cache.GPTCache¶ class langchain.cache.GPTCache(init_func: Optional[Union[Callable[[Any, str], None], Callable[[Any], None]]] = None)[source]¶ Bases: BaseCache Cache that uses GPTCache as a backend. Initialize by passing in init function (default: None). Parameters init_func (Optional[Callable[[Any], None]]) –...
https://api.python.langchain.com/en/latest/cache/langchain.cache.GPTCache.html
c6ee11fb34fe-1
Update cache. First, retrieve the corresponding cache object using the llm_string parameter, and then store the prompt and return_val in the cache object.
https://api.python.langchain.com/en/latest/cache/langchain.cache.GPTCache.html
b7c75081d3b5-0
langchain.cache.RedisSemanticCache¶ class langchain.cache.RedisSemanticCache(redis_url: str, embedding: Embeddings, score_threshold: float = 0.2)[source]¶ Bases: BaseCache Cache that uses Redis as a vector-store backend. Initialize by passing in the init GPTCache func Parameters redis_url (str) – URL to connect to Redi...
https://api.python.langchain.com/en/latest/cache/langchain.cache.RedisSemanticCache.html
4fbf0feadf7e-0
langchain.cache.SQLAlchemyCache¶ class langchain.cache.SQLAlchemyCache(engine: ~sqlalchemy.engine.base.Engine, cache_schema: ~typing.Type[~langchain.cache.FullLLMCache] = <class 'langchain.cache.FullLLMCache'>)[source]¶ Bases: BaseCache Cache that uses SQAlchemy as a backend. Initialize by creating all tables. Methods ...
https://api.python.langchain.com/en/latest/cache/langchain.cache.SQLAlchemyCache.html
09fb0a319b07-0
langchain.cache.FullLLMCache¶ class langchain.cache.FullLLMCache(**kwargs)[source]¶ Bases: Base SQLite table for full LLM Cache (all generations). A simple constructor that allows initialization from kwargs. Sets attributes on the constructed instance using the names and values in kwargs. Only keys that are present as ...
https://api.python.langchain.com/en/latest/cache/langchain.cache.FullLLMCache.html
d1ace03f0eb4-0
langchain.cache.MomentoCache¶ class langchain.cache.MomentoCache(cache_client: momento.CacheClient, cache_name: str, *, ttl: Optional[timedelta] = None, ensure_cache_exists: bool = True)[source]¶ Bases: BaseCache Cache that uses Momento as a backend. See https://gomomento.com/ Instantiate a prompt cache using Momento a...
https://api.python.langchain.com/en/latest/cache/langchain.cache.MomentoCache.html
d1ace03f0eb4-1
Clear the cache. Raises SdkException – Momento service or network error classmethod from_client_params(cache_name: str, ttl: timedelta, *, configuration: Optional[momento.config.Configuration] = None, auth_token: Optional[str] = None, **kwargs: Any) → MomentoCache[source]¶ Construct cache from CacheClient parameters. l...
https://api.python.langchain.com/en/latest/cache/langchain.cache.MomentoCache.html
60814dbf96b5-0
langchain.sql_database.truncate_word¶ langchain.sql_database.truncate_word(content: Any, *, length: int, suffix: str = '...') → str[source]¶ Truncate a string to a certain number of words, based on the max string length.
https://api.python.langchain.com/en/latest/sql_database/langchain.sql_database.truncate_word.html
7cf08c4325ec-0
langchain.input.get_colored_text¶ langchain.input.get_colored_text(text: str, color: str) → str[source]¶ Get colored text.
https://api.python.langchain.com/en/latest/input/langchain.input.get_colored_text.html
4745a96804b8-0
langchain.input.get_color_mapping¶ langchain.input.get_color_mapping(items: List[str], excluded_colors: Optional[List] = None) → Dict[str, str][source]¶ Get mapping for items to a support color.
https://api.python.langchain.com/en/latest/input/langchain.input.get_color_mapping.html
f51b5fb56912-0
langchain.input.get_bolded_text¶ langchain.input.get_bolded_text(text: str) → str[source]¶ Get bolded text.
https://api.python.langchain.com/en/latest/input/langchain.input.get_bolded_text.html
1ea1ddbfb55a-0
langchain.input.print_text¶ langchain.input.print_text(text: str, color: Optional[str] = None, end: str = '', file: Optional[TextIO] = None) → None[source]¶ Print text with highlighting and no end characters.
https://api.python.langchain.com/en/latest/input/langchain.input.print_text.html
1452414a222a-0
langchain.tools.sleep.tool.SleepTool¶ class langchain.tools.sleep.tool.SleepTool(*, name: str = 'sleep', description: str = 'Make agent sleep for a specified number of seconds.', args_schema: ~typing.Type[~pydantic.main.BaseModel] = <class 'langchain.tools.sleep.tool.SleepInput'>, return_direct: bool = False, verbose: ...
https://api.python.langchain.com/en/latest/tools/langchain.tools.sleep.tool.SleepTool.html
1452414a222a-1
Handle the content of the ToolException thrown. param name: str = 'sleep'¶ The unique name of the tool that clearly communicates its purpose. param return_direct: bool = False¶ Whether to return the tool’s output directly. Setting this to True means that after the tool is called, the AgentExecutor will stop looping. pa...
https://api.python.langchain.com/en/latest/tools/langchain.tools.sleep.tool.SleepTool.html
d65284a1993c-0
langchain.tools.bing_search.tool.BingSearchResults¶ class langchain.tools.bing_search.tool.BingSearchResults(*, name: str = 'Bing Search Results JSON', description: str = '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 ar...
https://api.python.langchain.com/en/latest/tools/langchain.tools.bing_search.tool.BingSearchResults.html
d65284a1993c-1
You can provide few-shot examples as a part of the description. param handle_tool_error: Optional[Union[bool, str, Callable[[ToolException], str]]] = False¶ Handle the content of the ToolException thrown. param name: str = 'Bing Search Results JSON'¶ The unique name of the tool that clearly communicates its purpose. pa...
https://api.python.langchain.com/en/latest/tools/langchain.tools.bing_search.tool.BingSearchResults.html
eb323c870022-0
langchain.tools.file_management.read.ReadFileTool¶ class langchain.tools.file_management.read.ReadFileTool(*, name: str = 'read_file', description: str = 'Read file from disk', args_schema: ~typing.Type[~pydantic.main.BaseModel] = <class 'langchain.tools.file_management.read.ReadFileInput'>, return_direct: bool = False...
https://api.python.langchain.com/en/latest/tools/langchain.tools.file_management.read.ReadFileTool.html
eb323c870022-1
Handle the content of the ToolException thrown. param name: str = 'read_file'¶ The unique name of the tool that clearly communicates its purpose. param return_direct: bool = False¶ Whether to return the tool’s output directly. Setting this to True means that after the tool is called, the AgentExecutor will stop looping...
https://api.python.langchain.com/en/latest/tools/langchain.tools.file_management.read.ReadFileTool.html
6aae43eec976-0
langchain.tools.file_management.file_search.FileSearchTool¶ class langchain.tools.file_management.file_search.FileSearchTool(*, name: str = 'file_search', description: str = 'Recursively search for files in a subdirectory that match the regex pattern', args_schema: ~typing.Type[~pydantic.main.BaseModel] = <class 'langc...
https://api.python.langchain.com/en/latest/tools/langchain.tools.file_management.file_search.FileSearchTool.html
6aae43eec976-1
You can provide few-shot examples as a part of the description. param handle_tool_error: Optional[Union[bool, str, Callable[[ToolException], str]]] = False¶ Handle the content of the ToolException thrown. param name: str = 'file_search'¶ The unique name of the tool that clearly communicates its purpose. param return_di...
https://api.python.langchain.com/en/latest/tools/langchain.tools.file_management.file_search.FileSearchTool.html
6aae43eec976-2
property is_single_input: bool¶ Whether the tool only accepts a single input. model Config¶ Bases: object Configuration for this pydantic object. arbitrary_types_allowed = True¶ extra = 'forbid'¶
https://api.python.langchain.com/en/latest/tools/langchain.tools.file_management.file_search.FileSearchTool.html
859a1f994224-0
langchain.tools.playwright.utils.create_async_playwright_browser¶ langchain.tools.playwright.utils.create_async_playwright_browser(headless: bool = True) → AsyncBrowser[source]¶ Create a async playwright browser. Parameters headless – Whether to run the browser in headless mode. Defaults to True. Returns The playwright...
https://api.python.langchain.com/en/latest/tools/langchain.tools.playwright.utils.create_async_playwright_browser.html
f0ba9422b248-0
langchain.tools.spark_sql.tool.BaseSparkSQLTool¶ class langchain.tools.spark_sql.tool.BaseSparkSQLTool(*, db: SparkSQL)[source]¶ Bases: BaseModel Base tool for interacting with Spark SQL. Create a new model by parsing and validating input data from keyword arguments. Raises ValidationError if the input data cannot be p...
https://api.python.langchain.com/en/latest/tools/langchain.tools.spark_sql.tool.BaseSparkSQLTool.html
141f3858c3eb-0
langchain.tools.ddg_search.tool.DuckDuckGoSearchRun¶ class langchain.tools.ddg_search.tool.DuckDuckGoSearchRun(*, name: str = 'duckduckgo_search', description: str = 'A wrapper around DuckDuckGo Search. Useful for when you need to answer questions about current events. Input should be a search query.', args_schema: Opt...
https://api.python.langchain.com/en/latest/tools/langchain.tools.ddg_search.tool.DuckDuckGoSearchRun.html
141f3858c3eb-1
You can provide few-shot examples as a part of the description. param handle_tool_error: Optional[Union[bool, str, Callable[[ToolException], str]]] = False¶ Handle the content of the ToolException thrown. param name: str = 'duckduckgo_search'¶ The unique name of the tool that clearly communicates its purpose. param ret...
https://api.python.langchain.com/en/latest/tools/langchain.tools.ddg_search.tool.DuckDuckGoSearchRun.html
d465988bd083-0
langchain.tools.azure_cognitive_services.text2speech.AzureCogsText2SpeechTool¶ class langchain.tools.azure_cognitive_services.text2speech.AzureCogsText2SpeechTool(*, name: str = 'azure_cognitive_services_text2speech', description: str = 'A wrapper around Azure Cognitive Services Text2Speech. Useful for when you need to...
https://api.python.langchain.com/en/latest/tools/langchain.tools.azure_cognitive_services.text2speech.AzureCogsText2SpeechTool.html
d465988bd083-1
Used to tell the model how/when/why to use the tool. You can provide few-shot examples as a part of the description. param handle_tool_error: Optional[Union[bool, str, Callable[[ToolException], str]]] = False¶ Handle the content of the ToolException thrown. param name: str = 'azure_cognitive_services_text2speech'¶ The ...
https://api.python.langchain.com/en/latest/tools/langchain.tools.azure_cognitive_services.text2speech.AzureCogsText2SpeechTool.html
d465988bd083-2
Whether the tool only accepts a single input. model Config¶ Bases: object Configuration for this pydantic object. arbitrary_types_allowed = True¶ extra = 'forbid'¶
https://api.python.langchain.com/en/latest/tools/langchain.tools.azure_cognitive_services.text2speech.AzureCogsText2SpeechTool.html
acb2cd49d22a-0
langchain.tools.file_management.write.WriteFileInput¶ class langchain.tools.file_management.write.WriteFileInput(*, file_path: str, text: str, append: bool = False)[source]¶ Bases: BaseModel Input for WriteFileTool. Create a new model by parsing and validating input data from keyword arguments. Raises ValidationError i...
https://api.python.langchain.com/en/latest/tools/langchain.tools.file_management.write.WriteFileInput.html
f0b866f887ef-0
langchain.tools.jira.tool.JiraAction¶ class langchain.tools.jira.tool.JiraAction(*, name: str = '', description: str = '', args_schema: Optional[Type[BaseModel]] = None, return_direct: bool = False, verbose: bool = False, callbacks: Optional[Union[List[BaseCallbackHandler], BaseCallbackManager]] = None, callback_manage...
https://api.python.langchain.com/en/latest/tools/langchain.tools.jira.tool.JiraAction.html
f0b866f887ef-1
that after the tool is called, the AgentExecutor will stop looping. param verbose: bool = False¶ Whether to log the tool’s progress. __call__(tool_input: str, callbacks: Optional[Union[List[BaseCallbackHandler], BaseCallbackManager]] = None) → str¶ Make tool callable. async arun(tool_input: Union[str, Dict], verbose: O...
https://api.python.langchain.com/en/latest/tools/langchain.tools.jira.tool.JiraAction.html
35933aab1e61-0
langchain.tools.openapi.utils.api_models.APIRequestBody¶ class langchain.tools.openapi.utils.api_models.APIRequestBody(*, description: Optional[str] = None, properties: List[APIRequestBodyProperty], media_type: str)[source]¶ Bases: BaseModel A model for a request body. Create a new model by parsing and validating input...
https://api.python.langchain.com/en/latest/tools/langchain.tools.openapi.utils.api_models.APIRequestBody.html
a78ecf68e867-0
langchain.tools.office365.create_draft_message.CreateDraftMessageSchema¶ class langchain.tools.office365.create_draft_message.CreateDraftMessageSchema(*, body: str, to: List[str], subject: str, cc: Optional[List[str]] = None, bcc: Optional[List[str]] = None)[source]¶ Bases: BaseModel Create a new model by parsing and v...
https://api.python.langchain.com/en/latest/tools/langchain.tools.office365.create_draft_message.CreateDraftMessageSchema.html
90b02250b27e-0
langchain.tools.powerbi.tool.InfoPowerBITool¶ class langchain.tools.powerbi.tool.InfoPowerBITool(*, name: str = 'schema_powerbi', description: str = '\n    Input to this tool is a comma-separated list of tables, output is the schema and sample rows for those tables.\n    Be sure that the tables actually exist by callin...
https://api.python.langchain.com/en/latest/tools/langchain.tools.powerbi.tool.InfoPowerBITool.html
90b02250b27e-1
Used to tell the model how/when/why to use the tool. You can provide few-shot examples as a part of the description. param handle_tool_error: Optional[Union[bool, str, Callable[[ToolException], str]]] = False¶ Handle the content of the ToolException thrown. param name: str = 'schema_powerbi'¶ The unique name of the too...
https://api.python.langchain.com/en/latest/tools/langchain.tools.powerbi.tool.InfoPowerBITool.html
90b02250b27e-2
model Config[source]¶ Bases: object Configuration for this pydantic object. arbitrary_types_allowed = True¶
https://api.python.langchain.com/en/latest/tools/langchain.tools.powerbi.tool.InfoPowerBITool.html
5dab04ce68a7-0
langchain.tools.sql_database.tool.BaseSQLDatabaseTool¶ class langchain.tools.sql_database.tool.BaseSQLDatabaseTool(*, db: SQLDatabase)[source]¶ Bases: BaseModel Base tool for interacting with a SQL database. Create a new model by parsing and validating input data from keyword arguments. Raises ValidationError if the in...
https://api.python.langchain.com/en/latest/tools/langchain.tools.sql_database.tool.BaseSQLDatabaseTool.html
c19a0ffc83e3-0
langchain.tools.powerbi.tool.QueryPowerBITool¶
https://api.python.langchain.com/en/latest/tools/langchain.tools.powerbi.tool.QueryPowerBITool.html
c19a0ffc83e3-1
class langchain.tools.powerbi.tool.QueryPowerBITool(*, name: str = 'query_powerbi', description: str = '\n    Input to this tool is a detailed question about the dataset, output is a result from the dataset. It will try to answer the question using the dataset, and if it cannot, it will ask for clarification.\n\n    Ex...
https://api.python.langchain.com/en/latest/tools/langchain.tools.powerbi.tool.QueryPowerBITool.html
c19a0ffc83e3-2
functions require one or more arguments, which can include tables, 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 f...
https://api.python.langchain.com/en/latest/tools/langchain.tools.powerbi.tool.QueryPowerBITool.html
c19a0ffc83e3-3
which can then be passed as an argument to other measure expressions. Once resultant values have been calculated for a variable expression, those values do not change, even if the variable is referenced in another expression.\n\nFILTER(<table>,<filter>) - Returns a table that represents a subset of another table or exp...
https://api.python.langchain.com/en/latest/tools/langchain.tools.powerbi.tool.QueryPowerBITool.html
c19a0ffc83e3-4
(<column>) - these are all variantions of count functions.\nAVERAGE(<column>), AVERAGEA(<column>), AVERAGEX(<table>,<expression>) - these are all variantions of average functions.\nMAX(<column>), MAXA(<column>), MAXX(<table>,<expression>) - these are all variantions of max functions.\nMIN(<column>), MINA(<column>), MIN...
https://api.python.langchain.com/en/latest/tools/langchain.tools.powerbi.tool.QueryPowerBITool.html
c19a0ffc83e3-5
Sometimes you will get a question, a DAX query and a error, in that 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', examples: Optional[str] = '...
https://api.python.langchain.com/en/latest/tools/langchain.tools.powerbi.tool.QueryPowerBITool.html
c19a0ffc83e3-6
Bases: BaseTool Tool for querying a Power BI Dataset. Create a new model by parsing and validating input data from keyword arguments. Raises ValidationError if the input data cannot be parsed to form a valid model. param args_schema: Optional[Type[BaseModel]] = None¶ Pydantic model class to validate and parse the tool’...
https://api.python.langchain.com/en/latest/tools/langchain.tools.powerbi.tool.QueryPowerBITool.html
c19a0ffc83e3-7
Handle the content of the ToolException thrown. param llm_chain: langchain.chains.llm.LLMChain [Required]¶ param max_iterations: int = 5¶ param name: str = 'query_powerbi'¶ The unique name of the tool that clearly communicates its purpose. param powerbi: langchain.utilities.powerbi.PowerBIDataset [Required]¶ param retu...
https://api.python.langchain.com/en/latest/tools/langchain.tools.powerbi.tool.QueryPowerBITool.html
c19a0ffc83e3-8
param 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://api.python.langchain.com/en/latest/tools/langchain.tools.powerbi.tool.QueryPowerBITool.html
c19a0ffc83e3-9
ORDER BY <expression> ASC or DESC START AT <value> or <parameter> - The optional START AT keyword is used inside an ORDER BY clause. It defines the value at which the query results begin.\nDEFINE MEASURE | VAR; EVALUATE <table> - The optional DEFINE keyword introduces one or more calculated entity definitions that exis...
https://api.python.langchain.com/en/latest/tools/langchain.tools.powerbi.tool.QueryPowerBITool.html
c19a0ffc83e3-10
you nest the DISTINCT function within a formula, to get a list of distinct values that can be passed to another function and then counted, summed, or used for other operations.\nDISTINCT(<table>) - Returns a table by removing duplicate rows from another table or expression.\n\nAggregation functions, names with a A in i...
https://api.python.langchain.com/en/latest/tools/langchain.tools.powerbi.tool.QueryPowerBITool.html
c19a0ffc83e3-11
date2, <interval>) - Returns the difference between two date values, in the specified interval, that can be SECOND, MINUTE, HOUR, DAY, WEEK, MONTH, QUARTER, YEAR.\nDATEVALUE(<date_text>) - Returns a date value that represents the specified date.\nYEAR(<date>), QUARTER(<date>), MONTH(<date>), DAY(<date>), HOUR(<date>), ...
https://api.python.langchain.com/en/latest/tools/langchain.tools.powerbi.tool.QueryPowerBITool.html
c19a0ffc83e3-12
param verbose: bool = False¶ Whether to log the tool’s progress. __call__(tool_input: str, callbacks: Optional[Union[List[BaseCallbackHandler], BaseCallbackManager]] = None) → str¶ Make tool callable. async arun(tool_input: Union[str, Dict], verbose: Optional[bool] = None, start_color: Optional[str] = 'green', color: O...
https://api.python.langchain.com/en/latest/tools/langchain.tools.powerbi.tool.QueryPowerBITool.html
82828e0e406a-0
langchain.tools.scenexplain.tool.SceneXplainTool¶ class langchain.tools.scenexplain.tool.SceneXplainTool(*, name: str = 'image_explainer', description: str = 'An Image Captioning Tool: Use this tool to generate a detailed caption for an image. The input can be an image file of any format, and the output will be a text ...
https://api.python.langchain.com/en/latest/tools/langchain.tools.scenexplain.tool.SceneXplainTool.html
82828e0e406a-1
Used to tell the model how/when/why to use the tool. You can provide few-shot examples as a part of the description. param handle_tool_error: Optional[Union[bool, str, Callable[[ToolException], str]]] = False¶ Handle the content of the ToolException thrown. param name: str = 'image_explainer'¶ The unique name of the to...
https://api.python.langchain.com/en/latest/tools/langchain.tools.scenexplain.tool.SceneXplainTool.html
82828e0e406a-2
Configuration for this pydantic object. arbitrary_types_allowed = True¶ extra = 'forbid'¶
https://api.python.langchain.com/en/latest/tools/langchain.tools.scenexplain.tool.SceneXplainTool.html
90710128a3a4-0
langchain.tools.bing_search.tool.BingSearchRun¶ class langchain.tools.bing_search.tool.BingSearchRun(*, name: str = 'bing_search', description: str = 'A wrapper around Bing Search. Useful for when you need to answer questions about current events. Input should be a search query.', args_schema: Optional[Type[BaseModel]]...
https://api.python.langchain.com/en/latest/tools/langchain.tools.bing_search.tool.BingSearchRun.html