deepseek-ai-sdk
v1.0.0
Published
A Node.js wrapper for DeepSeek AI API
Maintainers
Readme
DeepSeek AI SDK (Node.js)
A simple and lightweight Node.js wrapper for DeepSeek AI API.
🚀 Installation
Install the package via npm:
npm install deepseek-ai-sdk
🔑 Authentication
To use this package, you need an API key from DeepSeek AI. You can get your API key from the DeepSeek AI platform.
1. Import and Initialize
const DeepSeekAI = require('deepseek-ai-sdk');
const ai = new DeepSeekAI('your-api-key');
2. Generate Text
(async () => {
try {
const response = await ai.generateText('What is AI?');
console.log(response);
} catch (error) {
console.error('Error:', error);
}
})();
3. Classify Text
(async () => {
try {
const response = await ai.classifyText('I love programming!');
console.log(response);
} catch (error) {
console.error('Error:', error);
}
})();
⚙️ API Methods
generateText(prompt, model)
Generates text based on the given prompt.
prompt (string): The input text for the AI model.
model (string, optional): The model to use (default: deepseek-llm).
classifyText(text)
Classifies the given text and provides AI-based insights.
text (string): The input text to classify.
🔥 Features
✅ Lightweight and easy to use
✅ Handles API authentication
✅ Supports multiple AI models
🛠️ Support
For any issues, please open an issue.
📜 License
This package is licensed under the MIT License.
