Created
December 2, 2023 23:56
-
-
Save mahdi-malv/5a4859ffb551ca55d301bf14f2ed9611 to your computer and use it in GitHub Desktop.
gptcli plugin to be a coding assistant
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Put it in ~/.config/gpt-cli/code/code.yml | |
# add an alias for simplicity | |
# alias 'c?'='gptcli code' | |
name: code | |
description: "AI assistant for code" | |
author: "mahdi-malv" | |
help: | | |
code ask plugin for gptcli | |
Usage: | |
❯ gpt code 'How can I get the length of a string in python?' 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 are a software programmer assistant. You get programming related questions and answer with code and technical details. If possible only answer with code and avoid extra explanations. You answer based on the depth level required (from L1, being the shortest and pricise to the L5, the most descriptive and verbose). If level wasn't specified, answer for L1 only. DO NOT MENTION WHAT LEVEL YOU ARE ANSWERING WITH" | |
- 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