Build custom client for Mistral or switch to HelgeSverre lib

Created on 9 July 2024, 4 months ago
Updated 26 August 2024, 3 months ago

Problem/Motivation

The current way of using the OpenAI php library for the Mistral API is not great. It only follows the standards in best case scenario and not when its failing.

This leads to all the possible exceptions or even error messages being lost and in the end the end user only sees a AiBadRequestException with some code failure, because its not following standards.

In the actual API response there is a human readable error - "No money left", "Rate limit reached" etc, but this is not passed through to the end user.

Proposed resolution

* Build our own Guzzle Client for Mistral that can forward errors to an exception.
* (or) try this out: https://github.com/HelgeSverre/mistral

Remaining tasks

User interface changes

API changes

Data model changes

Feature request
Status

Active

Version

1.0

Component

AI Core module

Created by

🇩🇪Germany marcus_johansson

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024