-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
8fda1ad
commit e4bcf48
Showing
5,284 changed files
with
1,763,933 additions
and
0 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
452 changes: 452 additions & 0 deletions
452
api_reference/0.8.0/langchain/_modules/concurrent/futures/thread.html
Large diffs are not rendered by default.
Oops, something went wrong.
1,303 changes: 1,303 additions & 0 deletions
1,303
api_reference/0.8.0/langchain/_modules/index.html
Large diffs are not rendered by default.
Oops, something went wrong.
1,768 changes: 1,768 additions & 0 deletions
1,768
api_reference/0.8.0/langchain/_modules/langchain/agents/agent.html
Large diffs are not rendered by default.
Oops, something went wrong.
608 changes: 608 additions & 0 deletions
608
api_reference/0.8.0/langchain/_modules/langchain/agents/agent_iterator.html
Large diffs are not rendered by default.
Oops, something went wrong.
301 changes: 301 additions & 0 deletions
301
...n/_modules/langchain/agents/agent_toolkits/conversational_retrieval/openai_functions.html
Large diffs are not rendered by default.
Oops, something went wrong.
312 changes: 312 additions & 0 deletions
312
api_reference/0.8.0/langchain/_modules/langchain/agents/agent_toolkits/vectorstore/base.html
Large diffs are not rendered by default.
Oops, something went wrong.
305 changes: 305 additions & 0 deletions
305
...ference/0.8.0/langchain/_modules/langchain/agents/agent_toolkits/vectorstore/toolkit.html
Large diffs are not rendered by default.
Oops, something went wrong.
273 changes: 273 additions & 0 deletions
273
api_reference/0.8.0/langchain/_modules/langchain/agents/agent_types.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,273 @@ | ||
|
||
|
||
<!DOCTYPE html> | ||
<!--[if IE 8]><html class="no-js lt-ie9" lang="en" > <![endif]--> | ||
<!--[if gt IE 8]><!--> <html class="no-js" lang="en" > <!--<![endif]--> | ||
<head> | ||
<meta charset="utf-8"> | ||
|
||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
|
||
|
||
<title>langchain.agents.agent_types — 🦜🔗 LangChain 0.1.4</title> | ||
|
||
<link rel="canonical" href="https://api.python.langchain.com/en/latest/_modules/langchain/agents/agent_types.html" /> | ||
|
||
|
||
|
||
<link rel="stylesheet" href="../../../_static/css/vendor/bootstrap.min.css" type="text/css" /> | ||
<link rel="stylesheet" href="../../../_static/pygments.css" type="text/css" /> | ||
<link rel="stylesheet" href="../../../_static/css/theme.css" type="text/css" /> | ||
<link rel="stylesheet" href="../../../_static/autodoc_pydantic.css" type="text/css" /> | ||
<link rel="stylesheet" href="../../../_static/copybutton.css" type="text/css" /> | ||
<link rel="stylesheet" href="../../../_static/sphinx-dropdown.css" type="text/css" /> | ||
<link rel="stylesheet" href="../../../_static/panels-bootstrap.min.css" type="text/css" /> | ||
<link rel="stylesheet" href="../../../_static/css/custom.css" type="text/css" /> | ||
<link rel="stylesheet" href="../../../_static/css/theme.css" type="text/css" /> | ||
<script id="documentation_options" data-url_root="../../../" src="../../../_static/documentation_options.js"></script> | ||
<script src="../../../_static/jquery.js"></script> | ||
</head> | ||
<body> | ||
|
||
|
||
<nav id="navbar" class="sk-docs-navbar navbar navbar-expand-md navbar-light bg-light py-0"> | ||
<div class="container-fluid sk-docs-container px-0"> | ||
<button | ||
id="sk-navbar-toggler" | ||
class="navbar-toggler" | ||
type="button" | ||
data-toggle="collapse" | ||
data-target="#navbarSupportedContent" | ||
aria-controls="navbarSupportedContent" | ||
aria-expanded="false" | ||
aria-label="Toggle navigation" | ||
> | ||
<span class="navbar-toggler-icon"></span> | ||
</button> | ||
|
||
<div class="sk-navbar-collapse collapse navbar-collapse" id="navbarSupportedContent"> | ||
<ul class="navbar-nav mr-auto"> | ||
<li class="nav-item"> | ||
<a class="sk-nav-link nav-link" href="../../../langchain_api_reference.html">LangChain</a> | ||
</li> | ||
<li class="nav-item"> | ||
<a class="sk-nav-link nav-link" href="../../../core_api_reference.html">Core</a> | ||
</li> | ||
<li class="nav-item"> | ||
<a class="sk-nav-link nav-link" href="../../../community_api_reference.html">Community</a> | ||
</li> | ||
<li class="nav-item"> | ||
<a class="sk-nav-link nav-link" href="../../../experimental_api_reference.html">Experimental</a> | ||
</li> | ||
<li class="nav-item"> | ||
<a class="sk-nav-link nav-link nav-more-item-mobile-items" href="../../../exa_api_reference.html">exa</a> | ||
</li> | ||
<li class="nav-item"> | ||
<a class="sk-nav-link nav-link nav-more-item-mobile-items" href="../../../google_genai_api_reference.html">google-genai</a> | ||
</li> | ||
<li class="nav-item"> | ||
<a class="sk-nav-link nav-link nav-more-item-mobile-items" href="../../../nvidia_trt_api_reference.html">nvidia-trt</a> | ||
</li> | ||
<li class="nav-item"> | ||
<a class="sk-nav-link nav-link nav-more-item-mobile-items" href="../../../openai_api_reference.html">openai</a> | ||
</li> | ||
<li class="nav-item"> | ||
<a class="sk-nav-link nav-link nav-more-item-mobile-items" href="../../../together_api_reference.html">together</a> | ||
</li> | ||
<li class="nav-item"> | ||
<a class="sk-nav-link nav-link nav-more-item-mobile-items" href="../../../robocorp_api_reference.html">robocorp</a> | ||
</li> | ||
<li class="nav-item"> | ||
<a class="sk-nav-link nav-link nav-more-item-mobile-items" href="../../../nvidia_ai_endpoints_api_reference.html">nvidia-ai-endpoints</a> | ||
</li> | ||
<li class="nav-item"> | ||
<a class="sk-nav-link nav-link nav-more-item-mobile-items" href="../../../anthropic_api_reference.html">anthropic</a> | ||
</li> | ||
<li class="nav-item"> | ||
<a class="sk-nav-link nav-link nav-more-item-mobile-items" href="../../../google_vertexai_api_reference.html">google-vertexai</a> | ||
</li> | ||
<li class="nav-item"> | ||
<a class="sk-nav-link nav-link nav-more-item-mobile-items" href="../../../mistralai_api_reference.html">mistralai</a> | ||
</li> | ||
<li class="nav-item dropdown nav-more-item-dropdown"> | ||
<a class="sk-nav-link nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">Partner libs</a> | ||
<div class="dropdown-menu" aria-labelledby="navbarDropdown"> | ||
<a class="sk-nav-dropdown-item dropdown-item" href="../../../exa_api_reference.html">exa</a> | ||
<a class="sk-nav-dropdown-item dropdown-item" href="../../../google_genai_api_reference.html">google-genai</a> | ||
<a class="sk-nav-dropdown-item dropdown-item" href="../../../nvidia_trt_api_reference.html">nvidia-trt</a> | ||
<a class="sk-nav-dropdown-item dropdown-item" href="../../../openai_api_reference.html">openai</a> | ||
<a class="sk-nav-dropdown-item dropdown-item" href="../../../together_api_reference.html">together</a> | ||
<a class="sk-nav-dropdown-item dropdown-item" href="../../../robocorp_api_reference.html">robocorp</a> | ||
<a class="sk-nav-dropdown-item dropdown-item" href="../../../nvidia_ai_endpoints_api_reference.html">nvidia-ai-endpoints</a> | ||
<a class="sk-nav-dropdown-item dropdown-item" href="../../../anthropic_api_reference.html">anthropic</a> | ||
<a class="sk-nav-dropdown-item dropdown-item" href="../../../google_vertexai_api_reference.html">google-vertexai</a> | ||
<a class="sk-nav-dropdown-item dropdown-item" href="../../../mistralai_api_reference.html">mistralai</a> | ||
</div> | ||
</li> | ||
<li class="nav-item"> | ||
<a class="sk-nav-link nav-link" target="_blank" rel="noopener noreferrer" href="https://python.langchain.com/">Docs</a> | ||
</li> | ||
</ul> | ||
<div id="searchbox" role="search"> | ||
<div class="searchformwrapper"> | ||
<form class="search" action="../../../search.html" method="get"> | ||
<input class="sk-search-text-input" type="text" name="q" aria-labelledby="searchlabel" /> | ||
<input class="sk-search-text-btn" type="submit" value="Go" /> | ||
</form> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
</nav> | ||
<div class="d-flex" id="sk-doc-wrapper"> | ||
<input type="checkbox" name="sk-toggle-checkbox" id="sk-toggle-checkbox"> | ||
<label id="sk-sidemenu-toggle" class="sk-btn-toggle-toc btn sk-btn-primary" for="sk-toggle-checkbox">Toggle Menu</label> | ||
<div id="sk-sidebar-wrapper" class="border-right"> | ||
<div class="sk-sidebar-toc-wrapper"> | ||
<div class="btn-group w-100 mb-2" role="group" aria-label="rellinks"> | ||
<a href="#" role="button" class="btn sk-btn-rellink py-1 disabled"">Prev</a><a href="../../index.html" role="button" class="btn sk-btn-rellink py-1" sk-rellink-tooltip="Module code">Up</a> | ||
<a href="#" role="button" class="btn sk-btn-rellink py-1 disabled"">Next</a> | ||
</div> | ||
<div class="sk-sidebar-toc"> | ||
|
||
</div> | ||
</div> | ||
</div> | ||
<div id="sk-page-content-wrapper"> | ||
<div class="sk-page-content container-fluid body px-md-3" role="main"> | ||
|
||
<h1>Source code for langchain.agents.agent_types</h1><div class="highlight"><pre> | ||
<span></span><span class="sd">"""Module definitions of agent types together with corresponding agents."""</span> | ||
<span class="kn">from</span> <span class="nn">enum</span> <span class="kn">import</span> <span class="n">Enum</span> | ||
|
||
<span class="kn">from</span> <span class="nn">langchain_core._api</span> <span class="kn">import</span> <span class="n">deprecated</span> | ||
|
||
|
||
<div class="viewcode-block" id="AgentType"><a class="viewcode-back" href="../../../agents/langchain.agents.agent_types.AgentType.html#langchain.agents.agent_types.AgentType">[docs]</a><span class="nd">@deprecated</span><span class="p">(</span> | ||
<span class="s2">"0.1.0"</span><span class="p">,</span> | ||
<span class="n">alternative</span><span class="o">=</span><span class="p">(</span> | ||
<span class="s2">"Use new agent constructor methods like create_react_agent, create_json_agent, "</span> | ||
<span class="s2">"create_structured_chat_agent, etc."</span> | ||
<span class="p">),</span> | ||
<span class="n">removal</span><span class="o">=</span><span class="s2">"0.2.0"</span><span class="p">,</span> | ||
<span class="p">)</span> | ||
<span class="k">class</span> <span class="nc">AgentType</span><span class="p">(</span><span class="nb">str</span><span class="p">,</span> <span class="n">Enum</span><span class="p">):</span> | ||
<span class="w"> </span><span class="sd">"""An enum for agent types.</span> | ||
|
||
<span class="sd"> See documentation: https://python.langchain.com/docs/modules/agents/agent_types/</span> | ||
<span class="sd"> """</span> | ||
|
||
<span class="n">ZERO_SHOT_REACT_DESCRIPTION</span> <span class="o">=</span> <span class="s2">"zero-shot-react-description"</span> | ||
<span class="w"> </span><span class="sd">"""A zero shot agent that does a reasoning step before acting."""</span> | ||
|
||
<span class="n">REACT_DOCSTORE</span> <span class="o">=</span> <span class="s2">"react-docstore"</span> | ||
<span class="w"> </span><span class="sd">"""A zero shot agent that does a reasoning step before acting.</span> | ||
<span class="sd"> </span> | ||
<span class="sd"> This agent has access to a document store that allows it to look up </span> | ||
<span class="sd"> relevant information to answering the question.</span> | ||
<span class="sd"> """</span> | ||
|
||
<span class="n">SELF_ASK_WITH_SEARCH</span> <span class="o">=</span> <span class="s2">"self-ask-with-search"</span> | ||
<span class="w"> </span><span class="sd">"""An agent that breaks down a complex question into a series of simpler questions.</span> | ||
<span class="sd"> </span> | ||
<span class="sd"> This agent uses a search tool to look up answers to the simpler questions</span> | ||
<span class="sd"> in order to answer the original complex question.</span> | ||
<span class="sd"> """</span> | ||
<span class="n">CONVERSATIONAL_REACT_DESCRIPTION</span> <span class="o">=</span> <span class="s2">"conversational-react-description"</span> | ||
<span class="n">CHAT_ZERO_SHOT_REACT_DESCRIPTION</span> <span class="o">=</span> <span class="s2">"chat-zero-shot-react-description"</span> | ||
<span class="w"> </span><span class="sd">"""A zero shot agent that does a reasoning step before acting.</span> | ||
<span class="sd"> </span> | ||
<span class="sd"> This agent is designed to be used in conjunction </span> | ||
<span class="sd"> """</span> | ||
|
||
<span class="n">CHAT_CONVERSATIONAL_REACT_DESCRIPTION</span> <span class="o">=</span> <span class="s2">"chat-conversational-react-description"</span> | ||
|
||
<span class="n">STRUCTURED_CHAT_ZERO_SHOT_REACT_DESCRIPTION</span> <span class="o">=</span> <span class="p">(</span> | ||
<span class="s2">"structured-chat-zero-shot-react-description"</span> | ||
<span class="p">)</span> | ||
<span class="w"> </span><span class="sd">"""An zero-shot react agent optimized for chat models.</span> | ||
<span class="sd"> </span> | ||
<span class="sd"> This agent is capable of invoking tools that have multiple inputs.</span> | ||
<span class="sd"> """</span> | ||
|
||
<span class="n">OPENAI_FUNCTIONS</span> <span class="o">=</span> <span class="s2">"openai-functions"</span> | ||
<span class="w"> </span><span class="sd">"""An agent optimized for using open AI functions."""</span> | ||
|
||
<span class="n">OPENAI_MULTI_FUNCTIONS</span> <span class="o">=</span> <span class="s2">"openai-multi-functions"</span></div> | ||
</pre></div> | ||
|
||
</div> | ||
<div class="container"> | ||
<footer class="sk-content-footer"> | ||
© 2023, LangChain, Inc.. | ||
Last updated on Mar 04, 2024. | ||
</footer> | ||
</div> | ||
</div> | ||
</div> | ||
<script src="../../../_static/js/vendor/bootstrap.min.js"></script> | ||
<script> | ||
$(document).ready(function() { | ||
/* Add a [>>>] button on the top-right corner of code samples to hide | ||
* the >>> and ... prompts and the output and thus make the code | ||
* copyable. */ | ||
var div = $('.highlight-python .highlight,' + | ||
'.highlight-python3 .highlight,' + | ||
'.highlight-pycon .highlight,' + | ||
'.highlight-default .highlight') | ||
var pre = div.find('pre'); | ||
|
||
// get the styles from the current theme | ||
pre.parent().parent().css('position', 'relative'); | ||
var hide_text = 'Hide prompts and outputs'; | ||
var show_text = 'Show prompts and outputs'; | ||
|
||
// create and add the button to all the code blocks that contain >>> | ||
div.each(function(index) { | ||
var jthis = $(this); | ||
if (jthis.find('.gp').length > 0) { | ||
var button = $('<span class="copybutton">>>></span>'); | ||
button.attr('title', hide_text); | ||
button.data('hidden', 'false'); | ||
jthis.prepend(button); | ||
} | ||
// tracebacks (.gt) contain bare text elements that need to be | ||
// wrapped in a span to work with .nextUntil() (see later) | ||
jthis.find('pre:has(.gt)').contents().filter(function() { | ||
return ((this.nodeType == 3) && (this.data.trim().length > 0)); | ||
}).wrap('<span>'); | ||
}); | ||
|
||
// define the behavior of the button when it's clicked | ||
$('.copybutton').click(function(e){ | ||
e.preventDefault(); | ||
var button = $(this); | ||
if (button.data('hidden') === 'false') { | ||
// hide the code output | ||
button.parent().find('.go, .gp, .gt').hide(); | ||
button.next('pre').find('.gt').nextUntil('.gp, .go').css('visibility', 'hidden'); | ||
button.css('text-decoration', 'line-through'); | ||
button.attr('title', show_text); | ||
button.data('hidden', 'true'); | ||
} else { | ||
// show the code output | ||
button.parent().find('.go, .gp, .gt').show(); | ||
button.next('pre').find('.gt').nextUntil('.gp, .go').css('visibility', 'visible'); | ||
button.css('text-decoration', 'none'); | ||
button.attr('title', hide_text); | ||
button.data('hidden', 'false'); | ||
} | ||
}); | ||
|
||
/*** Add permalink buttons next to glossary terms ***/ | ||
$('dl.glossary > dt[id]').append(function() { | ||
return ('<a class="headerlink" href="#' + | ||
this.getAttribute('id') + | ||
'" title="Permalink to this term">¶</a>'); | ||
}); | ||
}); | ||
|
||
</script> | ||
|
||
</body> | ||
</html> |
Oops, something went wrong.