- Issue created by @michaellander
- First commit to issue fork.
- @anjaliprasannan opened merge request.
The \Drupal\ai\Plugin\AiDataTypeConverter\EntityConverter
plugin was created as a means for tools to interact use entities by passing a token [entity:id]
or [entity:id:langcode]
as an argument. However, with the implementation of Artifacts[#3528726], it would be more favorable to use a tool to load an entity, place that entity in session storage with a token representing it, then allowing tools to modify that entity before proceeding to save.
Imagine the flow:
Load Entity -> Set Field Value -> Set Field Value -> Set Field Value -> Update URL Alias -> Preview Entity -> Save Entity
If you give AI a means to pass a token that bypasses the 'Load Entity' step, then each tool could reload the entity from the DB and nothing persists between tool calls. It would be better to rely on the 'Load Entity' step to add the artifact to session, and then all subsequent calls would depend on the artifact it created. So while well intended, I think keeping this converter in will actually cause more harm than good.
Remove \Drupal\ai\Plugin\AiDataTypeConverter\EntityConverter
I'm setting this as major, because the implications of it staying are pretty detrimental.
Active
1.2
AI Core module