Skip to content

Commit

Permalink
Built site for gh-pages
Browse files Browse the repository at this point in the history
  • Loading branch information
Quarto GHA Workflow Runner committed Dec 11, 2024
1 parent 3d0dc26 commit b0f4c2e
Show file tree
Hide file tree
Showing 11 changed files with 484 additions and 618 deletions.
2 changes: 1 addition & 1 deletion .nojekyll
Original file line number Diff line number Diff line change
@@ -1 +1 @@
9d4b3071
c0e351eb
15 changes: 8 additions & 7 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -338,10 +338,10 @@ <h3 class="anchored" data-anchor-id="structured-data">Structured data</h3>
<h3 class="anchored" data-anchor-id="export-chat">Export chat</h3>
<p>Easily get a full markdown or HTML export of a conversation:</p>
<div class="sourceCode" id="cb16"><pre class="sourceCode python code-with-copy"><code class="sourceCode python"><span id="cb16-1"><a href="#cb16-1" aria-hidden="true" tabindex="-1"></a>chat.export(<span class="st">"index.html"</span>, title<span class="op">=</span><span class="st">"Python Q&amp;A"</span>)</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
<p>If the export doesn’t have all the information you need, you can also access the full conversation history via the <code>.turns()</code> method:</p>
<div class="sourceCode" id="cb17"><pre class="sourceCode python code-with-copy"><code class="sourceCode python"><span id="cb17-1"><a href="#cb17-1" aria-hidden="true" tabindex="-1"></a>chat.turns()</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
<p>If the export doesn’t have all the information you need, you can also access the full conversation history via the <code>.get_turns()</code> method:</p>
<div class="sourceCode" id="cb17"><pre class="sourceCode python code-with-copy"><code class="sourceCode python"><span id="cb17-1"><a href="#cb17-1" aria-hidden="true" tabindex="-1"></a>chat.get_turns()</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
<p>And, if the conversation is too long, you can specify which turns to include:</p>
<div class="sourceCode" id="cb18"><pre class="sourceCode python code-with-copy"><code class="sourceCode python"><span id="cb18-1"><a href="#cb18-1" aria-hidden="true" tabindex="-1"></a>chat.export(<span class="st">"index.html"</span>, turns<span class="op">=</span>chat.turns()[<span class="op">-</span><span class="dv">5</span>:])</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
<div class="sourceCode" id="cb18"><pre class="sourceCode python code-with-copy"><code class="sourceCode python"><span id="cb18-1"><a href="#cb18-1" aria-hidden="true" tabindex="-1"></a>chat.export(<span class="st">"index.html"</span>, turns<span class="op">=</span>chat.get_turns()[<span class="op">-</span><span class="dv">5</span>:])</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
</section>
<section id="async" class="level3">
<h3 class="anchored" data-anchor-id="async">Async</h3>
Expand All @@ -365,13 +365,14 @@ <h3 class="anchored" data-anchor-id="troubleshooting">Troubleshooting</h3>
<p>Sometimes things like token limits, tool errors, or other issues can cause problems that are hard to diagnose. In these cases, the <code>echo="all"</code> option is helpful for getting more information about what’s going on under the hood.</p>
<div class="sourceCode" id="cb20"><pre class="sourceCode python code-with-copy"><code class="sourceCode python"><span id="cb20-1"><a href="#cb20-1" aria-hidden="true" tabindex="-1"></a>chat.chat(<span class="st">"What is the capital of France?"</span>, echo<span class="op">=</span><span class="st">"all"</span>)</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
<p>This shows important information like tool call results, finish reasons, and more.</p>
<p>If the problem isn’t self-evident, you can also reach into the <code>.last_turn()</code>, which contains the full response object, with full details about the completion.</p>
<p>If the problem isn’t self-evident, you can also reach into the <code>.get_last_turn()</code>, which contains the full response object, with full details about the completion.</p>
<div style="display:flex;justify-content:center;">
<p><img width="500" alt="Turn completion details with typing support" src="https://github.com/user-attachments/assets/eaea338d-e44a-4e23-84a7-2e998d8af3ba" class="rounded"></p>
</div>
<p>Also, since <code>chatlas</code> builds on top of packages like <code>anthropic</code> and <code>openai</code>, you can also enable their debug logging to get even more detailed information about what’s going on under the hood:</p>
<pre class="shell"><code>$ export ANTHROPIC_LOG=info
$ export OPENAI_LOG=info</code></pre>
<p>For monitoring issues in a production (or otherwise non-interactive) environment, you may want to enabling logging. Also, since <code>chatlas</code> builds on top of packages like <code>anthropic</code> and <code>openai</code>, you can also enable their debug logging to get lower-level information, like HTTP requests and response codes.</p>
<pre class="shell"><code>$ export CHATLAS_LOG=info
$ export OPENAI_LOG=info
$ export ANTHROPIC_LOG=info</code></pre>
</section>
<section id="next-steps" class="level3">
<h3 class="anchored" data-anchor-id="next-steps">Next steps</h3>
Expand Down
8 changes: 4 additions & 4 deletions objects.txt
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,10 @@ chatlas.Chat.extract_data py:function 1 reference/Chat.html#chatlas.Chat.extract
chatlas._chat.Chat.extract_data py:function 1 reference/Chat.html#chatlas.Chat.extract_data chatlas.Chat.extract_data
chatlas.Chat.extract_data_async py:function 1 reference/Chat.html#chatlas.Chat.extract_data_async -
chatlas._chat.Chat.extract_data_async py:function 1 reference/Chat.html#chatlas.Chat.extract_data_async chatlas.Chat.extract_data_async
chatlas.Chat.last_turn py:function 1 reference/Chat.html#chatlas.Chat.last_turn -
chatlas._chat.Chat.last_turn py:function 1 reference/Chat.html#chatlas.Chat.last_turn chatlas.Chat.last_turn
chatlas.Chat.get_last_turn py:function 1 reference/Chat.html#chatlas.Chat.get_last_turn -
chatlas._chat.Chat.get_last_turn py:function 1 reference/Chat.html#chatlas.Chat.get_last_turn chatlas.Chat.get_last_turn
chatlas.Chat.get_turns py:function 1 reference/Chat.html#chatlas.Chat.get_turns -
chatlas._chat.Chat.get_turns py:function 1 reference/Chat.html#chatlas.Chat.get_turns chatlas.Chat.get_turns
chatlas.Chat.register_tool py:function 1 reference/Chat.html#chatlas.Chat.register_tool -
chatlas._chat.Chat.register_tool py:function 1 reference/Chat.html#chatlas.Chat.register_tool chatlas.Chat.register_tool
chatlas.Chat.set_echo_options py:function 1 reference/Chat.html#chatlas.Chat.set_echo_options -
Expand All @@ -50,8 +52,6 @@ chatlas.Chat.system_prompt py:attribute 1 reference/Chat.html#chatlas.Chat.syste
chatlas._chat.Chat.system_prompt py:attribute 1 reference/Chat.html#chatlas.Chat.system_prompt chatlas.Chat.system_prompt
chatlas.Chat.tokens py:function 1 reference/Chat.html#chatlas.Chat.tokens -
chatlas._chat.Chat.tokens py:function 1 reference/Chat.html#chatlas.Chat.tokens chatlas.Chat.tokens
chatlas.Chat.turns py:function 1 reference/Chat.html#chatlas.Chat.turns -
chatlas._chat.Chat.turns py:function 1 reference/Chat.html#chatlas.Chat.turns chatlas.Chat.turns
chatlas.Chat py:class 1 reference/Chat.html#chatlas.Chat -
chatlas._chat.Chat py:class 1 reference/Chat.html#chatlas.Chat chatlas.Chat
chatlas.content_image_file py:function 1 reference/content_image_file.html#chatlas.content_image_file -
Expand Down
Loading

0 comments on commit b0f4c2e

Please sign in to comment.