rag-api-server icon indicating copy to clipboard operation
rag-api-server copied to clipboard

report error when upload chunks file

Open sunyitao opened this issue 1 year ago • 3 comments

request curl -X POST http://172.25.96.1:8080/v1/files -F "file=@paris_chunks.txt" error, but request curl -X POST http://172.25.96.1:8080/v1/embeddings is ok.

Request /v1/create/rag is the same.

[error:]

[2024-11-28 17:48:19.890] [info] rag_api_server in src/main.rs:497: endpoint: /v1/files
[2024-11-28 17:48:19.894] [info] rag_api_server::backend::ggml in src/backend/ggml.rs:815: Handling the coming files request
[2024-11-28 17:48:20.005] [error] [WasiLogging] Cannot log into file: Failed opening file multipart_2021::server for writing: invalid argument
[2024-11-28 17:48:20.010] [error] execution failed: host function failed, Code: 0x40e
[2024-11-28 17:48:20.012] [error]     When executing function name: "_start"

[env:] in windows

  • wasmedge.exe version 0.14.1
  • (plugin "wasi_logging") version 0.1.0.0
  • wasmedgePluginWasiNN.dll (plugin "wasi_nn") version 0.10.1.0
  • LlamaEdge-RAG API Server 0.11.0

[run cmd:]

wasmedge --dir .:. --nn-preload default:GGML:AUTO:Qwen2.5-7B-Instruct-Q5_K_M.gguf  \
--nn-preload embedding:GGML:AUTO:all-MiniLM-L6-v2-ggml-model-f16.gguf \
0.14.15\rag-api-server.wasm   \
--model-name Qwen2.5-7B-Instruct,all-MiniLM-L6-v2-ggml-model-f16  \
--ctx-size 4096,384  --prompt-template chatml,embedding    \
--rag-prompt "Use the following pieces of context to answer the user's question.\nIf you don't know the answer, just say that you don't know, don't try to make up an answer.\n----------------\n"  \
--log-prompts   \
--log-stat --qdrant-url http://172.25.101.96:6333

sunyitao avatar Nov 28 '24 09:11 sunyitao

According to the error [2024-11-28 17:48:20.005] [error] [WasiLogging] Cannot log into file: Failed opening file multipart_2021::server for writing: invalid argument, the curl request is not correct. The correct format should be as below. Please try again.

curl --location 'http://172.25.96.1:8080/v1/files' \
--header 'Content-Type: multipart/form-data' \
--form 'file=@"paris_chunks.txt"'

apepkuss avatar Nov 29 '24 09:11 apepkuss

problem isn't solved, the same error will occur.

sunyitao avatar Dec 02 '24 01:12 sunyitao

The same procedure works without issue in WSL.

sunyitao avatar Dec 13 '24 08:12 sunyitao