fix: ollama text embedding 500 error (#8131)

This commit is contained in:
crazywoola 2024-09-09 15:27:49 +08:00 committed by GitHub
parent 50d92f0fd4
commit a27d4d58ec
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -89,7 +89,8 @@ class OllamaEmbeddingModel(TextEmbeddingModel):
endpoint_url,
headers=headers,
data=json.dumps(payload),
timeout=(10, 300)
timeout=(10, 300),
options={"use_mmap": "true"}
)
response.raise_for_status() # Raise an exception for HTTP errors