mistral_sgela_ai

Last updated:

0 purchases

mistral_sgela_ai Image
mistral_sgela_ai Images
Add to Cart

Description:

mistral sgela ai

Dart Mistral API Package #
This Dart package provides idiomatic access to the Mistral AI API for both Dart and Flutter applications.
Mistral AI is a powerful platform for artificial intelligence and machine learning tasks, and this package simplifies integration with your Dart and Flutter projects.
The package hides the messy details of the Mistral API and lets you work with nice statically typed classes.

MistralService
MistralRequest
MistralResponse
MistralEmbeddingRequest
MistralEmbeddingResponse
MistralModel
MistralEmbedding
MistralConstants

Installation #
Add the following to your pubspec.yaml:
dependencies:
mistral_sgela_ai: ^1.1.0+2
copied to clipboard
Then, run:
$ flutter pub get
copied to clipboard
Usage #
Import the package where you need to use it:
import 'package:mistral_sgela_ai/mistral_sgela_ai.dart';
copied to clipboard
Initialize the Mistral API client with your API key:
final mistral = MistralService(apiKey: 'your_api_key');
copied to clipboard
Now you can use the various methods provided by the Mistral API. For example:
Send a request to the Mistral Chat models endpoint.
final List<MistralModel> models = await mistral.listModels();
copied to clipboard
Send a request to the Mistral Chat completions endpoint.
var mistralRequest = MistralRequest();
final MistralResponse response = await mistral.sendMistralRequest(mistralRequest);
copied to clipboard
Send a request to the Mistral Chat embeddings endpoint.
var mistralEmbeddingRequest = MistralEmbeddingRequest();
final List<MistralEmbeddingResponse> response = await mistral.sendEmbeddingRequest(mistralEmbeddingRequest);
copied to clipboard
A quick way to check whether things are cool is by sending a Hello request to the Mistral Chat Completions endpoint.
final List<MistralResponse> response = await mistral.sendHello();
copied to clipboard
Authentication #
You need an API key from Mistral AI to use this package. Get registered and get an API key here: Mistral AI Website
Example #
You can find a simple example in the example directory of this repository.
Issues and Feedback #
Please file any issues, bugs, or feature requests in the issue tracker.
License #
This package is licensed under the MIT License. See the LICENSE file for details.

License:

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Files In This Product:

Customer Reviews

There are no reviews.