Documentation
¶
Index ¶
- Constants
- Variables
- type Context
- type ContextOut
- type ContextParameter
- type CortanaCommand
- type Data
- type Entity
- type Entry
- type Event
- type Fulfillment
- type Intent
- type IntentAgent
- type Location
- type Message
- type Metadata
- type Options
- type OriginalRequest
- type Parameter
- type Query
- type QueryResponse
- type RequestOptions
- type Response
- type Result
- type Status
- type UserEntity
- type UserSay
Constants ¶
View Source
const ( VERSION = "2.0.0-beta.20" DEFAULT_BASE_URL = "https://api.dialogflow.com/v1/" DEFAULT_API_VERSION = "20150910" DEFAULT_CLIENT_LANG = "en" )
Variables ¶
View Source
var AVAILABLE_LANGUAGES = map[string]string{
"EN": "en",
"DE": "de",
"ES": "es",
"PT_BR": "pt-BR",
"ZH_HK": "zh-HK",
"ZH_CN": "zh-CN",
"ZH_TW": "zh-TW",
"FR": "fr",
"NL": "nl",
"IT": "it",
"JA": "ja",
"KO": "ko",
"RU": "ru",
"UK": "uk",
"PT": "pt",
}
Functions ¶
This section is empty.
Types ¶
type Context ¶
type Context struct {
Name string `json:"name,omitempty"`
Lifespan int `json:"lifespan,omitempty"`
Parameters ContextParameter `json:"parameters,omitempty"`
}
type ContextOut ¶
type ContextParameter ¶
type CortanaCommand ¶
type CortanaCommand struct {
Target string `json:"target,omitempty"`
}
type Entity ¶
type Entity struct {
ID string `json:"id,omitempty"`
Name string `json:"name,omitempty"`
Count int `json:"count,omitempty"`
Preview string `json:"preview,omitempty"`
IsOverridable bool `json:"isOverridable,omitempty"`
IsEnum bool `json:"isEnum,omitempty"`
AutomatedExpansion bool `json:"automatedExpansion,omitempty"`
Entries []Entry `json:"entries,omitempty"`
}
type Fulfillment ¶
type Intent ¶
type Intent struct {
ID string `json:"id,omitempty"`
Name string `json:"name,omitempty"`
Auto bool `json:"auto,omitempty"`
Contexts []string `json:"contexts,omitempty"`
Templates []string `json:"templates,omitempty"`
UserSays []UserSay `json:"userSays,omitempty"`
Responses []Response `json:"responses,omitempty"`
Priority int `json:"priority,omitempty"`
WebhookUsed bool `json:"webhookUsed,omitempty"`
WebhookForSlotFilling bool `json:"webhookForSlotFilling,omitempty"`
FallbackIntent bool `json:"fallbackIntent,omitempty"`
CortanaCommand CortanaCommand `json:"cortanaCommand,omitempty"`
Events []Event `json:"events,omitempty"`
}
type IntentAgent ¶
type IntentAgent struct {
ID string `json:"id,omitempty"`
Name string `json:"name,omitempty"`
ContextIn []string `json:"contextIn,omitempty"`
ContextOut []ContextOut `json:"contextOut,omitempty"`
Actions []string `json:"actions,omitempty"`
Parameters []Parameter `json:"parameters,omitempty"`
Priority int `json:"priority,omitempty"`
FallbackIntent bool `json:"fallbackIntent,omitempty"`
}
type Message ¶
type Message struct {
Type interface{} `json:"type,omitempty"`
Speech string `json:"speech,omitempty"`
}
type OriginalRequest ¶
type Parameter ¶
type Parameter struct {
Name string `json:"name,omitempty"`
Value string `json:"value,omitempty"`
DefaultValue string `json:"defaultValue,omitempty"`
Required bool `json:"required,omitempty"`
DataType string `json:"dataType,omitempty"`
Prompts []string `json:"prompts,omitempty"`
IsList bool `json:"isList,omitempty"`
}
type Query ¶
type Query struct {
Query string `json:"query,omitempty"`
E Event `json:"e,omitempty"`
Event Event `json:"event,omitempty"`
V string `json:"v,omitempty"`
SessionID string `json:"sessionId,omitempty"`
Lang string `json:"lang,omitempty"`
Contexts []Context `json:"contexts,omitempty"`
ResetContexts bool `json:"resetContexts,omitempty"`
Entities []Entity `json:"entities,omitempty"`
Timezone string `json:"timezone,omitempty"`
Location Location `json:"location,omitempty"`
OriginalRequest OriginalRequest `json:"originalRequest,omitempty"`
}
type QueryResponse ¶
type RequestOptions ¶
type Result ¶
type Result struct {
Source string `json:"source,omitempty"`
Action string `json:"action,omitempty"`
ResolvedQuery string `json:"resolvedQuery,omitempty"`
ActionIncomplete bool `json:"actionIncomplete,omitempty"`
Parameters map[string]interface{} `json:"parameters,omitempty"`
Contexts []Context `json:"contexts,omitempty"`
Metadata Metadata `json:"metadata,omitempty"`
Fulfillment Fulfillment `json:"fulfillment,omitempty"`
Score float32 `json:"score,omitempty"`
}
type UserEntity ¶
Click to show internal directories.
Click to hide internal directories.