Skip to content

Proper way for client to stop generate_stream #495

@axel7083

Description

@axel7083

Feature request

Since the /generate_stream provide Token streaming using Server-Sent Events (SSE), the client cannot tell the server to stop the streaming.

Motivation

Sometime, when requesting very large output, we can see from the start we need to stop. The client can close the connection, but I do not know from the current implementation, if this is the best way to handle it.

Your contribution

Maybe adding a unique ID, returned first by the /generate_stream, which could be use to call a new endpoint, (something like /stop_streaming, which could then send a final message with a stop creteria 'manual' or something like that.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions