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 @@ def _parse_modelfile(self, modelfile: str, base: Optional[Path] = None) -> str: 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 @@ async def _parse_modelfile(self, modelfile: str, base: Optional[Path] = None) -> 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