Skip to content

Streaming with Mistral AI reasoning models #801

@pietervs-prive

Description

@pietervs-prive

Hi

A while ago you added support for Mistral AI's reasoning models such as 'magistral-small-latest' in the Text handler by introducing an appropriate trait to correctly handle the text and thinking parts of the response.

When I tried to implement the Stream handler I noticed this doesn't have this implemented yet. So when a thinking or text event type is streamed, the Stream handler stops with an array to string conversion error at vendor/prism-php/prism/src/Providers/Mistral/Handlers/Stream.php:144

It would be great if you could fix this similar to the Text handler.

Thanks!

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