package
0.0.0-20220112163943-faadaa80ce2d
Repository: https://github.com/digital-dream-labs/escape-pod-extension.git
Documentation: pkg.go.dev

# README

generic response

Easily identify a generic response!

Usage

This is meant to interface with other packages in this repository. Feel free to use it elsewhere if you find it useful.

Environment variables

VariableDescription
ESCAPE_POD_ROBOT_TARGETThe IP address of your vector
ESCAPE_POD_ROBOT_TOKENThe token for your robot

Initialization

When initializing this, you'll want to set the actual response you want. Here's an example!

	home, err := genericresponse.New(
		genericresponse.WithViper(),
		genericresponse.WithResponse(
			"I'm talking with the escape pod.  There's loads more to do!",
		),
	)
	if err != nil {
		return nil, err
	}

Intent configuration

You'll need to write a separate intent in the escape pod. Here's an example:

{
  "name": "escapepod",
  "description": "",
  "intent": "intent_custom_hack_escapepod",
  "utterance_list": "where are you pointed",
  "extended_options": {
    "block_list": [],
    "parser": null,
    "external_parser": true
  },
  "response_parameters": {
    "final_intent": "intent_play_cantdo"
  }
}

The response_parameters.final_intent field will not send if this transaction succeeds, as the SDK temporarily takes over all cloud response interactions. Anything you'll want to do will need to be handled in your custom module

# Functions

New returns a populated IntentHack struct.
WithResponse sets the response string.
WithViper loads a config from environment variables.

# Structs

GenericResponse is the configuration struct.

# Type aliases

Option is the list of options.