HARPA.AI
LIBRARYUSE CASESGUIDESAI COMMANDSBLOG

Command Step

CONTENTS

# COMMAND

Runs a command by name. This allows building shortcut and higher-order commands. Here is an example of a base Translate command:

ChatML declaration

meta:
  name: translate@1
  title: Translate
steps:
  - type: ask
    message: Sure, what would you like me to translate?
    param: text
  - type: ask
    message: What is the target language?
    param: language
    default: English
  - type: gpt
    prompt: >
      Please ignore previous instructions. I would like you to translate the following text to {{language}}.

      Text to translate: {{text}}

      Translation:

And here is a Translate to Spanish which references Translate command:

ChatML declaration

meta:
  name: translate-to-spanish@1
  title: Translate to Spanish
steps:
  - type: command
    title: Translate
    inputs: [null, 'Spanish']

Calling the Translate to Spanish command will resolve the Translate command by name or title, then prompt user to provide a text to translate (since null is passed as the first input) and send request to GPT, using Spanish as a language.

# Example

Automate a thank-you comment for helpful content on a YouTube video using a combination of steps: COMMAND (or GPT) + CLICK + PASTE + CLICK.

NEXT POST
Contact us
HomeUse CasesGuidesPrivacy PolicyTerms of Service