forte icon indicating copy to clipboard operation
forte copied to clipboard

DataPack setting for Modality data should support setting data in a new payload

Open hepengfe opened this issue 3 years ago • 0 comments

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.

hepengfe avatar Jul 25 '22 23:07 hepengfe