Pakete, Repositories und App-Kategorien suchen

Paketdetailsv0.0.7

openai_client

Ein nicht-offizieller, plattformunabhängiger Client zum Zugriff auf verschiedene von OpenAI entwickelte KI-Modelle.

AndroidiOSmacOSWindowsLinux
30-Tage-Downloads
101
Likes
49
Pub-Punkte
140

Paket installieren

flutter pub add openai_client

Paketübersicht

Aus öffentlichen Paketdaten erstellte Orientierung.

Das openai_client-Paket ist ein nicht-offizieller, plattformunabhängiger Dart-Client zur Interaktion mit den KI-Modellen von OpenAI. Es ermöglicht Entwicklern, generative KI-Funktionen wie Textgenerierung und Chat-Antworten in Flutter-Anwendungen für Android, iOS, macOS, Windows und Linux zu integrieren. Durch seine Einfachheit und Flexibilität unterstützt es verschiedene OpenAI-Endpunkte ohne plattformspezifischen Code. Der Client abstrahiert HTTP-Interaktionen und erleichtert die Authentifizierung sowie das Senden von Anfragen mithilfe von API-Schlüsseln. Ideal zum Erstellen von KI-basierten Funktionen in plattformübergreifenden Apps.

Anwendungsfälle

  • Chatbots in mobile und Desktop-Anwendungen integrieren
  • Inhalt mit GPT-Modellen generieren
  • KI-Assistenten mit natürlicher Sprachverarbeitung erstellen
  • Echtzeit-Text-Vervollständigung aktivieren
  • Multisprachige Übersetzungs-Tools erstellen

Hauptmerkmale

  • Plattformübergreifende Kompatibilität
  • Einfache API für OpenAI-Endpunkte
  • Unterstützung der Authentifizierung über API-Schlüssel
  • Asynchrone Anforderungsverarbeitung
  • Leichtgewichtig und einfach zu integrieren

Geeignet für

  • Flutter-Entwickler, die künstliche Intelligenz-basierte Apps erstellen
  • Teams, die eine Multiplattform-KI-Integration benötigen
  • Projekte, die generative Textfähigkeiten erfordern
  • Schnelle Prototypenerstellung von KI-Funktionen
  • Apps, die sowohl mobile als auch Desktop-Nutzer ansprechen

Hinweise

  • Nicht-offizieller Client—kann nach Änderungen an der OpenAI-API aktualisiert werden müssen
  • Erforderliche ordnungsgemäße Verwaltung von API-Schlüsseln
  • Abhängig von einer stabilen Internetverbindung
  • Beschränkt auf die verfügbaren Modelle von OpenAI
  • Nicht geeignet für hochfrequente oder missionkritische KI-Aufgaben

Original-README

Originaler README-Schnappschuss aus dem verknüpften Quell-Repository. Aktuelle Inhalte finden Sie im Repository.

alt Banner of the openai_client project

The OpenAI API can be applied to virtually any task that involves understanding or generating natural language or code. They offer a spectrum of models with different levels of power suitable for different tasks, as well as the ability to fine-tune your own custom models.

ℹ️ Info

This is an unofficial client, written purely in Dart that allows you to easily use the API in your Dart or Flutter projects.

APIs Dart class Implementation status
Models OpenAIModels ✅
Completions OpenAICompletions ✅
Chat OpenAIChat ✅
Edits OpenAIEdits ✅
Images OpenAIImages ✅
Embeddings OpenAIEmbeddings ✅
Files Not present ❌
Fine-tunes Not present ❌
Moderations OpenAIModerations ✅

🧰 Installation

You can install the package by adding it to your pubspec.yaml file.

dependencies:
  openai_client: last_version

After the installation you would just need to import the package in your project.

import 'package:openai_client/openai_client.dart';

🚀 Getting Started

In order to use the API, you need to have an API key. You can get one here and once you have it, you can use it in the client passing the key itself in the OpenAIConfiguration constructor.

// Create the configuration
final conf = OpenAIConfiguration(
    apiKey: 'Your API key',
    organizationId: 'Your organization ID', // Optional
);

// Create a new client
final client = OpenAIClient(configuration: conf);

🐛 Debugging

For testing and debugging purposes, you can use the built-in Logger to more easily check the status of requests and responses.

By default, the Logger is disabled. You can enable it by setting the enableLogging property to true.

// The instance of the client with the logger enabled
final client = OpenAIClient(
    ...
    enableLogging: true,
);

🎯 Examples

The provided example is a simple command line application that allows you to test the client. You can find it in the example folder.

📚 Documentation

The full documentation of the project is available here. All the methods are documented, and you can easily check the parameters that you can pass to them.

🤝 Contributing

If you want to contribute to openai_client, please make sure to review the contribution guidelines.

This project makes use of GitHub issues for tracking requests and bugs only, so please don't use issues for general questions and discussion.

🪪 License

This project is licensed under the BSD-3-Clause.

Furthermore, it's not affiliated with OpenAI in any way.

Kategorien

Abhängigkeiten

Abhängigkeiten 3 Einträge

Quell-Repository

Projekte, die dieses Paket verwenden

Noch keine Daten verfügbar.