AID. - Artificial Intelligence DeepSeek Utility

<< Click to Display Table of Contents >>

Navigation:  3. Script Language > AI - Artificial Intelligence Commands > AID. - DeepSeek > !Chat Operation >

AID. - Artificial Intelligence DeepSeek Utility

AID.AskT

Previous Top Next


MiniRobotLanguage (MRL)

 

AID.AskT
Query the DeepSeek API with Plain Text Response

 

Intention

 

AskT Command: Simple AI Interaction
 
The AID.AskT command queries the DeepSeek API and returns a plain text response, perfect for direct display or lightweight applications.

It leverages DeepSeek’s cost-effective API (e.g., $0.27/1M input tokens and $1.10/1M output tokens for DeepSeek Chat) for efficient, human-readable AI output.

It’s part of the AID - DeepSeek API suite, optimized for MiniRobotLanguage workflows.

 

What is the AskT Command?

 

The AID.AskT command sends a prompt to the DeepSeek API, sets the response format to text via AID_SetRespFormat "text", and returns a plain text response processed by HTP_AnalyzeDeepSeekResponse.

It supports storing the response in a variable and optionally copying it to the clipboard, ideal for quick, readable outputs.

 

Why Do You Need It?

 

The AID.AskT command is essential for:

Simplicity: Provides plain text for immediate use or display without parsing.

Cost Efficiency: Matches AID.Ask’s low cost ($1.10/1M output tokens vs. GPT-4o’s $15.00/1M).

User Interaction: Perfect for chatbots or interfaces needing human-readable responses.

 

How to Use the AskT Command?

 

Supply a prompt (P1), an optional variable for the text response (P2), and an optional clipboard flag (P3).

Supports 'deepseek-chat' ($0.27/$1.10 per 1M tokens) and 'deepseek-reasoner' ($0.55/$2.19 per 1M tokens).

Use this command for direct, readable output rather than structured data processing.

 

Cost Model and Usage

 

Billing is token-based: 'deepseek-chat' at $0.27/1M input and $1.10/1M output; 'deepseek-reasoner' at $0.55/1M input and $2.19/1M output (February 2025).

A 100-input, 200-output token query costs ~$0.00025 for Chat, suitable for real-time user interfaces or low-overhead tasks.

 

Example Usage

 

AID.Set Model|deepseek-chat

AID.Set Temperature|1.0

AID.AskT|Write a haiku|$$HAI|CLIP

DBP.Haiku: $$HAI

Sets a creative temperature, requests a haiku, stores the text (e.g., "Cherry blossoms fall...") in $$HAI, and copies it.

 

AID.AskT|What is 2 + 2?|$$ANS

DBP.Answer: $$ANS

Stores the text response (e.g., "4") in $$ANS for direct display.

 

Illustration

 

┌────────────────────┐

│ Prompt: "Write a   │

│ short story"       │

├──────┬─────────────┤

│ Text │ "Once upon a│

│ Resp │ time..."    │

├──────┼─────────────┤

│ Cost │ ~$0.0005    │

└──────┴─────────────┘

Flow of a prompt yielding a text response with estimated cost.

 

Syntax

 

AID.AskT|P1[|P2][|P3]

 

Parameter Explanation

 

P1 - Mandatory prompt sent to the DeepSeek API.

P2 - Optional variable to store the text response.

P3 - Optional flag (e.g., "CLIP") to copy the response to the clipboard.

 

Example

 

AID.Set Model|deepseek-reasoner

AID.AskT|Explain gravity|$$EXP|CLIP

DBP.Explanation: $$EXP

ENR.

Uses 'deepseek-reasoner' to explain gravity, storing the text (e.g., "Gravity is the force...") in $$EXP.

 

Comparison: AID.Ask vs. AID.AskT

 

Use AID.AskT for plain text output suitable for direct display or minimal processing (e.g., user interfaces, logging).

Choose AID.Ask for JSON output when parsing or structured data is required. AID.AskT is lighter and faster for simple text needs.

 

Remarks

 

- Returns "DeepSeek did not answer!" if the API fails.

- Response depends on prior settings (e.g., temperature, max tokens).

 

Limitations

 

- Requires a valid API key and endpoint.

- Limited by max tokens (default 1024).

 

See also:

 

AID.Ask

AID.Set Temperature

AID.Set MaxToken

Chat Operation