forte
forte copied to clipboard
DataPack setting for Modality data should support setting data in a new payload
Is your feature request related to a problem? Please describe. Current datapack setting for modality data only can add new payload for the first one. We expect setter can add payload to a new index.
For example, suppose we have 2 text payloads with text payload indices 0, 1. We should support datapack.set_text("text", 2).
Describe the solution you'd like
- we should support
datapack.set_text("text", -1)which is equivalent to append text payload - we should also support
datapack.set_text("text")which the text payload index is by default -1
Describe alternatives you've considered A clear and concise description of any alternative solutions or features you've considered.
Additional context Add any other context or screenshots about the feature request here.