You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feature #508 [Platform][Mistral] Add support for Voxtral models with audio input and tool-calling (Andreas van Hulst)
This PR was squashed before being merged into the main branch.
Discussion
----------
[Platform][Mistral] Add support for Voxtral models with audio input and tool-calling
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | Yes
| Docs? | no
| Issues | --
| License | MIT
This pull request extends the Mistral integration to add support for the `VOXTRAL` models, which are specialized for processing audio data. This enables the transcription of audio files through the Mistral platform.
**Key Changes:**
* **New Model Constants:** In the `Mistral` class, the constants `VOXTRAL_SMALL` and `VOXTRAL_MINI` have been added.
* **Audio Capability:** The `Capability::INPUT_AUDIO` is now correctly assigned to the models when one of the VOXTRAL models is selected.
* **Usage Example:** A new `ai:mistral` command has been created to demonstrate the functionality. It shows how to send an audio file (`audio.mp3`) to the `VOXTRAL_SMALL` model for transcription.
**Usage Example (`AiMistralCommand.php`):**
```php
// ...
// Select the VOXTRAL_SMALL model
$model = new Mistral(Mistral::VOXTRAL_SMALL);
// ...
// Call the agent with a system message and an audio file as user input
$messages = new MessageBag(
Message::forSystem('You are an assistant for audio transcriptions.'),
Message::ofUser(
'Please give me the content of the audio file',
Audio::fromFile(dirname(__DIR__, 2).'/audio.mp3'),
),
);
$result = $agent->call($messages)->getContent();
// ...
```
Commits
-------
55e78d1 [Platform][Mistral] Add support for Voxtral models with audio input and tool-calling
0 commit comments