Skip to content

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

License

Notifications You must be signed in to change notification settings

tempo-riz/deepseek-dart

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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! :)

About

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

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

 

Packages

No packages published

Languages