Segment plugins could provide additional tokens

Created on 12 July 2024, 5 months ago

Problem/Motivation

Because segment plugins gathers data for AI context, it can also be convenient for them to provide additional tokens for prompt wide use at the same time.

Proposed resolution

Tokens could be generated from:

  • configuration values
  • output
  • setPromptWideVariable() for prompt wide use

All the variables which has been set, could be displayed under new "Data" or "Variables" collapsed and expandable fieldset.

Tokens could be accessible in this format:

  • [{segment_machine_name}:config_value:{...}]
  • [{segment_machine_name}:config_value_tokenized:{...}]
  • [{segment_machine_name}:variable:{...}
  • [{segment_machine_name}:output]
  • [{segment_machine_name}:output_enabled]

Variables could be accessible only from already run segments (which are stacked before current segment).

All the same could be available for Twig prompt templates Active

Remaining tasks

User interface changes

API changes

Data model changes

Feature request
Status

Active

Version

1.0

Component

Code

Created by

🇱🇹Lithuania mindaugasd

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024