mirror of
https://github.com/nomic-ai/gpt4all.git
synced 2025-06-24 14:32:03 +00:00
Add the docs.
This commit is contained in:
parent
6656f0f41e
commit
0c0a4f2c22
@ -109,5 +109,22 @@ with model.chat_session():
|
||||
print(model.current_chat_session)
|
||||
```
|
||||
|
||||
### Generating embeddings
|
||||
GPT4All includes a super simple means of generating embeddings for your text documents. The embedding model will automatically be downloaded if not installed.
|
||||
|
||||
=== "Embed4All Example"
|
||||
``` py
|
||||
from gpt4all import GPT4All, Embed4All
|
||||
text = 'The quick brown fox jumps over the lazy dog'
|
||||
embedder = Embed4All()
|
||||
output = embedder.embed(text)
|
||||
print(output)
|
||||
```
|
||||
=== "Output"
|
||||
```
|
||||
[0.034696947783231735, -0.07192722707986832, 0.06923297047615051, ...]
|
||||
```
|
||||
|
||||
### API documentation
|
||||
::: gpt4all.gpt4all.GPT4All
|
||||
::: gpt4all.gpt4all.Embed4All
|
||||
|
Loading…
Reference in New Issue
Block a user