From 7a6ab044c610ba7475180d3d1dd451e57661757a Mon Sep 17 00:00:00 2001 From: Jeffrey Morgan Date: Wed, 15 Jan 2025 22:43:44 -0800 Subject: [PATCH] Fix create examples (#421) --- README.md | 7 +------ examples/create.py | 7 ++++++- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index b6ab33b..172d325 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 5e59976..dfc9094 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)