AIK. - Completion Endpoint

<< Click to Display Table of Contents >>

Navigation:  3. Script Language > AI - Artificial Intelligence Commands > AIK. - Claude from Anthropic > AIK. - Completion Endpoint >

AIK. - Completion Endpoint

 AIK.Set Comp MaxToken

Previous Top Next


MiniRobotLanguage (MRL)

 

AIK.Set Comp MaxToken

Set/Limit Number of Output Tokens

 

 

Intention

 

The AIK.Set Comp MaxToken command sets the limit for the maximum number of tokens that can be generated in a single completion request to the Anthropic Completion API.

This command is pivotal for controlling the length and detail of responses from the AI model.

 

| Model               | API Name                   | Max Tokens | Endpoint          |

|---------------------|----------------------------|------------|-----------        |

| Claude 3 Opus       | claude-3-opus-20240229     | 4096       | Messages        |

| Claude 3 Sonnet     | claude-3-sonnet-20240229   | 4096       | Messages        |

| Claude 3 Haiku      | claude-3-haiku-20240307    | 4096       | Messages        |

| Claude 2.1          | claude-2.1                 | 4096       | Completion        |

| Claude 2            | claude-2                   | 4096       | Completion        |

| Claude Instant 1.2  | claude-instant-1.2         | 4096       | Completion        |

 

This table provides an overview of all models available for the Completion endpoint, including their names and the maximum token parameter available for each.

This parameter, crucial for defining the length of generated text, is consistent across models, offering a wide range of flexibility for generating comprehensive responses, narratives, or data analyses.

 

 

Syntax

 

 

AIK.Set Comp MaxToken[|P1]

 

 

 

Parameter Explanation

 

P1 - (optional) The number of maximum tokens desired for the AI's output. If P1 is not specified, the command will default to 4096 tokens.

 

 

 

 

Example

 

'***********************************

' AIk.-Sample

'***********************************

' To set a custom maximum token count:

AIK.Set Comp MaxToken|2048

 

'To reset to the default maximum token count:

AIK.Set Comp MaxToken|

 

 

 

 

 

Remarks

 

-

 

 

Limitations:

 

-

 

 

See also: