mirror of
https://github.com/ollama/ollama-python.git
synced 2026-01-13 21:57:16 +08:00
accept license, template, system as files
This commit is contained in:
parent
e403d748a3
commit
59c0542fa1
@ -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
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user