mirror of
https://github.com/infiniflow/ragflow.git
synced 2025-12-08 20:42:30 +08:00
Refa: remove ollama keep alive. (#7560)
### What problem does this PR solve? #7518 ### Type of change - [x] Refactoring
This commit is contained in:
@ -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"]:
|
||||
|
||||
Reference in New Issue
Block a user