eino
eino copied to clipboard
feat: workflow supports mapping from nested fields and to nested fields
What type of PR is this?
feat: workflow supports mapping from nested fields and to nested fields
- can create field mapping from fields of nested structs or nested maps
- can create field mapping to fields of nested structs or nested maps
- use the same API to create nested field mapping, use '.' to join field paths
- allow an intermediate level of the mapping 'source' to be an interface, will defer type check to request time:
e.g.
// the output of from_node_key is map[string]any.
// at request time, the value for key 'field1' is another map with a key 'field2'
// when Compiling the workflow, we only know the value type of the map is 'any'.
// So we will defer type checking to request time.
AddInput("from_node_key", FromField("field1.field2")
📊 Coverage Report:
File coverage threshold (20%) satisfied: PASS
Package coverage threshold (30%) satisfied: PASS
Total coverage threshold (83%) satisfied: PASS
Total test coverage: 83.7% (3442/4110)