Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewService ¶
func NewService(httpClient *http.Client, httpRetries *httpx.RetryConfig, classifier *flows.Classifier, accessToken string) flows.ClassificationService
NewService creates a new classification service
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is a basic Wit.ai client
type EntityMatch ¶
type EntityMatch struct { ID string `json:"id"` Name string `json:"name"` Role string `json:"role"` Value string `json:"value"` Confidence decimal.Decimal `json:"confidence"` }
EntityMatch is possible entity match
type IntentMatch ¶
type IntentMatch struct { ID string `json:"id"` Name string `json:"name"` Confidence decimal.Decimal `json:"confidence"` }
IntentMatch is possible intent match
type MessageResponse ¶
type MessageResponse struct { Text string `json:"text"` Intents []IntentMatch `json:"intents" validate:"required"` Entities map[string][]EntityMatch `json:"entities"` Traits map[string][]TraitMatch `json:"traits"` }
MessageResponse is the response from a /message request
Click to show internal directories.
Click to hide internal directories.