- Issue created by @mindaugasd
- 🇱🇹Lithuania mindaugasd
Another more complex alternative is to have a separate table where user would pre-define what variables this prompt accepts.
There would be a new table below segments table, with columns:
- variable_name
- type (string/integer/boolean/etc)
- default_value
- description
- [Button "Remove"]
Below a table, a button to "Add new row".
Benefits of this approach:
- Having variables definition would make clear what variables can be provided and what are available. Well defined tokens could be generated accordingly.
- Having default values means arguments are always useful (and can be used and referenced) and prompt is always usable with these defaults
- 🇱🇹Lithuania mindaugasd
One more alternative is to use entity fields for this.
Workflow:
- User creates a new entity field defining a variable and its defaults
- Developer programatically set value of entity field to pass the variable
Benefits:
- It already works, nothing to be done.
Drawbacks:
- A little more complex for the user, because not fine-tuned for prompt engineering
- Would not work with configuration prompts, because they don't have fields
- 🇱🇹Lithuania mindaugasd
Added information about adding user interface for pre-defining arguments.
- 🇱🇹Lithuania mindaugasd
Rewrote description. Added new information about:
- Plugin system for arguments
- Separate routes and forms for add / edit / remove operations
Will follow same/similar pattern like prompt segments.
-
mindaugasd →
committed aa37e1b4 on 1.0.x
Issue #3443027 by mindaugasd: Allow to pass arguments to aiprompt...
-
mindaugasd →
committed aa37e1b4 on 1.0.x
- 🇱🇹Lithuania mindaugasd
Did commit with huge update and implemented most of tasks. What is left:
- Provide tokens generated from arguments. Created issue addressing this ✨ Modernize token system Active
- Ajax upgrade will probably be moved to a separate issue to do later.
- Testing and polishing
-
mindaugasd →
committed 7b088639 on 1.0.x
Issue #3443027 by mindaugasd: Allow to pass arguments to aiprompt...
-
mindaugasd →
committed 7b088639 on 1.0.x
- 🇱🇹Lithuania mindaugasd
In latest commit done this:
- Provide tokens generated from arguments.