-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathoutput.go
38 lines (28 loc) · 1.04 KB
/
output.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
package neocortex
// ResponseType define the types of generic response
type ResponseType string
// Text is a kind of generic response
const Text ResponseType = "text"
// Pause is a kind of generic response
const Pause ResponseType = "pause"
// Image is a kind of generic response
const Image ResponseType = "image"
// Options is a kind of generic response
const Options ResponseType = "option"
// ConnectToAgent is a kind of generic response
// var ConnectToAgent ResponseType = "connect_to_agent"
const Suggestion ResponseType = "suggestion"
const Unknown ResponseType = "unknown"
type Response struct {
IsTyping bool `json:"is_typing"`
Type ResponseType `json:"type"`
Value interface{} `json:"value"`
}
// Output represents the response of an input from the cognitive service
type Output struct {
Entities []Entity `json:"entities"`
Intents []Intent `json:"intents"`
VisitedNodes []*DialogNode `json:"visited_nodes"`
Logs []*LogMessage `json:"logs"`
Responses []Response `json:"responses"`
}