Skip to content

Commit

Permalink
deploy: af36b98
Browse files Browse the repository at this point in the history
  • Loading branch information
josh-ashkinaze committed Oct 5, 2024
1 parent 948db66 commit 566b7cb
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 7 deletions.
3 changes: 2 additions & 1 deletion _modules/plurals/agent.html
Original file line number Diff line number Diff line change
Expand Up @@ -792,7 +792,7 @@ <h1>Source code for plurals.agent</h1><div class="highlight"><pre>
<span class="nd">@property</span>
<span class="k">def</span> <span class="nf">_info</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"> This is a pricate property, mainly used for debugging and testing. It includes more than in the user-facing info.</span>
<span class="sd"> This is a private property, mainly used for debugging and testing. It includes more than in the user-facing info.</span>
<span class="sd"> &quot;&quot;&quot;</span>
<span class="k">return</span> <span class="p">{</span>
<span class="s2">&quot;original_task&quot;</span><span class="p">:</span> <span class="bp">self</span><span class="o">.</span><span class="n">original_task_description</span><span class="p">,</span>
Expand Down Expand Up @@ -825,6 +825,7 @@ <h1>Source code for plurals.agent</h1><div class="highlight"><pre>
<span class="s2">&quot;combination_instructions&quot;</span><span class="p">:</span> <span class="bp">self</span><span class="o">.</span><span class="n">combination_instructions</span><span class="p">,</span>
<span class="s2">&quot;model&quot;</span><span class="p">:</span> <span class="bp">self</span><span class="o">.</span><span class="n">model</span><span class="p">,</span>
<span class="s2">&quot;kwargs&quot;</span><span class="p">:</span> <span class="bp">self</span><span class="o">.</span><span class="n">kwargs</span><span class="p">}</span>

<span class="nd">@property</span>
<span class="k">def</span> <span class="nf">responses</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>
Expand Down
7 changes: 3 additions & 4 deletions _modules/plurals/deliberation.html
Original file line number Diff line number Diff line change
Expand Up @@ -689,7 +689,8 @@ <h1>Source code for plurals.deliberation</h1><div class="highlight"><pre>
<span class="c1"># Common operations for cases 1 and 3</span>
<span class="bp">self</span><span class="o">.</span><span class="n">moderator</span><span class="o">.</span><span class="n">task_description</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">task</span>
<span class="bp">self</span><span class="o">.</span><span class="n">moderator</span><span class="o">.</span><span class="n">system_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">moderator</span><span class="o">.</span><span class="n">system_instructions</span><span class="p">)</span><span class="o">.</span><span class="n">format</span><span class="p">(</span><span class="n">task</span><span class="o">=</span><span class="bp">self</span><span class="o">.</span><span class="n">task</span><span class="p">)</span> <span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">moderator</span><span class="o">.</span><span class="n">system_instructions</span> <span class="k">else</span> <span class="kc">None</span>
<span class="bp">self</span><span class="o">.</span><span class="n">moderator</span><span class="o">.</span><span class="n">system_instructions</span><span class="p">)</span><span class="o">.</span><span class="n">format</span><span class="p">(</span>
<span class="n">task</span><span class="o">=</span><span class="bp">self</span><span class="o">.</span><span class="n">task</span><span class="p">)</span> <span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">moderator</span><span class="o">.</span><span class="n">system_instructions</span> <span class="k">else</span> <span class="kc">None</span>
<span class="k">else</span><span class="p">:</span>
<span class="k">if</span> <span class="ow">not</span> <span class="bp">self</span><span class="o">.</span><span class="n">moderator</span><span class="o">.</span><span class="n">task</span> <span class="ow">or</span> <span class="bp">self</span><span class="o">.</span><span class="n">moderator</span><span class="o">.</span><span class="n">task</span><span class="o">.</span><span class="n">strip</span><span class="p">()</span> <span class="o">==</span> <span class="s1">&#39;&#39;</span><span class="p">:</span>
<span class="c1"># Case 2: Value provided to neither moderator nor structure</span>
Expand Down Expand Up @@ -877,7 +878,7 @@ <h1>Source code for plurals.deliberation</h1><div class="highlight"><pre>
<span class="k">if</span> <span class="nb">len</span><span class="p">(</span><span class="n">agents</span><span class="p">)</span> <span class="o">!=</span> <span class="mi">2</span><span class="p">:</span>
<span class="k">raise</span> <span class="ne">ValueError</span><span class="p">(</span><span class="s2">&quot;Debate requires exactly two agents.&quot;</span><span class="p">)</span>
<span class="nb">super</span><span class="p">()</span><span class="o">.</span><span class="fm">__init__</span><span class="p">(</span>
<span class="n">agents</span><span class="p">,</span><span class="n">task</span><span class="p">,</span><span class="n">shuffle</span><span class="p">,</span><span class="n">cycles</span><span class="p">,</span><span class="n">last_n</span><span class="p">,</span><span class="n">combination_instructions</span><span class="p">,</span><span class="n">moderator</span><span class="p">)</span>
<span class="n">agents</span><span class="p">,</span> <span class="n">task</span><span class="p">,</span> <span class="n">shuffle</span><span class="p">,</span> <span class="n">cycles</span><span class="p">,</span> <span class="n">last_n</span><span class="p">,</span> <span class="n">combination_instructions</span><span class="p">,</span> <span class="n">moderator</span><span class="p">)</span>

