FlowiseAI / Flowise

Drag & drop UI to build your customized LLM flow
https://flowiseai.com
Apache License 2.0
29.42k stars 15.22k forks source link

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

Closed wangchao1980 closed 9 months ago

wangchao1980 commented 10 months ago

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 commented 10 months ago

image use_mmap value is blank set its value true OK

HenryHengZJ commented 10 months ago

image use_mmap value is blank set its value true OK

does this fixed the issue?

malipetek commented 9 months ago

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

BennisonDevadoss commented 2 months ago

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
tchr-dev commented 1 month ago

image use_mmap value is blank set its value true OK

does this fixed the issue?

Wonderful! It fixes issue. What does it mean?