fromString static method

AttentionType fromString(
  1. String value
)

Converts a string value to the corresponding AttentionType enum value.

Implementation

static AttentionType fromString(String value) {
  switch (value) {
    case 'causal':
      return AttentionType.causal;
    case 'non-causal':
      return AttentionType.nonCausal;
    default:
      return AttentionType.unspecified;
  }
}