Skip to content

Handle responses with no choices in CreateResponse #587

Open
@f-lombardo

Description

@f-lombardo

CreateResponse class should handle here

), $attributes['choices']);
cases when response attributes has no 'choices' element. That could happen when using this library trying to connect to Mistral API, and we exceed the API rate limit. In that case $attributes will contain

[
 "message" => "Requests rate limit exceeded"
]

Maybe it would be OK just to throw an exception with some hints on the received response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions