Sfoglia il codice sorgente

fix:ollama text embedding 500 error (#8252)

tags/0.8.1
HowardChan 1 anno fa
parent
commit
53f37a6704
Nessun account collegato all'indirizzo email del committer

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

inputs.append(text) inputs.append(text)


# Prepare the payload for the request # 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 # Make the request to the Ollama API
response = requests.post(endpoint_url, headers=headers, data=json.dumps(payload), timeout=(10, 300)) response = requests.post(endpoint_url, headers=headers, data=json.dumps(payload), timeout=(10, 300))

Loading…
Annulla
Salva