Custom Prompt Templates
Last updated
Was this helpful?
Last updated
Was this helpful?
🤯 Sick of typing out long prompts every time? 😩 Bito's got your back! Now, create custom prompt templates for all your frequently used prompts and save yourself some stress.
With "Create Prompt Template," you can create and save custom prompt templates for use in your IDE. By defining a custom template with a template name and prompt, Bito can execute the prompt as is on the selected code. With this feature, you can save time and streamline your workflow by quickly executing frequently used prompts without inputting them manually each time.
The custom prompt templates feature and standard prompt templates are located below the chatbox.
Here is a quick overview of the Custom Prompt Templates in Bito
Open Bito Plugin in your IDE
Below the chatbox, click on "New Template".
Enter the "Template Name" and "Prompt" for your custom template. You can use {{%code%}} as a macro to insert the selected code in your prompt. If this macro is not used, Bito will insert the selected code at the end of your prompt. Next, select the "Output Format". You currently have two options:
Display in Bito panel (Default)
Output in diff view
Click on "Create Template" to save your new custom template. All custom templates will appear below the chatbox alongside standard templates. You can create up to four custom templates.
You can edit or remove the templates anytime by clicking on the three dots over the template that you want to edit or remove. Note that you can edit or remove the standard templates provided by Bito.
Select any code that you want to execute the prompt.
Run the Custom Template by clicking it in the Bito Templates panel or from the IDE context menu.
Bito starts generating output
Here’s an example of how to execute prompts using your custom templates.
Let’s say you want to create a custom template to add a comment describing the logic behind the code. Here's how you can do it:
Below the chatbox, click on "New template".
Enter a name for your custom template, e.g. "Add Comment"
In the "Prompt" field, enter the following: "Please add a comment describing the logic behind the code. " and then click on "Create Template" to save your new custom template
Now, select the code to which you want to comment and click on the "Add Comment" template.
Bito adds the selected code at the end of the prompt and executes it via Bito AI.