Skip to content

Incomplete error handling when streaming response #69

@ebakkest

Description

@ebakkest

I'm using the library with LM Studio's OpenAI compatible REST interface.

If I (for instance) I send too many tokens to the model in the chat API (using TOpenAIChat) and request streaming, the model right away sends back http status 400 and "error..." text, however the library doesn't catch the error condition and just appears to succeed instantly, but produces empty text for the completion.

If I turn the TOpenAIChat streaming off, the error is correctly reported.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions