|
<< Click to Display Table of Contents >> Navigation: 3. Script Language > AI - Artificial Intelligence Commands > AID. - Artificial Intelligence DeepSeek Utility |
MiniRobotLanguage (MRL)
AID. - DeepSeek API Integration
Harness the Power of DeepSeek’s AI in Your Scripts
Intention
Overview: AID. Commands for DeepSeek API
The AID. (Artificial Intelligence DeepSeek) command suite enables seamless integration with DeepSeek’s powerful AI models, such as deepseek-chat and deepseek-reasoner, directly within the Smart Package Robot environment. Designed for automation, these commands allow you to leverage advanced AI capabilities for tasks like natural language processing, reasoning, and code generation.
This chapter provides a comprehensive set of tools to authenticate, configure, and interact with DeepSeek’s cloud-based API, offering flexibility and control for your automation workflows.
The AID. commands are a specialized set of MiniRobotLanguage (MRL) instructions that interface with DeepSeek’s API, a cost-effective and high-performance AI platform. As of March 19, 2025, DeepSeek offers models like deepseek-chat ($0.27/M input tokens, $1.10/M output tokens) and deepseek-reasoner ($0.55/M input tokens cache miss, $2.19/M output tokens), making it a competitive choice for AI-driven automation.
These commands handle everything from API key management to model configuration, request generation, and response handling, all within the familiar MRL framework.
The AID. suite is designed to:
•Simplify Integration: Access DeepSeek’s AI models without complex HTTP requests or external libraries.
•Enhance Automation: Automate tasks like answering questions, solving equations, or generating code directly in your scripts.
•Optimize Costs: Configure settings to balance performance and expense, leveraging DeepSeek’s competitive pricing.
•Ensure Security: Manage API keys securely with options for encryption and file-based storage.
To begin using the AID. commands:
?Obtain a DeepSeek API key from platform.deepseek.com.
?Set the key using AID.Set Key.
?Configure your model and parameters (e.g., AID.Set Model, AID.Set MaxToken).
?Make API requests with commands like AID.Ask or AID.AskT.
The AID. commands are organized into the following categories, each serving a specific role in interacting with the DeepSeek API:
Manage your DeepSeek API key securely.
•AID.Set Key - Set the API key directly or load from a file.
•AID.Get Key - Retrieve the current API key.
•AID.Save Key - Save the API key to an encrypted file.
Manage file paths for key storage and other operations.
•AID.Set Folder - Set the folder for storing key files.
•AID.Get Folder - Retrieve the current folder path.
Configure the DeepSeek model and API endpoint.
•AID.Set Model - Select the DeepSeek model (e.g., deepseek-chat).
•AID.Get Model - Retrieve the current model.
•AID.Set EndPoint - Set the API endpoint URL.
•AID.Get EndPoint - Retrieve the current endpoint.
Fine-tune the behavior of API requests.
•AID.Set Temperature - Set the creativity level (0.0 to 1.0).
•AID.Get Temperature - Retrieve the current temperature setting.
•AID.Set MaxToken - Set the maximum output tokens (default 1024).
•AID.Get MaxToken - Retrieve the current token limit.
•AID.Set Response Format - Define the response format (e.g., text, JSON).
•AID.Get Response Format - Retrieve the current response format.
Interact with DeepSeek’s AI models to generate responses.
•AID.Ask - Send a query and receive a response.
•AID.AskT - Send a query with a specific template.
Access raw API responses for advanced processing.
•AID.Get RAW - Retrieve the raw JSON response from the last API call.
' Complete AID. workflow example
$$KEY=sk-ds1234567890abcdef
AID.Set Key|$$KEY
AID.Set Model|deepseek-reasoner
AID.Set MaxToken|500
AID.Set Temperature|0.7
AID.Ask|Solve 2x + 3 = 7|$$RES
DBP.Solution: $$RES
AID.Get RAW|$$RAW
DBP.Raw Response: $$RAW
ENR.
This script sets up the API key, configures the model and parameters, sends a query, and retrieves both the processed and raw responses.
Remarks
- All AID. commands require an internet connection to communicate with DeepSeek’s servers.
- Monitor usage on platform.deepseek.com to manage costs and set limits.
- Check DeepSeek API docs for updates on models, pricing, and features.
Limitations
- Requires a valid DeepSeek API key and internet access.
- Subject to DeepSeek’s rate limits and API availability.
See also: