Skip to content

Conversation

@avhulst
Copy link

@avhulst avhulst commented Sep 10, 2025

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):

// ...

// 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();

// ...

@carsonbot carsonbot changed the title Add support for Voxtral models with audio input and tool-calling Add support for Voxtral models with audio input and tool-calling Sep 10, 2025
@OskarStark OskarStark changed the title Add support for Voxtral models with audio input and tool-calling [Platform][Mistral] Add support for Voxtral models with audio input and tool-calling Sep 10, 2025
@OskarStark OskarStark force-pushed the feature/mistral-voxtral branch from d947dba to 55e78d1 Compare September 10, 2025 06:14
@OskarStark
Copy link
Contributor

Thanks @avhulst for working on this feature, this is much appreciated.

@OskarStark OskarStark merged commit 869174c into symfony:main Sep 10, 2025
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants