Skip to content
This repository was archived by the owner on Jul 4, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions docs/docs/features/chat.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ The Chat Completion feature in Nitro provides a flexible way to interact with an

To send a single query to your chosen LLM, follow these steps:

<div style={{ width: '50%', float: 'left', clear: 'left' }}>
<div class="code-snippet-left">

```bash title="Nitro"
curl http://localhost:3928/v1/chat/completions \
Expand All @@ -27,7 +27,7 @@ curl http://localhost:3928/v1/chat/completions \

</div>

<div style={{ width: '50%', float: 'right', clear: 'right' }}>
<div class="code-snippet-right">

```bash title="OpenAI"
curl https://api.openai.com/v1/chat/completions \
Expand All @@ -52,7 +52,7 @@ This command sends a request to your local LLM, querying about the winner of the

For ongoing conversations or multiple queries, the dialog request feature is ideal. Here’s how to structure a multi-turn conversation:

<div style={{ width: '50%', float: 'left', clear: 'left' }}>
<div class="code-snippet-left">

```bash title="Nitro"
curl http://localhost:3928/v1/chat/completions \
Expand Down Expand Up @@ -82,7 +82,7 @@ curl http://localhost:3928/v1/chat/completions \

</div>

<div style={{ width: '50%', float: 'right', clear: 'right' }}>
<div class="code-snippet-right">

```bash title="OpenAI"
curl https://api.openai.com/v1/chat/completions \
Expand Down Expand Up @@ -116,7 +116,7 @@ curl https://api.openai.com/v1/chat/completions \

Below are examples of responses from both the Nitro server and OpenAI:

<div style={{ width: '50%', float: 'left', clear: 'left' }}>
<div class="code-snippet-left">

```js title="Nitro"
{
Expand Down Expand Up @@ -145,7 +145,7 @@ Below are examples of responses from both the Nitro server and OpenAI:

</div>

<div style={{ width: '50%', float: 'right', clear: 'right' }}>
<div class="code-snippet-right">

```js title="OpenAI"
{
Expand Down
8 changes: 4 additions & 4 deletions docs/docs/features/embed.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ To utilize the embedding feature, include the JSON parameter `"embedding": true`

Here’s an example showing how to get the embedding result from the model:

<div style={{ width: '50%', float: 'left', clear: 'left' }}>
<div class="code-snippet-left">

```bash title="Nitro" {1}
curl http://localhost:3928/v1/embeddings \
Expand All @@ -28,7 +28,7 @@ curl http://localhost:3928/v1/embeddings \
```

</div>
<div style={{ width: '50%', float: 'right', clear: 'right' }}>
<div class="code-snippet-right">

```bash title="OpenAI request" {1}
curl https://api.openai.com/v1/embeddings \
Expand All @@ -47,7 +47,7 @@ curl https://api.openai.com/v1/embeddings \

The example response used the output from model [llama2 Chat 7B Q5 (GGUF)](https://huggingface.co/TheBloke/Llama-2-7B-Chat-GGUF/tree/main) loaded to Nitro server.

<div style={{ width: '50%', float: 'left', clear: 'left' }}>
<div class="code-snippet-left">

```js title="Nitro"
{
Expand All @@ -68,7 +68,7 @@ The example response used the output from model [llama2 Chat 7B Q5 (GGUF)](https

</div>

<div style={{ width: '50%', float: 'right', clear: 'right' }}>
<div class="code-snippet-right">

```js title="OpenAI"
{
Expand Down
4 changes: 2 additions & 2 deletions docs/docs/new/about.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ One of the significant advantages of using Nitro is its compatibility with OpenA

For instance, compare the Nitro inference call:

<div style={{ width: '50%', float: 'left', clear: 'left' }}>
<div class="code-snippet-left">

```bash title="Nitro chat completion"
curl http://localhost:3928/v1/chat/completions \
Expand All @@ -44,7 +44,7 @@ curl http://localhost:3928/v1/chat/completions \

</div>

<div style={{ width: '50%', float: 'right', clear: 'right' }}>
<div class="code-snippet-right">

```bash title="OpenAI API chat completion"
curl https://api.openai.com/v1/chat/completions \
Expand Down
8 changes: 8 additions & 0 deletions docs/src/styles/components/base.scss
Original file line number Diff line number Diff line change
Expand Up @@ -77,3 +77,11 @@
}
}
}

.code-snippet-left {
@apply w-full lg:w-1/2 float-left;
}

.code-snippet-right {
@apply w-full lg:w-1/2 float-right;
}
2 changes: 1 addition & 1 deletion docs/src/styles/tweaks/sidebar.scss
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
}

[class*="docItemCol_"] {
@apply px-8;
@apply lg:px-8;
}

// * Including custom sidebar table of content
Expand Down