<span class="nd">@staticmethod</span>
<span class="k">def</span> <span class="nf">_format_previous_responses</span><span class="p">(</span><span class="n">responses</span><span class="p">:</span> <span class="n">List</span><span class="p">[</span><span class="nb">str</span><span class="p">])</span> <span class="o">-&gt;</span> <span class="nb">str</span><span class="p">:</span>
Expand Down Expand Up @@ -1013,8 +1014,6 @@ <h1>Source code for plurals.deliberation</h1><div class="highlight"><pre>
<span class="sd"> task = &quot;What are your thoughts on the role of government in society?&quot;</span>
<span class="sd"> graph = Graph(agents=agents, edges=edges, task=task)</span>
<span class="sd"> graph.process()</span>


<span class="sd"> &quot;&quot;&quot;</span>

<span class="k">def</span> <span class="fm">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span>
Expand Down
3 changes: 1 addition & 2 deletions _modules/plurals/helpers.html
Original file line number Diff line number Diff line change
Expand Up @@ -320,6 +320,7 @@ <h1>Source code for plurals.helpers</h1><div class="highlight"><pre>
<span class="nb">print</span><span class="p">()</span></div>



<div class="viewcode-block" id="strip_nested_dict">
<a class="viewcode-back" href="../../helpers.html#plurals.helpers.strip_nested_dict">[docs]</a>
<span class="k">def</span> <span class="nf">strip_nested_dict</span><span class="p">(</span><span class="n">d</span><span class="p">:</span> <span class="n">Dict</span><span class="p">[</span><span class="nb">str</span><span class="p">,</span> <span class="n">Any</span><span class="p">])</span> <span class="o">-&gt;</span> <span class="n">Dict</span><span class="p">[</span><span class="nb">str</span><span class="p">,</span> <span class="n">Any</span><span class="p">]:</span>
Expand All @@ -343,7 +344,6 @@ <h1>Source code for plurals.helpers</h1><div class="highlight"><pre>




<div class="viewcode-block" id="load_yaml">
<a class="viewcode-back" href="../../helpers.html#plurals.helpers.load_yaml">[docs]</a>
<span class="k">def</span> <span class="nf">load_yaml</span><span class="p">(</span><span class="n">file_path</span><span class="p">:</span> <span class="nb">str</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="n">Dict</span><span class="p">[</span><span class="nb">str</span><span class="p">,</span> <span class="n">Any</span><span class="p">]:</span>
Expand Down Expand Up @@ -396,7 +396,6 @@ <h1>Source code for plurals.helpers</h1><div class="highlight"><pre>




<div class="viewcode-block" id="SmartString">
<a class="viewcode-back" href="../../helpers.html#plurals.helpers.SmartString">[docs]</a>
<span class="k">class</span> <span class="nc">SmartString</span><span class="p">(</span><span class="nb">str</span><span class="p">):</span>
Expand Down

0 comments on commit 566b7cb

Please sign in to comment.