搜尋套件、儲存庫與 APP 分類

套件詳情v1.1.0+1

mistralai_client_dart

(已棄用) 這是一個用於 Mistral AI API 的非官方 Dart/Flutter 客戶端。

AndroidiOSWebmacOSWindowsLinux
近 30 天下載
34
喜歡數
12
Pub 分數
150

安裝套件

flutter pub add mistralai_client_dart

套件介紹

根據套件公開資料產生的選型評估,僅供參考。

Mistral AI API 的非官方 Dart/Flutter 客戶端,可在 Flutter 應用中整合 Mistral 的大型語言模型。此套件簡化了向 Mistral 模型發起 API 呼叫的過程,適用於文字產生、聊天互動和自然語言處理等任務。注意:該套件已棄用,可能不會收到更新或對新 API 變更的支援。支援多種平台,包括 Android、iOS、Web、macOS、Windows 和 Linux。

適用情境

  • 將 Mistral AI 模型整合到 Flutter 應用中
  • 建構基於人工智慧的聊天介面
  • 使用大型語言模型產生文字
  • 使用AI創建多語言應用程式
  • 在跨平台應用中進行AI功能的原型設計

主要特色

  • 非官方但功能完整的 API 包裝器
  • 支援所有主要平台
  • 用於常見 AI 任務的簡單方法呼叫
  • 專為 Flutter 開發打造
  • 輕量且易於整合

適合對象

  • 在Flutter中開發AI功能的開發者
  • Teams 正在開發 LLM 集成
  • 需要快速訪問 Mistral AI 的項目
  • 教育或實驗性人工智慧應用

使用建議

  • 該軟體套件已棄用 – 使用時請自行承擔風險
  • 可能不支援最新的 Mistral API 更新
  • 無官方維護或支援
  • 需要手動處理 API 金鑰和錯誤
  • 未經驗證不建議在生產環境中使用

原始 README

以下為關聯原始碼儲存庫的 README 原文快照,最新內容請造訪原始碼儲存庫。

Mistral AI client for Dart (Deprecated)

.github/workflows/check.yaml style: very good analysis

⚠️ Deprecation Notice

This library is deprecated and no longer maintained.

We recommend migrating to actively maintained alternatives for continued support and updates.

Description

This is an unofficial Dart/Flutter client for the Mistral AI API.

Installation

dart pub add mistralai_client_dart

Usage

Create client
import 'package:mistralai_client_dart/mistralai_client_dart.dart';

final client = MistralAIClient(apiKey: 'your api key here');
List models
final modelsResult = await client.listModels();
final models = modelsResult.data?.map((e) => e.id).toList();
print(models?.join(', '));
Chat
const request = ChatCompletionRequest(
  model: 'mistral-small-latest',
  messages: [
    UserMessage(content: UserMessageContent.string('Hello chat!')),
  ],
);
final chatCompletion = await client.chatComplete(request: request);
final chatMessage = chatCompletion.choices?[0].message;
print(chatMessage?.content);
Chat stream
final stream = client.chatStream(request: request);
await for (final completionChunk in stream) {
  final chatMessage = completionChunk.choices[0].delta.content;
  if (chatMessage != null) {
    print(chatMessage);
  }
}
Embeddings
final embeddings = await client.createEmbeddings(
  request: const EmbeddingRequest(
    model: 'mistral-embed',
    input: EmbeddingRequestInput.arrayString(['Hello chat!']),
  ),
);
for (final data in embeddings.data) {
  print('Embeddings: ${data.embedding}');
}
Function calling

Check examples:

Files

Check examples:

Fine-tuning Jobs

Check examples:

Fill in the middle completion

Check examples:

Agents

Check examples:

Moderation

Check examples:

Resources

You can check the official Mistral AI docs.

Contributing

For contributing guide please see CONTRIBUTING.md.

Flutter Flow (deprecated)

For Flutter Flow integration please use the mistralai_client_dart_flutter_flow package.

It's a version of this package that is adapted to work with Flutter Flow.

Aknowledgements

Part of the code was generated thx to openapi_spec package.

所屬分類

依賴

依賴清單 4 項

原始碼儲存庫

使用此套件的專案

暫無相關資料。