fix: øk timeout til 120s for embed og chat
Some checks are pending
Check Python Version Consistency / Check Python Version (push) Waiting to run
Some checks are pending
Check Python Version Consistency / Check Python Version (push) Waiting to run
This commit is contained in:
parent
41380e275c
commit
43c5644b13
|
|
@ -19,7 +19,7 @@ class OllamaBackend:
|
|||
|
||||
def embed(self, text: str) -> np.ndarray:
|
||||
r = requests.post(f"{self.base_url}/api/embeddings",
|
||||
json={"model": self.embed_model, "prompt": text}, timeout=30)
|
||||
json={"model": self.embed_model, "prompt": text}, timeout=120)
|
||||
r.raise_for_status()
|
||||
return np.array(r.json()["embedding"], dtype=np.float32)
|
||||
|
||||
|
|
@ -55,7 +55,7 @@ class OllamaBackend:
|
|||
],
|
||||
"stream": False,
|
||||
},
|
||||
timeout=60,
|
||||
timeout=120,
|
||||
)
|
||||
r.raise_for_status()
|
||||
return r.json()["message"]["content"]
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user