Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
whylabs committed Dec 12, 2023
1 parent 04c0949 commit a5f846e
Show file tree
Hide file tree
Showing 16 changed files with 314 additions and 227 deletions.
Binary file modified .doctrees/environment.pickle
Binary file not shown.
Binary file modified .doctrees/whylogs_container.whylabs.container.doctree
Binary file not shown.
Binary file modified .doctrees/whylogs_container.whylabs.llm_validation.doctree
Binary file not shown.
Binary file modified .doctrees/whylogs_container.whylabs.logger.doctree
Binary file not shown.
8 changes: 0 additions & 8 deletions _sources/whylogs_container.whylabs.llm_validation.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -60,14 +60,6 @@ whylogs\_container.whylabs.llm\_validation.validation\_utils module
:undoc-members:
:show-inheritance:

whylogs\_container.whylabs.llm\_validation.validation\_workflow module
----------------------------------------------------------------------

.. automodule:: whylogs_container.whylabs.llm_validation.validation_workflow
:members:
:undoc-members:
:show-inheritance:

whylogs\_container.whylabs.llm\_validation.validator module
-----------------------------------------------------------

Expand Down
111 changes: 59 additions & 52 deletions genindex.html

Large diffs are not rendered by default.

Binary file modified objects.inv
Binary file not shown.
2 changes: 1 addition & 1 deletion openapi.json

Large diffs are not rendered by default.

6 changes: 0 additions & 6 deletions py-modindex.html
Original file line number Diff line number Diff line change
Expand Up @@ -341,12 +341,6 @@ <h1>Python Module Index</h1>
<a href="whylogs_container.whylabs.llm_validation.html#module-whylogs_container.whylabs.llm_validation.validation_utils"><code class="xref">whylogs_container.whylabs.llm_validation.validation_utils</code></a></td><td>
<em></em></td>
</tr>
<tr class="cg-1">
<td></td>
<td>&#160;&#160;&#160;
<a href="whylogs_container.whylabs.llm_validation.html#module-whylogs_container.whylabs.llm_validation.validation_workflow"><code class="xref">whylogs_container.whylabs.llm_validation.validation_workflow</code></a></td><td>
<em></em></td>
</tr>
<tr class="cg-1">
<td></td>
<td>&#160;&#160;&#160;
Expand Down
2 changes: 1 addition & 1 deletion searchindex.js

Large diffs are not rendered by default.

49 changes: 38 additions & 11 deletions whylogs-container-python.html

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion whylogs_container.html
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,6 @@ <h2>Subpackages<a class="headerlink" href="#subpackages" title="Permalink to thi
<li class="toctree-l4"><a class="reference internal" href="whylogs_container.whylabs.llm_validation.html#module-whylogs_container.whylabs.llm_validation.signals">whylogs_container.whylabs.llm_validation.signals module</a></li>
<li class="toctree-l4"><a class="reference internal" href="whylogs_container.whylabs.llm_validation.html#module-whylogs_container.whylabs.llm_validation.validate">whylogs_container.whylabs.llm_validation.validate module</a></li>
<li class="toctree-l4"><a class="reference internal" href="whylogs_container.whylabs.llm_validation.html#module-whylogs_container.whylabs.llm_validation.validation_utils">whylogs_container.whylabs.llm_validation.validation_utils module</a></li>
<li class="toctree-l4"><a class="reference internal" href="whylogs_container.whylabs.llm_validation.html#module-whylogs_container.whylabs.llm_validation.validation_workflow">whylogs_container.whylabs.llm_validation.validation_workflow module</a></li>
<li class="toctree-l4"><a class="reference internal" href="whylogs_container.whylabs.llm_validation.html#module-whylogs_container.whylabs.llm_validation.validator">whylogs_container.whylabs.llm_validation.validator module</a></li>
<li class="toctree-l4"><a class="reference internal" href="whylogs_container.whylabs.llm_validation.html#module-whylogs_container.whylabs.llm_validation.validators">whylogs_container.whylabs.llm_validation.validators module</a></li>
<li class="toctree-l4"><a class="reference internal" href="whylogs_container.whylabs.llm_validation.html#module-whylogs_container.whylabs.llm_validation">Module contents</a></li>
Expand Down
49 changes: 41 additions & 8 deletions whylogs_container.whylabs.container.html
Original file line number Diff line number Diff line change
Expand Up @@ -881,7 +881,7 @@ <h3>}’<a class="headerlink" href="#id5" title="Permalink to this heading">#</a
<p>Log embeddings data. The Swagger UI isn’t able to call this currently.</p>
<p>## Sample curl request:</p>
<p><a href="#id14"><span class="problematic" id="id15">``</span></a><a href="#id16"><span class="problematic" id="id17">`</span></a>bash
curl -X ‘POST’ -H “X-API-Key: &lt;password&gt;” -H “Content-Type: application/json” ‘<a class="reference external" href="http://localhost:8000/log-embeddings">http://localhost:8000/log-embeddings</a>’ –data-raw ‘{</p>
curl -X ‘POST’ -H “X-API-Key: &lt;password&gt;” -H “Content-Type: application/octet-stream” ‘<a class="reference external" href="http://localhost:8000/log-embeddings">http://localhost:8000/log-embeddings</a>’ –data-raw ‘{</p>
<blockquote>
<div><p>“datasetId”: “model-62”,
“timestamp”: 1634235000,
Expand Down Expand Up @@ -913,7 +913,7 @@ <h3>}’<a class="headerlink" href="#id18" title="Permalink to this heading">#</
</div></blockquote>
<p>}</p>
<p># Make the POST request
headers = {“X-API-Key”: api_key, “Content-Type”: “application/json”}
headers = {“X-API-Key”: api_key, “Content-Type”: “application/octet-stream”}
response = requests.post(url, json=data, headers=headers)
<a href="#id23"><span class="problematic" id="id24">``</span></a><a href="#id25"><span class="problematic" id="id26">`</span></a></p>
</section>
Expand Down Expand Up @@ -943,11 +943,6 @@ <h3>}’<a class="headerlink" href="#id18" title="Permalink to this heading">#</
<em class="property"><span class="k"><span class="pre">async</span></span><span class="w"> </span></em><span class="sig-prename descclassname"><span class="pre">whylogs_container.whylabs.container.routes.</span></span><span class="sig-name descname"><span class="pre">log_pubsub_embeddings</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">_raw_request</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">Request</span></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">&#x2192;</span> <span class="sig-return-typehint"><span class="pre">None</span></span></span><a class="headerlink" href="#whylogs_container.whylabs.container.routes.log_pubsub_embeddings" title="Permalink to this definition">#</a></dt>
<dd></dd></dl>

