accept license, template, system as files

This commit is contained in:
Michael Yang 2024-05-08 12:53:35 -07:00
parent e403d748a3
commit 59c0542fa1

View File

@ -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