AI Provider for Mistral

AI Provider for Mistral

توسط

This plugin provides a third-party Mistral integration for the PHP AI Client SDK. It enables WordPress sites to use Mistral models for text generation and related AI capabilities.
It is not affiliated with, endorsed by, or sponsored by Mistral AI.

Features:

  • Text generation with Mistral models
  • Image generation with Mistral mistral-medium-2505 model
  • Function calling support (for compatible models)
  • Vision input support (for compatible models)
  • Automatic provider registration

Available models are dynamically discovered from the Mistral API.

Requirements:

  • PHP 7.4 or higher
  • PHP AI Client plugin must be installed and activated
  • Mistral API key

For Developers

Filters

ai_provider_for_mistral_model_sort_callback

Filters the comparator used to order Mistral models in the metadata directory. Return any callable with the usort() signature function (ModelMetadata $a, ModelMetadata $b): int. The default comparator, the directory instance, and the unsorted model list are passed as context, so your filter can delegate to the default for everything except the cases you want to override.

Example — pin codestral-latest to the top and fall back to the default order for everything else:

add_filter(
    'ai_provider_for_mistral_model_sort_callback',
    function ( callable $default ): callable {
        return function ( $a, $b ) use ( $default ) {
            if ( $a->getId() === 'codestral-latest' ) return -1;
            if ( $b->getId() === 'codestral-latest' ) return 1;
            return $default( $a, $b );
        };
    }
);

External services

This plugin connects to the Mistral AI API (https://api.mistral.ai/v1) to provide AI text generation and image generation capabilities.

Data is sent to the Mistral API when your application code makes AI generation requests through the PHP AI Client. The data sent includes your prompts, model configuration, and API key. No data is sent automatically — requests only occur when explicitly triggered by code using the PHP AI Client SDK.

This service is provided by Mistral AI (https://mistral.ai/):
– Terms of Service: https://mistral.ai/terms/
– Privacy Policy: https://mistral.ai/terms/#privacy-policy

  1. Ensure the PHP AI Client plugin is installed and activated
  2. Upload the plugin files to /wp-content/plugins/ai-provider-for-mistral/
  3. Activate the plugin through the ‘Plugins’ menu in WordPress
  4. Configure your Mistral API key via the MISTRAL_API_KEY environment variable or constant

سوالات متداول

How do I get a Mistral API key?

Visit the Mistral Console to create an account and generate an API key.

Does this plugin work without the PHP AI Client?

No, this plugin requires the PHP AI Client plugin to be installed and activated. It provides the Mistral-specific implementation that the PHP AI Client uses.

تصویری برای این آیتم موجود نیست.
نظری برای این آیتم موجود نیست.
0 0 رای ها
امتیازدهی
اشتراک در
اطلاع از
0 نظرات
قدیمی‌ترین
تازه‌ترین بیشترین رأی
نسخه حجم فایل SHA256 تغییرات دانلود
1.2.0 230 کیلوبایت -
دانلود
×
بدون امتیاز

قیمت:

رایگان

نگارش

1.2.0

آخرین انتشار

17 اردیبهشت 1405

آخرین بروزرسانی

3 ماه پیش

نصب های فعال

-

نگارش وردپرس

وردپرس 6.9+

تست شده از نسخه

وردپرس 7.0

نگارش PHP

PHP 7.4+

نسخه ها

1 نسخه