- Issue created by @MrDaleSmith
- 🇩🇪Germany marcus_johansson
If this is connected to AI Assistants API, this would be great for sure - if the tokens exists that we need.
We have discussed further down the line to use twig, so we can use conditionals and iterations, so for instance you might want to have a prompt block that is {% if user_logged_in %){% endif %}.
If that is possible as research before choosing to use token, from security persepective and how well we can make the validations and UI around it, it would be good to have some thoughts about that first. Otherwise the token solution is better than the current PoC stuff.
- 🇬🇧United Kingdom MrDaleSmith
Sorery: yes, Assistants not Agents.
Token support is well established and works using Drupal's current permission system: you would add token support for the config entity and your tokens would then be available. Token support exists in Twig as well so I don't see that being a major issue, and it would open up the number of supported to tokens a user could use to include the global tokens as well.
Not sure what you want from validations and security given that the current system doesn't validate anything around a use of [pre_prompt] or [system_role].
- 🇩🇪Germany marcus_johansson
Security and validation was more if we were using twig to render the prompt to validate correct twig syntax, but if we can use tokens in twig you are right that the permissions are already solved. I was thinking of something like if you have field permissions, so you don't expose the value of that field in the prompt for a user that does not have access to it.
So this is great, feel free to refactor it.