<dl class="py function">
<dt class="sig sig-object py" id="whylogs_container.whylabs.container.routes.openai_proxy">
<em class="property"><span class="k"><span class="pre">async</span></span><span class="w"> </span></em><span class="sig-prename descclassname"><span class="pre">whylogs_container.whylabs.container.routes.</span></span><span class="sig-name descname"><span class="pre">openai_proxy</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">request</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">Request</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">whylabs_dataset_id</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">str</span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">Header(PydanticUndefined)</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">prompt_id</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">str</span><span class="w"> </span><span class="p"><span class="pre">|</span></span><span class="w"> </span><span class="pre">None</span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">model</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">str</span><span class="w"> </span><span class="p"><span class="pre">|</span></span><span class="w"> </span><span class="pre">None</span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">&#x2192;</span> <span class="sig-return-typehint"><span class="pre">Any</span><span class="w"> </span><span class="p"><span class="pre">|</span></span><span class="w"> </span><span class="pre">None</span></span></span><a class="headerlink" href="#whylogs_container.whylabs.container.routes.openai_proxy" title="Permalink to this definition">#</a></dt>
<dd></dd></dl>

<dl class="py function">
<dt class="sig sig-object py" id="whylogs_container.whylabs.container.routes.publish_profiles">
<em class="property"><span class="k"><span class="pre">async</span></span><span class="w"> </span></em><span class="sig-prename descclassname"><span class="pre">whylogs_container.whylabs.container.routes.</span></span><span class="sig-name descname"><span class="pre">publish_profiles</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">&#x2192;</span> <span class="sig-return-typehint"><span class="pre">None</span></span></span><a class="headerlink" href="#whylogs_container.whylabs.container.routes.publish_profiles" title="Permalink to this definition">#</a></dt>
Expand All @@ -963,6 +958,44 @@ <h3>}’<a class="headerlink" href="#id18" title="Permalink to this heading">#</
<em class="property"><span class="k"><span class="pre">async</span></span><span class="w"> </span></em><span class="sig-prename descclassname"><span class="pre">whylogs_container.whylabs.container.routes.</span></span><span class="sig-name descname"><span class="pre">status</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">&#x2192;</span> <span class="sig-return-typehint"><a class="reference internal" href="#whylogs_container.whylabs.container.responses.ProcessLoggerStatusResponse" title="whylogs_container.whylabs.container.responses.ProcessLoggerStatusResponse"><span class="pre">ProcessLoggerStatusResponse</span></a></span></span><a class="headerlink" href="#whylogs_container.whylabs.container.routes.status" title="Permalink to this definition">#</a></dt>
<dd></dd></dl>

