Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[QUESTION] Correct example for bash to chat with RAG via curl? #2121

Open
mmeiste opened this issue Nov 11, 2024 · 2 comments
Open

[QUESTION] Correct example for bash to chat with RAG via curl? #2121

mmeiste opened this issue Nov 11, 2024 · 2 comments
Labels
question Further information is requested

Comments

@mmeiste
Copy link

mmeiste commented Nov 11, 2024

Question

Api doc provides following example:

api_name: /chat

curl -X POST http://localhost:8001/call/chat -s -H "Content-Type: application/json" -d '{
  "data": [
							"Hello!!",
							"RAG",
							"Hello!!"
]}' \
  | awk -F'"' '{ print $4}'  \
  | read EVENT_ID; curl -N http://localhost:8001/call/chat/$EVENT_ID

no result, but get an error in logs:

File "/home/worker/app/.venv/lib/python3.11/site-packages/gradio/blocks.py", line 1620, in validate_inputs
 raise ValueError(
ValueError: An event handler (_chat) didn't receive enough input values (needed: 4, got: 3).
@mmeiste mmeiste added the question Further information is requested label Nov 11, 2024
@psychopatz
Copy link

You can check the API usage format on the Swagger Endpoint, just put it on the postman then convert to Curl

@mmeiste
Copy link
Author

mmeiste commented Dec 3, 2024

My example is from the high level api, the swagger endpoint does not seem list "/call/chat" juts low level api?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants