Skip to content

Latest commit

 

History

History
84 lines (56 loc) · 2.6 KB

README.md

File metadata and controls

84 lines (56 loc) · 2.6 KB

A DeepSeek client for dart and flutter. Seamless integration of AI models for text generation and chat.

Features/endpoints supported

  • Create Chat Completion
  • List Models
  • Get User Balance

You need something else ? Feel free to create issues, contribute to this project or to ask for new features on GitHub !

Official docs : https://api-docs.deepseek.com/api/deepseek-api

Getting started

All you need is a DeepSeek API key. You can get one here

Usage

// Initialize DeepSeek client with your API key
final deepSeek = DeepSeek("your-api-key");

try { 
  // Create a chat completion -> https://api-docs.deepseek.com/api/create-chat-completion
  Completion response = await deepSeek.createChat(
    messages: [Message(role: "user", content: "Hello, how are you?")],
    model: Models.chat,
    options: {
      "temperature": 1.0,
      "max_tokens": 4096,
    },
  );
  print("Chat Response: ${response.text}");

  // List available models
  List<Models> models = await deepSeek.listModels();
  print("Available Models: $models");

  // Get user balance
  Balance balance = await deepSeek.getUserBalance();
  print("User Balance: ${balance.info}");

} catch (e) {
  print("Error: $e");
}

Additional information

I created this package for my own needs. Happy to share !

Don't hesitate to ask for new features or to contribute on GitHub !

Support

If you'd like to support this project, consider contributing here. Thank you! :)