1.0.0 ⢠Published 6 months ago
deepseek-ai-sdk v1.0.0
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.
1.0.0
6 months ago