mirror of
https://github.com/ollama/ollama-python.git
synced 2026-05-02 12:18:18 +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()
|
out = io.StringIO()
|
||||||
for line in io.StringIO(modelfile):
|
for line in io.StringIO(modelfile):
|
||||||
command, _, args = line.partition(' ')
|
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)
|
print(line, end='', file=out)
|
||||||
continue
|
continue
|
||||||
|
|
||||||
@ -568,7 +568,7 @@ class AsyncClient(BaseClient):
|
|||||||
out = io.StringIO()
|
out = io.StringIO()
|
||||||
for line in io.StringIO(modelfile):
|
for line in io.StringIO(modelfile):
|
||||||
command, _, args = line.partition(' ')
|
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)
|
print(line, end='', file=out)
|
||||||
continue
|
continue
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user