mirror of
https://github.com/ollama/ollama-python.git
synced 2026-01-13 21:57:16 +08:00
Fix create examples (#421)
This commit is contained in:
parent
eefe5c9666
commit
7a6ab044c6
@ -129,12 +129,7 @@ ollama.show('llama3.2')
|
||||
### Create
|
||||
|
||||
```python
|
||||
modelfile='''
|
||||
FROM llama3.2
|
||||
SYSTEM You are mario from super mario bros.
|
||||
'''
|
||||
|
||||
ollama.create(model='example', modelfile=modelfile)
|
||||
ollama.create(model='example', from_='llama3.2', system="You are Mario from Super Mario Bros.")
|
||||
```
|
||||
|
||||
### Copy
|
||||
|
||||
@ -1,5 +1,10 @@
|
||||
from ollama import Client
|
||||
|
||||
client = Client()
|
||||
response = client.create(model='my-assistant', from_='llama3.2', stream=False)
|
||||
response = client.create(
|
||||
model='my-assistant',
|
||||
from_='llama3.2',
|
||||
system="You are mario from Super Mario Bros.",
|
||||
stream=False
|
||||
)
|
||||
print(response.status)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user