zeebee 1.0.2 copy "zeebee: ^1.0.2" to clipboard
zeebee: ^1.0.2 copied to clipboard

retracted

Zeebee

Zeebee #

pub package License: MIT

Zeebee is a Flutter package that makes it easy to integrate AI Chat capabilities into your applications. The package provides pre-designed UI components and utilities to connect with various AI Chat services.

Features #

  • 🚀 Ready-to-use and customizable Chat UI
  • 🔌 Integration with multiple AI Chat APIs (OpenAI, Anthropic, etc.)
  • 💬 Support for rich message formats (text, images, markdown)
  • 📱 Responsive across different screen sizes
  • 🎨 Easy theme and style customization
  • 🔒 Secure connections and data handling

Installation #

Add zeebee to your pubspec.yaml:

dependencies:
  zeebee: ^latest_version

Or run:

flutter pub add zeebee

Quick Start #

import 'package:flutter/material.dart';
import 'package:zeebee/zeebee.dart';

void main() {
  runApp(MyApp());
}

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(title: Text('Zeebee Chat Demo')),
        body: ZeebeeChatView(
          apiKey: 'YOUR_API_KEY',
          chatProvider: ChatProvider.openAI, // or .anthropic, .custom
          theme: ZeebeeChatTheme.light(),
          initialMessage: 'Hello! How can I help you today?',
        ),
      ),
    );
  }
}

Customization #

UI Customization #

ZeebeeChatView(
  theme: ZeebeeChatTheme(
    primaryColor: Colors.purple,
    backgroundColor: Colors.grey[100],
    userBubbleColor: Colors.purple[300],
    botBubbleColor: Colors.white,
    fontFamily: 'Roboto',
    // Additional customization properties
  ),
  // Other properties
)

Using Custom AI Provider #

final customProvider = ZeebeeCustomProvider(
  baseUrl: 'https://your-custom-ai-api.com',
  headers: {'Authorization': 'Bearer YOUR_TOKEN'},
  requestBuilder: (message, options) {
    // Build custom request
    return {...};
  },
  responseParser: (response) {
    // Parse response
    return ZeebeeMessage(...);
  },
);

ZeebeeChatView(
  chatProvider: ChatProvider.custom,
  customProvider: customProvider,
  // Other properties
)

API Reference #

Main Classes #

  • ZeebeeChatView: The main widget to display the chat UI
  • ZeebeeMessage: Represents a message in the conversation
  • ZeebeeChatController: Controls the state and behavior of the conversation
  • ZeebeeChatTheme: Defines the appearance of the chat UI
  • ChatProvider: Enum defining supported AI providers

Using the Controller #

final controller = ZeebeeChatController();

ZeebeeChatView(
  controller: controller,
  // Other properties
)

// Programmatically send a message
controller.sendMessage('Hello!');

// Listen for new messages
controller.messageStream.listen((message) {
  print('New message: ${message.content}');
});

// Clear the conversation
controller.clearChat();

Error Handling #

ZeebeeChatView(
  onError: (error) {
    print('AI Chat error: $error');
    // Custom error handling
  },
  // Other properties
)

Advanced Features #

Saving and Loading Conversations #

// Save conversation
final chatHistory = controller.exportChatHistory();
await saveToStorage(chatHistory);

// Load conversation
final savedHistory = await loadFromStorage();
controller.importChatHistory(savedHistory);

File Upload Support #

ZeebeeChatView(
  enableFileUpload: true,
  supportedFileTypes: ['png', 'jpg', 'pdf'],
  maxFileSize: 5, // MB
  onFileUpload: (file) async {
    // Process uploaded file
    final url = await uploadToServer(file);
    return url;
  },
  // Other properties
)

Contributing #

Contributions are welcome! If you'd like to contribute, please:

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add some amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

License #

This package is distributed under the MIT license. See the LICENSE file for more information.

Contact #

If you have any questions or suggestions, please open an issue on GitHub or contact us at [email@example.com].