Skip to content
This repository was archived by the owner on May 10, 2024. It is now read-only.

Commit 5ddc1b2

Browse files
authored
Merge pull request #153 from JoanFM/docs-add-jina-embedding-func
Docs add JinaEmbedding function
2 parents 82763e5 + 293ccbc commit 5ddc1b2

File tree

2 files changed

+38
-1
lines changed

2 files changed

+38
-1
lines changed

docs/embeddings/jinaai.md

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
---
2+
---
3+
4+
# Jina AI
5+
6+
import Tabs from '@theme/Tabs';
7+
import TabItem from '@theme/TabItem';
8+
9+
<div class="select-language">Select a language</div>
10+
11+
<Tabs queryString groupId="lang">
12+
<TabItem value="py" label="Python"></TabItem>
13+
<TabItem value="js" label="JavaScript"></TabItem>
14+
</Tabs>
15+
16+
Chroma provides a convenient wrapper around JinaAI's embedding API. This embedding function runs remotely on JinaAI's servers, and requires an API key. You can get an API key by signing up for an account at [JinaAI](https://jina.ai/embeddings/).
17+
18+
<Tabs queryString groupId="lang" className="hideTabSwitcher">
19+
<TabItem value="py" label="Python">
20+
21+
This embedding function relies on the `requests` python package, which you can install with `pip install requests`.
22+
23+
```python
24+
jinaai_ef = embedding_functions.JinaEmbeddingFunction(
25+
api_key="YOUR_API_KEY",
26+
model_name="jina-embeddings-v2-base-en"
27+
)
28+
jinaai_ef(input=["This is my first text to embed", "This is my second document"])
29+
```
30+
31+
You can pass in an optional `model_name` argument, which lets you choose which Jina model to use. By default, Chroma uses `jina-embedding-v2-base-en`.
32+
33+
</TabItem>
34+
<TabItem value="js" label="JavaScript">
35+
</TabItem>
36+
</Tabs>

sidebars.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,8 @@ const sidebars = {
8585
'embeddings/cohere',
8686
'embeddings/hugging-face',
8787
'embeddings/google-palm',
88-
'embeddings/instructor'
88+
'embeddings/instructor',
89+
'embeddings/jinaai'
8990
],
9091
},
9192
],

0 commit comments

Comments
 (0)