generated from deepgram/oss-repo-template
-
Notifications
You must be signed in to change notification settings - Fork 60
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
aa2acda
commit a9fed04
Showing
8 changed files
with
424 additions
and
89 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
/** | ||
* Options for read analysis | ||
*/ | ||
interface AnalyzeSchema extends Record<string, unknown> { | ||
callback?: string; | ||
|
||
callback_method?: string; | ||
|
||
custom_intent?: string | string[]; | ||
|
||
custom_intent_mode?: "strict" | "extended"; | ||
|
||
custom_topic?: string | string[]; | ||
|
||
custom_topic_mode?: "strict" | "extended"; | ||
|
||
intents?: boolean; | ||
|
||
language?: string; | ||
|
||
summarize?: boolean; | ||
|
||
sentiment?: boolean; | ||
|
||
topics?: boolean; | ||
} | ||
|
||
export type { AnalyzeSchema }; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
export interface AsyncAnalyzeResponse { | ||
request_id: string; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,88 @@ | ||
export interface SyncAnalyzeResponse { | ||
model_uuid: string; | ||
metadata: Metadata; | ||
results: Results; | ||
} | ||
|
||
interface IntentsInfo { | ||
model_uuid: string; | ||
input_tokens: number; | ||
output_tokens: number; | ||
} | ||
|
||
interface SentimentInfo { | ||
model_uuid: string; | ||
input_tokens: number; | ||
output_tokens: number; | ||
} | ||
|
||
interface SummaryInfo { | ||
model_uuid: string; | ||
input_tokens: number; | ||
output_tokens: number; | ||
} | ||
|
||
interface TopicsInfo { | ||
model_uuid: string; | ||
input_tokens: number; | ||
output_tokens: number; | ||
} | ||
|
||
interface Metadata { | ||
request_id: string; | ||
created: string; | ||
language: string; | ||
intents_info: IntentsInfo; | ||
sentiment_info: SentimentInfo; | ||
summary_info: SummaryInfo; | ||
topics_info: TopicsInfo; | ||
} | ||
|
||
interface Average { | ||
sentiment: string; | ||
sentiment_score: number; | ||
} | ||
|
||
interface Summary { | ||
text: string; | ||
} | ||
|
||
interface Topic { | ||
topic: string; | ||
confidence_score: number; | ||
} | ||
|
||
interface Intent { | ||
intent: string; | ||
confidence_score: number; | ||
} | ||
|
||
interface Segment { | ||
text: string; | ||
start_word: number; | ||
end_word: number; | ||
sentiment: "positive" | "neutral" | "negative"; | ||
sentiment_score?: number; | ||
topics?: Topic[]; | ||
intents?: Intent[]; | ||
} | ||
|
||
interface Sentiments { | ||
segments: Segment[]; | ||
average: Average; | ||
} | ||
|
||
interface Topics { | ||
segments: Segment[]; | ||
} | ||
|
||
interface Intents { | ||
segments: Segment[]; | ||
} | ||
|
||
interface Results { | ||
sentiments?: Sentiments; | ||
summary?: Summary; | ||
topics?: Topics; | ||
intents?: Intents; | ||
} |
Oops, something went wrong.