A DeepSeek client for dart and flutter. Seamless integration of AI models for text generation and chat.
- 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
All you need is a DeepSeek API key. You can get one here
// 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");
}
I created this package for my own needs. Happy to share !
Don't hesitate to ask for new features or to contribute on GitHub !
If you'd like to support this project, consider contributing here. Thank you! :)