Added exception catch to Ollama's output in case it can't decode message
This commit is contained in:
parent
ff927d6c77
commit
ed54b2846a
@ -19,10 +19,13 @@ overrides = {}
|
||||
def log_output(pipe):
|
||||
with open(os.path.join(data_dir, 'tmp.log'), 'a') as f:
|
||||
with pipe:
|
||||
for line in iter(pipe.readline, ''):
|
||||
print(line, end='')
|
||||
f.write(line)
|
||||
f.flush()
|
||||
try:
|
||||
for line in iter(pipe.readline, ''):
|
||||
print(line, end='')
|
||||
f.write(line)
|
||||
f.flush()
|
||||
except:
|
||||
pass
|
||||
|
||||
def start():
|
||||
if not os.path.isdir(os.path.join(cache_dir, 'tmp/ollama')):
|
||||
|
Loading…
x
Reference in New Issue
Block a user