<dl class="py function">
<dt class="sig sig-object py" id="whylogs_container.whylabs.container.routes.validate_llm">
<em class="property"><span class="k"><span class="pre">async</span></span><span class="w"> </span></em><span class="sig-prename descclassname"><span class="pre">whylogs_container.whylabs.container.routes.</span></span><span class="sig-name descname"><span class="pre">validate_llm</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">_raw_request</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">Request</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">response</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">Response</span></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">&#x2192;</span> <span class="sig-return-typehint"><a class="reference internal" href="whylogs_container.whylabs.llm_validation.html#whylogs_container.whylabs.llm_validation.metadata.ValidationReport" title="whylogs_container.whylabs.llm_validation.metadata.ValidationReport"><span class="pre">ValidationReport</span></a></span></span><a class="headerlink" href="#whylogs_container.whylabs.container.routes.validate_llm" title="Permalink to this definition">#</a></dt>
<dd><p>This endpoint can be used to synchronously get validation results from a single input
prompt/response. It automatically performs whylogs profiling and sends profiles to
whylabs in the background, just like the /log endpoint.</p>
<p>## Sample curl request:</p>
<p><a href="#id27"><span class="problematic" id="id28">``</span></a><a href="#id29"><span class="problematic" id="id30">`</span></a>bash
curl -X ‘POST’ -H “X-API-Key: &lt;password&gt;” -H “Content-Type: application/octet-stream” ‘<a class="reference external" href="http://localhost:8000/validate/llm">http://localhost:8000/validate/llm</a>’ –data-raw ‘{</p>
<blockquote>
<div><p>“datasetId”: “model-62”,
“prompt”: “This is a test prompt”,
“response”: “This is a test response”</p>
</div></blockquote>
<section id="id31">
<h3>}’<a class="headerlink" href="#id31" title="Permalink to this heading">#</a></h3>
<p>## Sample Python request:
<a href="#id32"><span class="problematic" id="id33">``</span></a><a href="#id34"><span class="problematic" id="id35">`</span></a>python
import requests</p>
<p># Define your API key
api_key = “&lt;password&gt;”</p>
<p># API endpoint
url = ‘<a class="reference external" href="http://localhost:8000/validate/llm">http://localhost:8000/validate/llm</a></p>
<p># Sample data
data = {</p>
<blockquote>
<div><p>“datasetId”: “model-62”,
“prompt”: “This is a test prompt”,
“response”: “This is a test response”</p>
</div></blockquote>
<p>}</p>
<p># Make the POST request
headers = {“X-API-Key”: api_key, “Content-Type”: “application/octet-stream”}
response = requests.post(url, json=data, headers=headers)
<a href="#id36"><span class="problematic" id="id37">``</span></a><a href="#id38"><span class="problematic" id="id39">`</span></a></p>
</section>
</dd></dl>

</section>
<section id="module-whylogs_container.whylabs.container.startup">
<span id="whylogs-container-whylabs-container-startup-module"></span><h2>whylogs_container.whylabs.container.startup module<a class="headerlink" href="#module-whylogs_container.whylabs.container.startup" title="Permalink to this heading">#</a></h2>
Expand Down Expand Up @@ -1189,10 +1222,10 @@ <h3>}’<a class="headerlink" href="#id18" title="Permalink to this heading">#</
<li><a class="reference internal" href="#whylogs_container.whylabs.container.routes.log_json"><code class="docutils literal notranslate"><span class="pre">log_json()</span></code></a></li>
<li><a class="reference internal" href="#whylogs_container.whylabs.container.routes.log_pubsub"><code class="docutils literal notranslate"><span class="pre">log_pubsub()</span></code></a></li>
<li><a class="reference internal" href="#whylogs_container.whylabs.container.routes.log_pubsub_embeddings"><code class="docutils literal notranslate"><span class="pre">log_pubsub_embeddings()</span></code></a></li>
<li><a class="reference internal" href="#whylogs_container.whylabs.container.routes.openai_proxy"><code class="docutils literal notranslate"><span class="pre">openai_proxy()</span></code></a></li>
<li><a class="reference internal" href="#whylogs_container.whylabs.container.routes.publish_profiles"><code class="docutils literal notranslate"><span class="pre">publish_profiles()</span></code></a></li>
<li><a class="reference internal" href="#whylogs_container.whylabs.container.routes.shutdown"><code class="docutils literal notranslate"><span class="pre">shutdown()</span></code></a></li>
<li><a class="reference internal" href="#whylogs_container.whylabs.container.routes.status"><code class="docutils literal notranslate"><span class="pre">status()</span></code></a></li>
<li><a class="reference internal" href="#whylogs_container.whylabs.container.routes.validate_llm"><code class="docutils literal notranslate"><span class="pre">validate_llm()</span></code></a></li>
</ul>
</li>
<li><a class="reference internal" href="#module-whylogs_container.whylabs.container.startup">whylogs_container.whylabs.container.startup module</a><ul>
Expand Down
Loading

0 comments on commit a5f846e

Please sign in to comment.