Flowise icon indicating copy to clipboard operation
Flowise copied to clipboard

[BUG]Error: Request to Ollama server(/api/embeddings) failed: 400 Bad Request

Open wangchao1980 opened this issue 3 years ago • 5 comments

Describe the bug POST /api/v1/internal-prediction/ ollama_1 | [GIN] 2023/10/22 - 11:15:05 | 400 | 225.2µs | 172.19.0.1 | POST "/api/embeddings"

To Reproduce Steps to reproduce the behavior:

image

Expected behavior image

Setup docker, yarn start

Additional context lowise_1 | yarn run v1.22.19 flowise_1 | $ run-script-os flowise_1 | $ cd packages/server/bin && ./run start flowise_1 | 2023-10-22 19:13:01 [INFO]: Starting Flowise... flowise_1 | 2023-10-22 19:13:01 [INFO]: ⚡️ [server]: Flowise Server is listening at 3001 flowise_1 | 2023-10-22 19:13:01 [INFO]:  [server]: Data Source has been initialized! flowise_1 | 2023-10-22 19:13:30 [INFO]: ❌ DELETE /api/v1/chatmessage/6389078a-1472-4474-8705-d72ef1454eb7 flowise_1 | 2023-10-22 19:13:36 [INFO]: ⬆️ POST /api/v1/chatmessage/6389078a-1472-4474-8705-d72ef1454eb7 flowise_1 | 2023-10-22 19:13:36 [INFO]: ⬆️ POST /api/v1/internal-prediction/6389078a-1472-4474-8705-d72ef1454eb7 flowise_1 | 2023-10-22 19:15:05 [ERROR]: Request to Ollama server failed: 400 Bad Request flowise_1 | Error: Request to Ollama server failed: 400 Bad Request flowise_1 | at OllamaEmbeddings._request (/usr/src/packages/node_modules/langchain/dist/embeddings/ollama.cjs:94:19) flowise_1 | at process.processTicksAndRejections (node:internal/process/task_queues:95:5) flowise_1 | at async RetryOperation._fn (/usr/src/packages/node_modules/p-retry/index.js:50:12) flowise_1 | 2023-10-22 19:15:05 [ERROR]: [server]: Error: Error: Request to Ollama server failed: 400 Bad Request flowise_1 | Error: Error: Request to Ollama server failed: 400 Bad Request flowise_1 | at buildLangchain (/usr/src/packages/packages/server/dist/utils/index.js:235:19) flowise_1 | at process.processTicksAndRejections (node:internal/process/task_queues:95:5) flowise_1 | at async App.processPrediction (/usr/src/packages/packages/server/dist/index.js:816:40) flowise_1 | at async /usr/src/packages/packages/server/dist/index.js:609:13 flowise_1 | 2023-10-22 19:15:05 [INFO]: ⬆️ POST /api/v1/chatmessage/6389078a-1472-4474-8705-d72ef1454eb7 flowise_1 | 2023-10-22 20:46:55 [INFO]:  PUT /api/v1/chatflows/6389078a-1472-4474-8705-d72ef1454eb7 flowise_1 | 2023-10-22 20:47:55 [INFO]:  PUT /api/v1/chatflows/6389078a-1472-4474-8705-d72ef1454eb7

wangchao1980 avatar Oct 22 '23 13:10 wangchao1980

image use_mmap value is blank set its value true OK

wangchao1980 avatar Oct 23 '23 02:10 wangchao1980

image use_mmap value is blank set its value true OK

does this fixed the issue?

HenryHengZJ avatar Oct 25 '23 13:10 HenryHengZJ

I ran into the same issue and by default usemap is '' empty string, endpoint expects false

malipetek avatar Nov 27 '23 07:11 malipetek

Even if I enabled the use MMap on the ollama embedding, I am getting the same issue. How to rectify this issue

0|flowise  | 2024-07-07 23:34:05 [INFO]: ⬆️ POST /api/v1/vector/internal-upsert/cf2ac4eb-1964-4ece-892b-c18a8fd756d7
0|flowise  | 2024-07-07 23:34:06 [ERROR]: TypeError: fetch failed
0|flowise  | Error: TypeError: fetch failed
0|flowise  |     at Chroma_VectorStores.upsert (/home/ubuntu/yavar/Flowise/packages/components/dist/nodes/vectorstores/Chroma/Chroma.js:35:27)
0|flowise  |     at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
0|flowise  |     at async buildLangchain (/home/ubuntu/yavar/Flowise/packages/server/dist/utils/index.js:273:17)
0|flowise  |     at async App.upsertVector (/home/ubuntu/yavar/Flowise/packages/server/dist/index.js:1355:13)
0|flowise  |     at async /home/ubuntu/yavar/Flowise/packages/server/dist/index.js:1026:13
0|flowise  | 2024-07-07 23:34:06 [ERROR]: [server]: Error: Error: TypeError: fetch failed
0|flowise  | Error: Error: TypeError: fetch failed
0|flowise  |     at buildLangchain (/home/ubuntu/yavar/Flowise/packages/server/dist/utils/index.js:331:19)
0|flowise  |     at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
0|flowise  |     at async App.upsertVector (/home/ubuntu/yavar/Flowise/packages/server/dist/index.js:1355:13)
0|flowise  |     at async /home/ubuntu/yavar/Flowise/packages/server/dist/index.js:1026:13

BennisonDevadoss avatar Jul 07 '24 18:07 BennisonDevadoss

image use_mmap value is blank set its value true OK

does this fixed the issue?

Wonderful! It fixes issue. What does it mean?

tchr-dev avatar Jul 10 '24 11:07 tchr-dev