mirror of
https://github.com/infiniflow/ragflow.git
synced 2025-12-08 20:42:30 +08:00
Refa: ollama keep alive issue. (#8216)
### What problem does this PR solve? #8122 ### Type of change - [x] Refactoring
This commit is contained in:
@ -506,7 +506,8 @@ class OllamaCV(Base):
|
||||
response = self.client.chat(
|
||||
model=self.model_name,
|
||||
messages=history,
|
||||
options=options
|
||||
options=options,
|
||||
keep_alive=-1
|
||||
)
|
||||
|
||||
ans = response["message"]["content"].strip()
|
||||
@ -536,7 +537,8 @@ class OllamaCV(Base):
|
||||
model=self.model_name,
|
||||
messages=history,
|
||||
stream=True,
|
||||
options=options
|
||||
options=options,
|
||||
keep_alive=-1
|
||||
)
|
||||
for resp in response:
|
||||
if resp["done"]:
|
||||
|
||||
Reference in New Issue
Block a user