Skip to content

Commit

Permalink
Deploying to gh-pages from @ 5587fbc 🚀
Browse files Browse the repository at this point in the history
  • Loading branch information
norpadon committed Sep 7, 2024
1 parent c31ab22 commit 690deb6
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 17 deletions.
4 changes: 2 additions & 2 deletions _modules/wanga/models/messages.html
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ <h1>Source code for wanga.models.messages</h1><div class="highlight"><pre>
<span class="k">def</span> <span class="nf">parse</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">header_str</span><span class="p">:</span> <span class="nb">str</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="n">ParsedHeader</span><span class="p">:</span>
<span class="n">header_match</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">full_regex</span><span class="o">.</span><span class="n">match</span><span class="p">(</span><span class="n">header_str</span><span class="p">)</span>
<span class="k">if</span> <span class="n">header_match</span> <span class="ow">is</span> <span class="kc">None</span><span class="p">:</span>
<span class="k">raise</span> <span class="n">MessageSyntaxError</span><span class="p">(</span><span class="sa">f</span><span class="s2">&quot;Invalid header: </span><span class="si">{</span><span class="n">header_str</span><span class="si">}</span><span class="s2">&quot;</span><span class="p">)</span>
<span class="k">raise</span> <span class="n">MessageSyntaxError</span><span class="p">(</span><span class="sa">f</span><span class="s2">&quot;Invalid header: </span><span class="si">{</span><span class="n">header_str</span><span class="si">}</span><span class="s2">.&quot;</span><span class="p">)</span>
<span class="n">name</span> <span class="o">=</span> <span class="n">header_match</span><span class="o">.</span><span class="n">group</span><span class="p">(</span><span class="s2">&quot;name&quot;</span><span class="p">)</span>
<span class="n">params_str</span> <span class="o">=</span> <span class="n">header_match</span><span class="o">.</span><span class="n">group</span><span class="p">(</span><span class="s2">&quot;params&quot;</span><span class="p">)</span>
<span class="n">params</span> <span class="o">=</span> <span class="p">{}</span>
Expand All @@ -249,7 +249,7 @@ <h1>Source code for wanga.models.messages</h1><div class="highlight"><pre>
<span class="k">yield</span> <span class="n">text_block</span>


