1.0.0 • Published 6 months ago

deepseek-ai-sdk v1.0.0

Weekly downloads
-
License
MIT
Repository
-
Last release
6 months ago

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