Skip to content

Commit

Permalink
deploy: fd674c9
Browse files Browse the repository at this point in the history
  • Loading branch information
josh-ashkinaze committed Aug 23, 2024
1 parent 149cca0 commit dc28f80
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 14 deletions.
22 changes: 11 additions & 11 deletions _modules/plurals/deliberation.html
Original file line number Diff line number Diff line change
Expand Up @@ -416,7 +416,9 @@ <h1>Source code for plurals.deliberation</h1><div class="highlight"><pre>

<span class="k">def</span> <span class="nf">_set_combination_instructions</span><span class="p">(</span><span class="bp">self</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="kc">None</span><span class="p">:</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> Set the combination instructions for agents based on the provided value or the default.</span>
<span class="sd"> Set the combination instructions for agents based on the provided value or the default. If agents have their own</span>
<span class="sd"> combination instructions, use those instead.</span>

<span class="sd"> &quot;&quot;&quot;</span>
<span class="bp">self</span><span class="o">.</span><span class="n">combination_instructions</span> <span class="o">=</span> <span class="n">SmartString</span><span class="p">(</span>
<span class="bp">self</span><span class="o">.</span><span class="n">defaults</span><span class="p">[</span><span class="s1">&#39;combination_instructions&#39;</span><span class="p">]</span><span class="o">.</span><span class="n">get</span><span class="p">(</span>
Expand All @@ -425,11 +427,9 @@ <h1>Source code for plurals.deliberation</h1><div class="highlight"><pre>

<span class="k">for</span> <span class="n">agent</span> <span class="ow">in</span> <span class="bp">self</span><span class="o">.</span><span class="n">agents</span><span class="p">:</span>
<span class="k">if</span> <span class="n">agent</span><span class="o">.</span><span class="n">combination_instructions</span><span class="p">:</span>
<span class="n">warnings</span><span class="o">.</span><span class="n">warn</span><span class="p">(</span>
<span class="s2">&quot;Writing over agent&#39;s combination instructions with Chain&#39;s combination instructions&quot;</span><span class="p">)</span>
<span class="k">else</span><span class="p">:</span>
<span class="k">pass</span>
<span class="n">agent</span><span class="o">.</span><span class="n">combination_instructions</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">combination_instructions</span>
<span class="k">else</span><span class="p">:</span>
<span class="n">agent</span><span class="o">.</span><span class="n">combination_instructions</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">combination_instructions</span>

<span class="k">def</span> <span class="nf">_set_agent_task_description</span><span class="p">(</span><span class="bp">self</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="kc">None</span><span class="p">:</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;</span>
Expand Down Expand Up @@ -709,8 +709,8 @@ <h1>Source code for plurals.deliberation</h1><div class="highlight"><pre>
<span class="k">def</span> <span class="nf">process</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> Process the debate. In a debate, two agents take turns responding to a task. Prompts for agents are prefixed</span>
<span class="sd"> with [You] and [Other] to indicate the speaker. For moderators the responses are prefixed with [Debater 1] and</span>
<span class="sd"> [Debater 2] to indicate the speaker.</span>
<span class="sd"> with [WHAT YOU SAID] and [WHAT OTHER PARTICIPANT SAID] to indicate the speaker. For moderators the responses are</span>
<span class="sd"> prefixed with [Debater 1] and [Debater 2] to indicate the speaker.</span>
<span class="sd"> &quot;&quot;&quot;</span>

<span class="c1"># Initialize lists for storing responses from the perspective of each agent.</span>
Expand Down Expand Up @@ -742,11 +742,11 @@ <h1>Source code for plurals.deliberation</h1><div class="highlight"><pre>

<span class="c1"># Apply the correct prefix and update both lists</span>
<span class="k">if</span> <span class="n">i</span> <span class="o">==</span> <span class="mi">0</span><span class="p">:</span>
<span class="n">previous_responses_agent1</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="sa">f</span><span class="s2">&quot;[You]: </span><span class="si">{</span><span class="n">response</span><span class="si">}</span><span class="s2">&quot;</span><span class="p">)</span>
<span class="n">previous_responses_agent2</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="sa">f</span><span class="s2">&quot;[Other]: </span><span class="si">{</span><span class="n">response</span><span class="si">}</span><span class="s2">&quot;</span><span class="p">)</span>
<span class="n">previous_responses_agent1</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="sa">f</span><span class="s2">&quot;[WHAT YOU SAID]: </span><span class="si">{</span><span class="n">response</span><span class="si">}</span><span class="s2">&quot;</span><span class="p">)</span>
<span class="n">previous_responses_agent2</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="sa">f</span><span class="s2">&quot;[WHAT OTHER PARTICIPANT SAID]: </span><span class="si">{</span><span class="n">response</span><span class="si">}</span><span class="s2">&quot;</span><span class="p">)</span>
<span class="k">else</span><span class="p">:</span>
<span class="n">previous_responses_agent2</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="sa">f</span><span class="s2">&quot;[You]: </span><span class="si">{</span><span class="n">response</span><span class="si">}</span><span class="s2">&quot;</span><span class="p">)</span>
<span class="n">previous_responses_agent1</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="sa">f</span><span class="s2">&quot;[Other]: </span><span class="si">{</span><span class="n">response</span><span class="si">}</span><span class="s2">&quot;</span><span class="p">)</span>
<span class="n">previous_responses_agent2</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="sa">f</span><span class="s2">&quot;[WHAT YOU SAID]: </span><span class="si">{</span><span class="n">response</span><span class="si">}</span><span class="s2">&quot;</span><span class="p">)</span>
<span class="n">previous_responses_agent1</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="sa">f</span><span class="s2">&quot;[WHAT OTHER PARTICIPANT SAID]: </span><span class="si">{</span><span class="n">response</span><span class="si">}</span><span class="s2">&quot;</span><span class="p">)</span>

<span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">moderated</span> <span class="ow">and</span> <span class="bp">self</span><span class="o">.</span><span class="n">moderator</span><span class="p">:</span>
<span class="n">moderated_response</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">moderator</span><span class="o">.</span><span class="n">_moderate_responses</span><span class="p">(</span>
Expand Down
4 changes: 2 additions & 2 deletions deliberation.html
Original file line number Diff line number Diff line change
Expand Up @@ -338,8 +338,8 @@
<dt class="sig sig-object py" id="plurals.deliberation.Debate.process">
<span class="sig-name descname"><span class="pre">process</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/plurals/deliberation.html#Debate.process"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#plurals.deliberation.Debate.process" title="Link to this definition"></a></dt>
<dd><p>Process the debate. In a debate, two agents take turns responding to a task. Prompts for agents are prefixed
with [You] and [Other] to indicate the speaker. For moderators the responses are prefixed with [Debater 1] and
[Debater 2] to indicate the speaker.</p>
with [WHAT YOU SAID] and [WHAT OTHER PARTICIPANT SAID] to indicate the speaker. For moderators the responses are
prefixed with [Debater 1] and [Debater 2] to indicate the speaker.</p>
</dd></dl>

</dd></dl>
Expand Down
Loading

0 comments on commit dc28f80

Please sign in to comment.