Skip to content

Instantly share code, notes, and snippets.

@mahdi-malv
Last active December 2, 2023 02:21
Show Gist options
  • Save mahdi-malv/3d56af6ac583abcd46848476475826da to your computer and use it in GitHub Desktop.
Save mahdi-malv/3d56af6ac583abcd46848476475826da to your computer and use it in GitHub Desktop.
gptcli plugin to allow multiple depth level of response
# Write the file in .config/gpt-cli/plugins/ask/ask.yml
# Create an alias to make the usage even simpler
# alias 'q?'='gptcli ask'
# will make it as simple as → q? "How far is the damn moon?" L1
name: ask
description: "normally ask something from AI"
author: "mahdi-malv"
help: |
ask plugin for gptcli
Usage:
❯ gpt ask 'How far is the moon?' L1
Note: You can also pass a level from L1 (shortest) to L5 (longest) - default: L1
steps:
- name: "ask ai answer"
uses: "gpt:createChatCompletion"
with:
messages:
- role: "user"
content: "You answer based on the depth level required (from L1, being the shortest and pricise to L5, the most descriptive and verbose). If level wasn't specified, use L1. Don't use all levels together."
- role: "user"
content: $params_all
export:
answer: ANSWER
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment