dialogflow

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Apr 13, 2019 License: AGPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DfApi

type DfApi struct {
	// contains filtered or unexported fields
}

DfApi : dialogflow instance

func NewDfApi

func NewDfApi(projectid string, languagecode string, authJSONFilePath string) *DfApi

NewDfApi return new DfApi

func (*DfApi) DetectIntentText

func (dfapi *DfApi) DetectIntentText(userid, input string) (r NLPResponse)

[START dialogflow_detect_intent_text]

func (*DfApi) GetMsg

func (dfapi *DfApi) GetMsg(input string, userid string) (string, string)

GetMsg :get response from dialogflow

type NLPResponse

type NLPResponse struct {
	Intent     string            `json:"intent"`
	Confidence float32           `json:"confidence"`
	Result     string            `json:"result"`
	Entities   map[string]string `json:"entities"`
}

Jump to

Keyboard shortcuts

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