<span class="n">_URL_SPECIAL_SYMBOLS</span> <span class="o">=</span> <span class="n">re</span><span class="o">.</span><span class="n">escape</span><span class="p">(</span><span class="sa">r</span><span class="s2">&quot;/:!#$%&amp;&#39;*+-.^_`|~&quot;</span><span class="p">)</span>
<span class="n">_URL_SPECIAL_SYMBOLS</span> <span class="o">=</span> <span class="n">re</span><span class="o">.</span><span class="n">escape</span><span class="p">(</span><span class="sa">r</span><span class="s2">&quot;/:!#$%&amp;&#39;*+-.^_`|~?=&quot;</span><span class="p">)</span>
<span class="n">_PARAM_KEY_SYMBOLS</span> <span class="o">=</span> <span class="sa">r</span><span class="s2">&quot;[a-zA-Z0-9_\-]&quot;</span>
<span class="n">_PARAM_VALUE_SYMBOLS</span> <span class="o">=</span> <span class="sa">f</span><span class="s2">&quot;[a-zA-Z0-9</span><span class="si">{</span><span class="n">_URL_SPECIAL_SYMBOLS</span><span class="si">}</span><span class="s2">]&quot;</span>

Expand Down
14 changes: 6 additions & 8 deletions _modules/wanga/models/model.html
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ <h1>Source code for wanga.models.model</h1><div class="highlight"><pre>
<span class="s2">&quot;ModelResponse&quot;</span><span class="p">,</span>
<span class="s2">&quot;ModelError&quot;</span><span class="p">,</span>
<span class="s2">&quot;AuthenticationError&quot;</span><span class="p">,</span>
<span class="s2">&quot;PromptTooLongError&quot;</span><span class="p">,</span>
<span class="s2">&quot;PromptError&quot;</span><span class="p">,</span>
<span class="s2">&quot;ModelTimeoutError&quot;</span><span class="p">,</span>
<span class="s2">&quot;InvalidJsonError&quot;</span><span class="p">,</span>
<span class="s2">&quot;RateLimitError&quot;</span><span class="p">,</span>
Expand Down Expand Up @@ -127,7 +127,7 @@ <h1>Source code for wanga.models.model</h1><div class="highlight"><pre>
<span class="n">top_p</span><span class="p">:</span> <span class="nb">float</span> <span class="o">|</span> <span class="kc">None</span> <span class="o">=</span> <span class="kc">None</span>
<span class="n">frequency_penalty</span><span class="p">:</span> <span class="nb">float</span> <span class="o">|</span> <span class="kc">None</span> <span class="o">=</span> <span class="kc">None</span>
<span class="n">presence_penalty</span><span class="p">:</span> <span class="nb">float</span> <span class="o">|</span> <span class="kc">None</span> <span class="o">=</span> <span class="kc">None</span>
<span class="n">stop_sequences</span><span class="p">:</span> <span class="nb">list</span><span class="p">[</span><span class="nb">str</span><span class="p">]</span> <span class="o">=</span> <span class="n">field</span><span class="p">(</span><span class="n">factory</span><span class="o">=</span><span class="nb">list</span><span class="p">)</span>
<span class="n">stop_sequences</span><span class="p">:</span> <span class="nb">list</span><span class="p">[</span><span class="nb">str</span><span class="p">]</span> <span class="o">|</span> <span class="kc">None</span> <span class="o">=</span> <span class="kc">None</span>
<span class="n">random_seed</span><span class="p">:</span> <span class="nb">int</span> <span class="o">|</span> <span class="kc">None</span> <span class="o">=</span> <span class="kc">None</span>
<span class="n">force_json</span><span class="p">:</span> <span class="nb">bool</span> <span class="o">=</span> <span class="kc">False</span>

Expand Down Expand Up @@ -178,12 +178,10 @@ <h1>Source code for wanga.models.model</h1><div class="highlight"><pre>



<div class="viewcode-block" id="PromptTooLongError">
<a class="viewcode-back" href="../../../api.html#wanga.models.model.PromptTooLongError">[docs]</a>
<span class="k">class</span> <span class="nc">PromptTooLongError</span><span class="p">(</span><span class="ne">ValueError</span><span class="p">,</span> <span class="n">ModelError</span><span class="p">):</span>
<span class="w"> </span><span class="sa">r</span><span class="sd">&quot;&quot;&quot;Raised when the total length of prompt and requested response exceeds the maximum allowed number of tokens,</span>
<span class="sd"> or the size of requested completion exceeds the maximum response size.</span>
<span class="sd"> &quot;&quot;&quot;</span></div>
<div class="viewcode-block" id="PromptError">
<a class="viewcode-back" href="../../../api.html#wanga.models.model.PromptError">[docs]</a>
<span class="k">class</span> <span class="nc">PromptError</span><span class="p">(</span><span class="ne">ValueError</span><span class="p">,</span> <span class="n">ModelError</span><span class="p">):</span>
<span class="w"> </span><span class="sa">r</span><span class="sd">&quot;&quot;&quot;Raised when the prompt is malformed or uses unsupported features.&quot;&quot;&quot;</span></div>



Expand Down
9 changes: 4 additions & 5 deletions api.html
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
<li class="toctree-l4"><a class="reference internal" href="#wanga.models.model.InvalidJsonError"><code class="docutils literal notranslate"><span class="pre">InvalidJsonError</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="#wanga.models.model.ModelError"><code class="docutils literal notranslate"><span class="pre">ModelError</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="#wanga.models.model.ModelTimeoutError"><code class="docutils literal notranslate"><span class="pre">ModelTimeoutError</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="#wanga.models.model.PromptTooLongError"><code class="docutils literal notranslate"><span class="pre">PromptTooLongError</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="#wanga.models.model.PromptError"><code class="docutils literal notranslate"><span class="pre">PromptError</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="#wanga.models.model.RateLimitError"><code class="docutils literal notranslate"><span class="pre">RateLimitError</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="#wanga.models.model.ServiceUnvailableError"><code class="docutils literal notranslate"><span class="pre">ServiceUnvailableError</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="#wanga.models.model.ToolUseMode"><code class="docutils literal notranslate"><span class="pre">ToolUseMode</span></code></a></li>
Expand Down Expand Up @@ -156,10 +156,9 @@ <h2>LLM API<a class="headerlink" href="#llm-api" title="Link to this heading">
</dd></dl>

<dl class="py exception">
<dt class="sig sig-object py" id="wanga.models.model.PromptTooLongError">
<em class="property"><span class="pre">exception</span><span class="w"> </span></em><span class="sig-prename descclassname"><span class="pre">wanga.models.model.</span></span><span class="sig-name descname"><span class="pre">PromptTooLongError</span></span><a class="reference internal" href="_modules/wanga/models/model.html#PromptTooLongError"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#wanga.models.model.PromptTooLongError" title="Link to this definition"></a></dt>
<dd><p>Raised when the total length of prompt and requested response exceeds the maximum allowed number of tokens,
or the size of requested completion exceeds the maximum response size.</p>
<dt class="sig sig-object py" id="wanga.models.model.PromptError">
<em class="property"><span class="pre">exception</span><span class="w"> </span></em><span class="sig-prename descclassname"><span class="pre">wanga.models.model.</span></span><span class="sig-name descname"><span class="pre">PromptError</span></span><a class="reference internal" href="_modules/wanga/models/model.html#PromptError"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#wanga.models.model.PromptError" title="Link to this definition"></a></dt>
<dd><p>Raised when the prompt is malformed or uses unsupported features.</p>
</dd></dl>

<dl class="py exception">
Expand Down
2 changes: 1 addition & 1 deletion genindex.html
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ <h2 id="M">M</h2>
<h2 id="P">P</h2>
<table style="width: 100%" class="indextable genindextable"><tr>
<td style="width: 33%; vertical-align: top;"><ul>
<li><a href="api.html#wanga.models.model.PromptTooLongError">PromptTooLongError</a>
<li><a href="api.html#wanga.models.model.PromptError">PromptError</a>
</li>
</ul></td>
</tr></table>
Expand Down
Binary file modified objects.inv
Binary file not shown.
Loading

0 comments on commit 690deb6

Please sign in to comment.