reorganize client installation sections into language model code sections
This commit is contained in:
parent
8fb4cfb807
commit
b340c80868
1 changed files with 15 additions and 19 deletions
34
index.html
34
index.html
|
|
@ -59,17 +59,13 @@
|
|||
<ul>
|
||||
<li><a href="#introduction" class="active">Introducing uncloseai & Hermes & TTS Speech Endpoints</a></li>
|
||||
<li><a href="#client-side">Try the uncloseai. Button</a></li>
|
||||
<li><a href="#openai-client">Installing the OpenAI Client</a>
|
||||
<li><a href="#hermes-model">Using the Language Models</a>
|
||||
<ul>
|
||||
<li><a href="#python-client">Python Client Installation</a></li>
|
||||
<li><a href="#nodejs-client">Node.js Client Installation</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a href="#hermes-model">Using the Hermes AI Model</a>
|
||||
<ul>
|
||||
<li><a href="#python-hermes">Python Examples</a></li>
|
||||
<li><a href="#python-non-streaming">Python Non-Streaming</a></li>
|
||||
<li><a href="#python-streaming">Python Streaming</a></li>
|
||||
<li><a href="#nodejs-client">Node.js Client Installation</a></li>
|
||||
<li><a href="#nodejs-examples">Node.js Examples</a></li>
|
||||
<li><a href="#nodejs-non-streaming">Node.js Non-Streaming</a></li>
|
||||
<li><a href="#nodejs-streaming">Node.js Streaming</a></li>
|
||||
|
|
@ -127,23 +123,12 @@
|
|||
<p>Add this script tag to your HTML to get the same floating AI button on your site:</p>
|
||||
<pre><code class="html"><script src="https://uncloseai.com/uncloseai.js" type="module"></script></code></pre>
|
||||
|
||||
<h2 id="openai-client">Installing the OpenAI Client</h2>
|
||||
<h2 id="hermes-model">Using the Language Models</h2>
|
||||
|
||||
<h3 id="python-client">Python Client Installation</h3>
|
||||
<p>To install the OpenAI package for Python, use <code>pip</code>:</p>
|
||||
<pre><code>pip install openai</code></pre>
|
||||
|
||||
<h3 id="nodejs-client">Node.js Client Installation</h3>
|
||||
<p>To install the OpenAI package for Node.js, you can use <code>npm</code> in your <code>package.json</code>:</p>
|
||||
<pre><code>{
|
||||
"dependencies": {
|
||||
"openai": "^v4.67.3" // Use the latest version
|
||||
}
|
||||
}
|
||||
</code></pre>
|
||||
<p>Run the following command to install it:</p>
|
||||
<pre><code>npm install</code></pre>
|
||||
|
||||
<h2 id="hermes-model">Using the Hermes AI Model</h2>
|
||||
<h3 id="python-hermes">Python Examples</h3>
|
||||
<h3 id="python-non-streaming">Python Non-Streaming</h3>
|
||||
|
||||
|
|
@ -239,6 +224,17 @@ for chunk in response:
|
|||
print(chunk.choices[0].delta.content, end="")
|
||||
</code></pre>
|
||||
|
||||
<h3 id="nodejs-client">Node.js Client Installation</h3>
|
||||
<p>To install the OpenAI package for Node.js, you can use <code>npm</code> in your <code>package.json</code>:</p>
|
||||
<pre><code>{
|
||||
"dependencies": {
|
||||
"openai": "^v4.67.3" // Use the latest version
|
||||
}
|
||||
}
|
||||
</code></pre>
|
||||
<p>Run the following command to install it:</p>
|
||||
<pre><code>npm install</code></pre>
|
||||
|
||||
<h3 id="nodejs-examples">Node.js Examples</h3>
|
||||
<h3 id="nodejs-non-streaming">Node.js Non-Streaming</h3>
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue