Skip to content

Last message when streaming completion should not be empty #1038

Open

Description

@abetlen

When streaming completions the last message is sometimes empty to ensure that the last message contains a finish_reason. This is correct according to the OpenAI schema but is not expected by all clients and can cause bugs (noticed this in openplayground).

Activity

  1. BlueBlazin commented on Dec 25, 2023

    @BlueBlazin

    So what's the alternative?

  2. thiner commented on Dec 26, 2023

    @thiner

    I encountered this problem with the latest docker image for inferencing. When streeaming via /chat/completions API, the stream will be interrupted. The output obviously not complete yet. Call the API with the same input will not encounter this error.

  3. added a commit that references this issue on Jan 5, 2024
    e1cd61e
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions