From 59c0542fa1384b9fc54a9f06b51e36ee39b11352 Mon Sep 17 00:00:00 2001 From: Michael Yang Date: Wed, 8 May 2024 12:53:35 -0700 Subject: [PATCH] accept license, template, system as files --- ollama/_client.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ollama/_client.py b/ollama/_client.py index 88fca50..ba07311 100644 --- a/ollama/_client.py +++ b/ollama/_client.py @@ -286,7 +286,7 @@ class Client(BaseClient): out = io.StringIO() for line in io.StringIO(modelfile): command, _, args = line.partition(' ') - if command.upper() not in ['FROM', 'ADAPTER']: + if command.upper() not in ['FROM', 'ADAPTER', 'LICENSE', 'TEMPLATE', 'SYSTEM']: print(line, end='', file=out) continue @@ -568,7 +568,7 @@ class AsyncClient(BaseClient): out = io.StringIO() for line in io.StringIO(modelfile): command, _, args = line.partition(' ') - if command.upper() not in ['FROM', 'ADAPTER']: + if command.upper() not in ['FROM', 'ADAPTER', 'LICENSE', 'TEMPLATE', 'SYSTEM']: print(line, end='', file=out) continue