Action Group

AI Tools

Posted by @FlohGro, Last update 4 months ago

UPDATES

4 months ago

Use gpt-4o-mini by default

show all updates...

4 months ago

Use gpt-4o-mini by default

6 months ago

added possibility to use gpt-4o (or other models)

10 months ago

add note about payment method to description

This Action Group makes it easy to create your own actions with Drafts OpenAI integration. It contains a few ready to use actions and a template action to easily create actions for your own use cases.

Please read through the following explanation if you want to create your own actions with the AI Tool Template action. Read through the descriptions of the actions before using them the first time.

NOTE: This Action Group does not provide an API Key for use with OpenAI. To use it, you will have to setup your own OpenAI account and generate an API Key for use with Drafts in the OpenAI developer portal.
Make sure to configure a valid billing method by navigating to Settings > Billing > Payment methods. To prevent extensive usage you should also set a Usage limit under Settings > Limits > Usage limits. Without those properly configured you’ll receive a rate limiting error when you use any of the AI Tools actions

The first time you run one of the actions, Drafts will prompt you to enter your API key for OpenAI. Copy the API key from your account in the OpenAI developer portal and paste it into the prompt. The API key will be stored in Drafts credential store.

AI Tool Template

The AI Tool Template action is a template that you can use to create your own AI Tool action. Please don’t delete this action because it will be difficult for you to create new actions without it.

When you want to create your own AI Tool the first step is to duplicate the AI Tool Template action. Then edit the action and configure it according to your use case. The action contains several Define Template Tag steps that you need to configure for your use case. After configuring it you should of course rename the Action and maybe pick another icon / color for it.

⚠️ NEVER change the name of those template tags, only edit the content of the template themselves.

question_mode: defines the question you want to ask with the AI Tool
- prompt for question will open a prompt where you can type the question / task every-time you run the action
- use input the input text (defined by the input_mode) will be used as question
- [insert your question here] you can just type your question / task in that template tag (e.g. “summarize the following text”)

input_mode: defines the (additional) input text for the AI Tool
- current selection will pass the currently selected text as input
- draft content the whole content of the draft will be passed as input
- last response (default to selection) the last response will be passed as input (responses are detected by a configurable response separator). If no last response is present the current selection will be used and passed as input
- last response (default to draft content) the last response will be passed as input. If no last response is present the content of the draft will be used and passed as input
- none no input text

output_mode: defines how the AI Tool will output the response
- replace content replaces the content of the draft with the response text
- append to content appends the response text to the draft separated by the configurable “response_separator”
- prepend to content prepends the response text to the draft separated by the configurable “response_separator”
- replace selection replaces the currently selected text in the editor with the response text
- insert after selection inserts the response text after the selection (they will be separated only by a whitespace)
- create new draft creates a new draft with the response text and loads it into the editor

system_message: defines a system message for the AI Tool
Just replace the default text with a system message you want to use (if you don’t you can delete or leave it as it is).
In the context of ChatGPT, a system message is a message that is not part of the conversation with the user but is used to set the behavior or context for the model. It’s a way to give instructions or provide information to guide the model’s behavior.

response_separator: defines the separator string for the output text
The configured text will be inserted between the original text and the response text if you use append to content or prepend to content for the output_mode.

Support Development

I developed these functions and the Action Group in my free time to improve workflows and remove friction from processes. 🚀

AI Tools is completely free to use for you. However if this Action Group is useful for you, you can give something back to support development.
I enjoy a good coffee ☕️ (weather at home or in an actual coffee shop) and love pizza 🍕.
You can choose the amount you want to donate on the platforms linked on my website.

Buy Me A Coffee

Become A patreon

Buy Me a Coffee at ko-fi.com


Included Actions

  • AiToolBuilderScript
  • AI Tool Template
  • askAI
  • rephrase selection
  • correct spelling in draft
  • correct spelling in selection
  • improve post for mastodon
  • Summarize as mastodon post
  • suggest title and summarize
  • use draft content as prompt
  • translate content to english
  • Improve blogpost
  • Summarize Draft & Append Summary
Items available in the Drafts Directory are uploaded by community members. Use appropriate caution reviewing downloaded items before use.