Skip to content

Commit

Permalink
Update api reference
Browse files Browse the repository at this point in the history
  • Loading branch information
nicoloboschi committed Mar 15, 2024
1 parent 755071a commit 3d30ec9
Show file tree
Hide file tree
Showing 3,436 changed files with 2,041,513 additions and 0 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
1,931 changes: 1,931 additions & 0 deletions api_reference/0.10.0/langchain/_modules/ast.html

Large diffs are not rendered by default.

415 changes: 415 additions & 0 deletions api_reference/0.10.0/langchain/_modules/concurrent/futures/thread.html

Large diffs are not rendered by default.

1,358 changes: 1,358 additions & 0 deletions api_reference/0.10.0/langchain/_modules/index.html

Large diffs are not rendered by default.

1,772 changes: 1,772 additions & 0 deletions api_reference/0.10.0/langchain/_modules/langchain/agents/agent.html

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,236 @@


<!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 &mdash; 🦜🔗 LangChain 0.1.12</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" href="../../../text_splitters_api_reference.html">Text splitters</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">
</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">&quot;&quot;&quot;Module definitions of agent types together with corresponding agents.&quot;&quot;&quot;</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">&quot;0.1.0&quot;</span><span class="p">,</span>
<span class="n">alternative</span><span class="o">=</span><span class="p">(</span>
<span class="s2">&quot;Use new agent constructor methods like create_react_agent, create_json_agent, &quot;</span>
<span class="s2">&quot;create_structured_chat_agent, etc.&quot;</span>
<span class="p">),</span>
<span class="n">removal</span><span class="o">=</span><span class="s2">&quot;0.2.0&quot;</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">&quot;&quot;&quot;An enum for agent types.</span>

<span class="sd"> See documentation: https://python.langchain.com/docs/modules/agents/agent_types/</span>
<span class="sd"> &quot;&quot;&quot;</span>

<span class="n">ZERO_SHOT_REACT_DESCRIPTION</span> <span class="o">=</span> <span class="s2">&quot;zero-shot-react-description&quot;</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;A zero shot agent that does a reasoning step before acting.&quot;&quot;&quot;</span>

<span class="n">REACT_DOCSTORE</span> <span class="o">=</span> <span class="s2">&quot;react-docstore&quot;</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;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"> &quot;&quot;&quot;</span>

<span class="n">SELF_ASK_WITH_SEARCH</span> <span class="o">=</span> <span class="s2">&quot;self-ask-with-search&quot;</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;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"> &quot;&quot;&quot;</span>
<span class="n">CONVERSATIONAL_REACT_DESCRIPTION</span> <span class="o">=</span> <span class="s2">&quot;conversational-react-description&quot;</span>
<span class="n">CHAT_ZERO_SHOT_REACT_DESCRIPTION</span> <span class="o">=</span> <span class="s2">&quot;chat-zero-shot-react-description&quot;</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;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"> &quot;&quot;&quot;</span>

<span class="n">CHAT_CONVERSATIONAL_REACT_DESCRIPTION</span> <span class="o">=</span> <span class="s2">&quot;chat-conversational-react-description&quot;</span>

<span class="n">STRUCTURED_CHAT_ZERO_SHOT_REACT_DESCRIPTION</span> <span class="o">=</span> <span class="p">(</span>
<span class="s2">&quot;structured-chat-zero-shot-react-description&quot;</span>
<span class="p">)</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;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"> &quot;&quot;&quot;</span>

<span class="n">OPENAI_FUNCTIONS</span> <span class="o">=</span> <span class="s2">&quot;openai-functions&quot;</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;An agent optimized for using open AI functions.&quot;&quot;&quot;</span>

<span class="n">OPENAI_MULTI_FUNCTIONS</span> <span class="o">=</span> <span class="s2">&quot;openai-multi-functions&quot;</span></div>
</pre></div>

</div>
<div class="container">
<footer class="sk-content-footer">
&copy; 2023, LangChain, Inc..
Last updated on Mar 15, 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">&gt;&gt;&gt;</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>
Loading

0 comments on commit 3d30ec9

Please sign in to comment.