Skip to content

Commit

Permalink
Fix create examples (#421)
Browse files Browse the repository at this point in the history
  • Loading branch information
jmorganca authored Jan 16, 2025
1 parent eefe5c9 commit 7a6ab04
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
7 changes: 1 addition & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
7 changes: 6 additions & 1 deletion examples/create.py
Original file line number Diff line number Diff line change
@@ -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)

0 comments on commit 7a6ab04

Please sign in to comment.