From c6233dccd43da518f6bf06030b01683e746290e2 Mon Sep 17 00:00:00 2001 From: jmorganca Date: Wed, 15 Jan 2025 22:40:09 -0800 Subject: [PATCH] Fix create examples --- README.md | 7 +------ examples/create.py | 7 ++++++- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index b6ab33be..172d3252 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/examples/create.py b/examples/create.py index 5e59976e..dfc9094f 100755 --- a/examples/create.py +++ b/examples/create.py @@ -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)