This library allows integrating agents from the DialogFlow natural language processing service with your Golang application.
Create an DialogFlow account.
go get github.com/mlabouardy/dialogflow-go-client
- Queries
- Contexts
- Intents
- UserIntents
- Entities
- Create
main.go
file with the following code:
package main
import (
"fmt"
. "github.com/mlabouardy/dialogflow-go-client"
. "github.com/mlabouardy/dialogflow-go-client/models"
"log"
)
func main() {
err, client := NewDialogFlowClient(Options{
AccessToken: "<API.AI TOKEN GOES HERE>",
})
if err != nil {
log.Fatal(err)
}
entities, err := client.EntitiesFindAllRequest()
if err != nil {
log.Fatal(err)
}
for _, entity := range entities {
fmt.Println(entity.Name)
}
}
- Run following command.
go run main.go
- Your can find more examples in
examples
directory.
Documentation is available at https://dialogflow.com/docs.