Refa: remove ollama keep alive. (#7560)

### What problem does this PR solve?

#7518

### Type of change

- [x] Refactoring
This commit is contained in:
Kevin Hu
2025-05-09 17:51:49 +08:00
committed by GitHub
parent 2ccec93d71
commit 5b626870d0
2 changed files with 4 additions and 6 deletions

View File

@ -500,8 +500,7 @@ class OllamaCV(Base):
response = self.client.chat(
model=self.model_name,
messages=history,
options=options,
keep_alive=-1
options=options
)
ans = response["message"]["content"].strip()
@ -531,8 +530,7 @@ class OllamaCV(Base):
model=self.model_name,
messages=history,
stream=True,
options=options,
keep_alive=-1
options=options
)
for resp in response:
if resp["done"]: