gradio-app / gradio

Build and share delightful machine learning apps, all in Python. 🌟 Star to support our work!
http://www.gradio.app
Apache License 2.0
30.56k stars 2.27k forks source link

The `/call/{api_name}` route does not handle state correctly #8452

Open abidlabs opened 3 weeks ago

abidlabs commented 3 weeks ago

Describe the bug

Analogous to https://github.com/gradio-app/gradio/issues/5120, we need to handle state correctly when making programmatic requests from curl. Currently, this is not handled

Have you searched existing issues? 🔎

Reproduction

curl -X POST https://gradio-chatinterface-random-response.hf.space/call/chat -H "Content-Type: application/json" -d '{
  "data": ["Really?"],
  "session_hash": "randomsequence1234"
}'

Screenshot

No response

Logs

No response

System Info

gradio==4.32.2

Severity

Blocking usage of gradio