소스 검색

fix:ollama text embedding 500 error (#8252)

HowardChan 7 달 전
부모
커밋
53f37a6704
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      api/core/model_runtime/model_providers/ollama/text_embedding/text_embedding.py

+ 1 - 1
api/core/model_runtime/model_providers/ollama/text_embedding/text_embedding.py

@@ -77,7 +77,7 @@ class OllamaEmbeddingModel(TextEmbeddingModel):
                 inputs.append(text)
 
         # Prepare the payload for the request
-        payload = {"input": inputs, "model": model, "options": {"use_mmap": "true"}}
+        payload = {"input": inputs, "model": model, "options": {"use_mmap": True}}
 
         # Make the request to the Ollama API
         response = requests.post(endpoint_url, headers=headers, data=json.dumps(payload), timeout=(10, 300))