Add twig input formatter (AI Interpolator)

Created on 10 June 2024, 11 months ago

Problem/Motivation

Currently the base and advanced inputters either uses a very simple replacement scheme or a Token replacment scheme. Both are ok, but do not allow for conditionals in the prompt.

Think of the following - you have a prompt that generates articles from legacy nodes and it takes a short creation description and a list of bullet points to think about when generating the content. Because the legacy nodes only sometimes have the list of bullet points, it needs to only add that to the prompt when they exist. You can of course write in the prompt "If the bullet points exists, then take those into consideration", but it adds tokens you have to pay for that are not needed.

Proposed resolution

Look how Views solved it.

Feature request
Status

Active

Component

Documentation

Created by

🇩🇪Germany marcus_johansson

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

Comments & Activities

Production build 0.71.5 2024