mirror of
https://github.com/nomic-ai/gpt4all
synced 2024-11-02 09:40:42 +00:00
Update README.md to python bindings
Signed-off-by: Andriy Mulyar <andriy.mulyar@gmail.com>
This commit is contained in:
parent
13f0f546ed
commit
aced5e6615
@ -41,13 +41,10 @@ pip3 install -e .
|
|||||||
Test it out! In a Python script or console:
|
Test it out! In a Python script or console:
|
||||||
|
|
||||||
```python
|
```python
|
||||||
|
|
||||||
from gpt4all import GPT4All
|
from gpt4all import GPT4All
|
||||||
|
model = GPT4All("orca-mini-3b.ggmlv3.q4_0.bin")
|
||||||
gptj = GPT4All("ggml-gpt4all-j-v1.3-groovy")
|
output = model.generate("The capital of France is ", max_tokens=3)
|
||||||
messages = [{"role": "user", "content": "Name 3 colors"}]
|
print(output)
|
||||||
gptj.chat_completion(messages)
|
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
||||||
## Troubleshooting a Local Build
|
## Troubleshooting a Local Build
|
||||||
|
Loading…
Reference in New Issue
Block a user