Skip to content

Commit ac75c92

Browse files
author
Anthony Oliveri
committed
feat(ToneAnalyzer): Add ToneID options to ToneChatScore
1 parent e09de03 commit ac75c92

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

Source/ToneAnalyzerV3/Models/ToneChatScore.swift

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,20 @@ import Foundation
1919
/** ToneChatScore. */
2020
public struct ToneChatScore: Decodable {
2121

22+
/**
23+
The unique, non-localized identifier of the tone for the results. The service returns results only for tones whose
24+
scores meet a minimum threshold of 0.5.
25+
*/
26+
public enum ToneID: String {
27+
case excited = "excited"
28+
case frustrated = "frustrated"
29+
case impolite = "impolite"
30+
case polite = "polite"
31+
case sad = "sad"
32+
case satisfied = "satisfied"
33+
case sympathetic = "sympathetic"
34+
}
35+
2236
/**
2337
The score for the tone in the range of 0.5 to 1. A score greater than 0.75 indicates a high likelihood that the
2438
tone is perceived in the utterance.

0 commit comments

Comments
 (0)