1. Action Meta
  2. AI Function Calling

Action Meta

AI Function Calling

Enable an active AI to use this action as a function..
Once enabled, the AI will consider using this action when it is trying to fulfill a user's request.

Basic usage

To make an action available to an AI, navigate to the AI Tab on the action, and simply toggle AI Enabled on.

How to enable AI for an action

The action will now be available for the AI to use.

Advanced

Using the json editor on the AI tab or the advanced view of the action, you can specify what data or context you would like to give to the assistant. You can also specify additional properties that can change the behaviour of the AI assistant. It could do things like:

  • Clear previous function call results to reduce tokens.
  • Disable dynamic tasks. This prevents the assistant from responding when it decides to call an action.
  • Clear intermediary system messages to make the assistant's instructions more concise.

This information can also be found on the GPT Chat Task page.

loading...

Parameters

ai_function_calling

optional
boolean

Whether or not an action is callable by an AI assistant.

Default: false


ai_details

required if ai_function_calling is true
object

The object that contains the additional parameters relevant to AI action calling. It is only relevant if ai_function_calling is set to true.

Default: null


ai_details.action_result_inject_data

required if ai_function_calling is true
object

The data that will be passed back the AI assistant after a successful AI action call. The aim for good inject data is to have it be as concise as possible. You don't want to return the full stubpost, as this will use a lot of tokens and be quite expensive. You want to return only the data that the model will need from the result of the action it chose to run.

Example:

loading...

Default:

loading...

ai_details.clear_function_call_results

optional
boolean

With this parameter set to true, all previous function call results will be cleared. This can be used to reduce the token count in long chats where function results account for a lot of unnecessary tokens.

Default: false


ai_details.clear_intermediate_system_messages

optional
boolean

With this parameter set to true, all system messages except for the first (the one in the 0th message position) and the most recent will be cleared. This can help reduce token count and also helps with keeping the instructions to the model as concise as possible.

Default: false


ai_details.disable_dynamic_tasks

optional
boolean

Whenever an AI assistant runs an action, a dynamic task that returns the result of the action to the chat is added to that action automatically. This can be disabled for all actions in the gpt_chat_task params by setting action_call_result_method to custom. However, sometimes we want to do that only when a specific action is ran.

This parameter disables the addition of the default dynamic task when the specific action is run.

Default: false