interfaces

package
v1.1.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 29, 2024 License: MIT Imports: 0 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AnalyzeResponse

type AnalyzeResponse struct {
	RequestID string   `json:"request_id,omitempty"` // for ?callback=...
	Metadata  Metadata `json:"metadata,omitempty"`
	Results   Results  `json:"results,omitempty"`
}

********************************* response/result structs *********************************

type Average

type Average struct {
	Sentiment      string  `json:"sentiment,omitempty"`
	SentimentScore float64 `json:"sentiment_score,omitempty"`
}

type Intent

type Intent struct {
	Intent          string  `json:"intent,omitempty"`
	ConfidenceScore float64 `json:"confidence_score,omitempty"`
}

type Intents

type Intents struct {
	Segments []Segment `json:"segments,omitempty"`
}

type IntentsInfo

type IntentsInfo struct {
	ModelUUID    string `json:"model_uuid,omitempty"`
	InputTokens  int    `json:"input_tokens,omitempty"`
	OutputTokens int    `json:"output_tokens,omitempty"`
}

********************************* share/common structs *********************************

type Metadata

type Metadata struct {
	RequestID     string        `json:"request_id,omitempty"`
	Created       string        `json:"created,omitempty"`
	Language      string        `json:"language,omitempty"`
	IntentsInfo   IntentsInfo   `json:"intents_info,omitempty"`
	SentimentInfo SentimentInfo `json:"sentiment_info,omitempty"`
	SummaryInfo   SummaryInfo   `json:"summary_info,omitempty"`
	TopicsInfo    TopicsInfo    `json:"topics_info,omitempty"`
}

type Results

type Results struct {
	Sentiments Sentiments `json:"sentiments,omitempty"`
	Summary    Summary    `json:"summary,omitempty"`
	Topics     Topics     `json:"topics,omitempty"`
	Intents    Intents    `json:"intents,omitempty"`
}

type Segment

type Segment struct {
	Text           string   `json:"text,omitempty"`
	StartWord      int      `json:"start_word,omitempty"`
	EndWord        int      `json:"end_word,omitempty"`
	Sentiment      string   `json:"sentiment,omitempty"`
	SentimentScore float64  `json:"sentiment_score,omitempty"`
	Topics         []Topic  `json:"topics,omitempty"`
	Intents        []Intent `json:"intents,omitempty"`
}

type SentimentInfo

type SentimentInfo struct {
	ModelUUID    string `json:"model_uuid,omitempty"`
	InputTokens  int    `json:"input_tokens,omitempty"`
	OutputTokens int    `json:"output_tokens,omitempty"`
}

type Sentiments

type Sentiments struct {
	Segments []Segment `json:"segments,omitempty"`
	Average  Average   `json:"average,omitempty"`
}

type Summary

type Summary struct {
	Text string `json:"text,omitempty"`
}

type SummaryInfo

type SummaryInfo struct {
	ModelUUID    string `json:"model_uuid,omitempty"`
	InputTokens  int    `json:"input_tokens,omitempty"`
	OutputTokens int    `json:"output_tokens,omitempty"`
}

type Topic

type Topic struct {
	Topic           string  `json:"topic,omitempty"`
	ConfidenceScore float64 `json:"confidence_score,omitempty"`
}

type Topics

type Topics struct {
	Segments []Segment `json:"segments,omitempty"`
}

type TopicsInfo

type TopicsInfo struct {
	ModelUUID    string `json:"model_uuid,omitempty"`
	InputTokens  int    `json:"input_tokens,omitempty"`
	OutputTokens int    `json:"output_tokens,omitempty"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL