defenseunicorns / leapfrogai

Production-ready Generative AI for local, cloud native, airgap, and edge deployments.
https://leapfrog.ai
Apache License 2.0
251 stars 28 forks source link

feat(api): context cancellation #277

Open gphorvath opened 6 months ago

gphorvath commented 6 months ago

Context Cancellation (API)

Type: Feature

Description: When cancelling the generation on the UI, it doesn't cancel the generation on the backend and the requests continue to propagate, resulting in a state mismatch that can cause issues.

User Story: As a developer building a UI on top of the API, I want the ability to cancel the context between the API and LLM backends, so that I can efficiently manage resources and provide a responsive user experience by allowing users to cancel ongoing generation and retry requests or stop inference when needed.

Acceptance Criteria:

andrewrisse commented 2 weeks ago

putting this here for reference much later: once this is ready, this open issue may become more of a concern for the frontend: https://github.com/vercel/ai/issues/1743