Documentation ¶
Index ¶
- func GenerateContext(projectId, sessionId, contextId string) (string, error)
- func GenerateIntent(projectId, intentId string) (string, error)
- func GenerateSession(projectId, sessionId string) (string, error)
- func JsonToWebhookRequest(json []byte) (*dialogflow.WebhookRequest, error)
- func JsonToWebhookResponse(json []byte) (*dialogflow.WebhookResponse, error)
- func ParseContext(context string) (projectId, sessionId string, contextId string, err error)
- func ParseIntent(intent string) (projectId, intentId string, err error)
- func ParseSession(session string) (projectId, sessionId string, err error)
- func WebhookRequestToJson(req *dialogflow.WebhookRequest) ([]byte, error)
- func WebhookResponseToJson(res *dialogflow.WebhookResponse) ([]byte, error)
- type DialogFlow
- type Manager
- type Request
- type Response
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenerateContext ¶
func GenerateIntent ¶
func GenerateSession ¶
func JsonToWebhookRequest ¶
func JsonToWebhookRequest(json []byte) (*dialogflow.WebhookRequest, error)
func JsonToWebhookResponse ¶
func JsonToWebhookResponse(json []byte) (*dialogflow.WebhookResponse, error)
func ParseContext ¶
func ParseIntent ¶
func ParseSession ¶
func WebhookRequestToJson ¶
func WebhookRequestToJson(req *dialogflow.WebhookRequest) ([]byte, error)
func WebhookResponseToJson ¶
func WebhookResponseToJson(res *dialogflow.WebhookResponse) ([]byte, error)
Types ¶
type DialogFlow ¶
type DialogFlow struct {
// contains filtered or unexported fields
}
func (*DialogFlow) DetectIntent ¶
type Manager ¶
func NewManager ¶
type Request ¶
type Request struct { Message string // required Username string // required Language string // optional <https://dialogflow.com/docs/languages> Timezone string // optional <https://www.iana.org/time-zones> IntentContext string // optional context IntentContextDeadline int32 // optional context lifespan count ResetContext bool // optional whether delete all contexts in the current session }
Click to show internal directories.
Click to hide internal directories.