Skip to content

Commit

Permalink
update the embeddings
Browse files Browse the repository at this point in the history
  • Loading branch information
hahuyhoang411 committed Nov 27, 2023
1 parent e6c5290 commit ce8b162
Showing 1 changed file with 11 additions and 19 deletions.
30 changes: 11 additions & 19 deletions docs/docs/features/embed.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ title: Embedding
description: Inference engine for embedding, the same as OpenAI's
---

Embeddings are lists of numbers (floats). To find how similar two embeddings are, we measure the [distance](https://en.wikipedia.org/wiki/Cosine_similarity) between them. Shorter distances mean they're more similar; longer distances mean less similarity.
Embeddings are lists of numbers (floats). To find how similar two embeddings are, we measure the [distance](https://en.wikipedia.org/wiki/Cosine_similarity) between them.

## Activating Embedding Feature

Expand Down Expand Up @@ -50,18 +50,14 @@ The example response used the output from model [llama2 Chat 7B Q5 (GGUF)](https

```js title="Nitro"
{
"data": [
{
"embedding": [
-0.9874749,
0.2965493,
...
-0.253227
],
"index": 0,
"object": "embedding"
}
]
"embedding": [
-0.9874749,
0.2965493,
...
-0.253227
],
"index": 0,
"object": "embedding"
}
```

Expand All @@ -74,18 +70,14 @@ The example response used the output from model [llama2 Chat 7B Q5 (GGUF)](https
"embedding": [
0.0023064255,
-0.009327292,
.... (1536 floats total for ada-002)
....
-0.0028842222,
],
"index": 0,
"object": "embedding"
}




```

</div>

The embedding feature in Nitro demonstrates a high level of compatibility with OpenAI, simplifying the transition between using OpenAI and local AI models. For more detailed information and advanced use cases, refer to the comprehensive [API Reference](https://nitro.jan.ai/api-reference).
The embedding feature in Nitro demonstrates a high level of compatibility with OpenAI. For more detailed information and advanced use cases, refer to the comprehensive [API Reference](https://nitro.jan.ai/api-reference).

0 comments on commit ce8b162

Please sign in to comment.