From 0c0a4f2c22768c64e44f73eb9d5c895c1cc818c3 Mon Sep 17 00:00:00 2001 From: Adam Treat Date: Fri, 14 Jul 2023 10:48:18 -0400 Subject: [PATCH] Add the docs. --- gpt4all-bindings/python/docs/gpt4all_python.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/gpt4all-bindings/python/docs/gpt4all_python.md b/gpt4all-bindings/python/docs/gpt4all_python.md index 73f3402b..c95f6b0d 100644 --- a/gpt4all-bindings/python/docs/gpt4all_python.md +++ b/gpt4all-bindings/python/docs/gpt4all_python.md @@ -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