witai package - github.com/wit-ai/wit-go - Go Packages (original) (raw)
- Constants
- type App
- type AppTrainingStatus
- type Client
- func (c *Client) AddEntityValue(entityID string, value EntityValue) (*Entity, error)
- func (c *Client) AddEntityValueExpression(entityID string, value string, expression string) (*Entity, error)
- func (c *Client) CreateApp(app App) (*CreatedApp, error)
- func (c *Client) CreateEntity(entity Entity) (*Entity, error)
- func (c *Client) DeleteApp(id string) error
- func (c *Client) DeleteEntity(id string) error
- func (c *Client) DeleteEntityRole(entityID string, role string) error
- func (c *Client) DeleteEntityValue(entityID string, value string) error
- func (c *Client) DeleteEntityValueExpression(entityID string, value string, expression string) error
- func (c *Client) DeleteSamples(samples []Sample) (*ValidateSampleResponse, error)
- func (c *Client) Detect(text string) (*Locales, error)
- func (c *Client) Export() (string, error)
- func (c *Client) GetApp(id string) (*App, error)
- func (c *Client) GetApps(limit int, offset int) ([]App, error)
- func (c *Client) GetEntities() ([]string, error)
- func (c *Client) GetEntity(id string) (*Entity, error)
- func (c *Client) GetSamples(limit int, offset int) ([]Sample, error)
- func (c *Client) Parse(req *MessageRequest) (*MessageResponse, error)
- func (c *Client) SetHTTPClient(httpClient *http.Client)
- func (c *Client) Speech(req *MessageRequest) (*MessageResponse, error)
- func (c *Client) UpdateApp(id string, app App) (*App, error)
- func (c *Client) UpdateEntity(id string, entity Entity) error
- func (c *Client) ValidateSamples(samples []Sample) (*ValidateSampleResponse, error)
- type CreatedApp
- type Entity
- type EntityValue
- type Locale
- type Locales
- type MessageContext
- type MessageCoords
- type MessageRequest
- type MessageResponse
- type Sample
- type SampleEntity
- type Speech
- type Time
- type ValidateSampleResponse
const (
DefaultVersion = "20170307"
WitTimeFormat = "2006-01-02T15:04:05Z0700")
This section is empty.
This section is empty.
type App struct {
Name string json:"name"
Lang string json:"lang"
Private bool json:"private"
Description [string](/builtin#string) `json:"description,omitempty"`
Desc [string](/builtin#string) `json:"desc,omitempty"`
ID [string](/builtin#string) `json:"id,omitempty"`
AppID [string](/builtin#string) `json:"app_id,omitempty"`
CreatedAt [string](/builtin#string) `json:"created_at,omitempty"`
Timezone [string](/builtin#string) `json:"timezone,omitempty"`
LastTrainingDurationSecs [int](/builtin#int) `json:"last_training_duration_secs,omitempty"`
WillTrainAt [Time](#Time) `json:"will_train_at,omitempty"`
LastTrainedAt [Time](#Time) `json:"last_trained_at,omitempty"`
TrainingStatus [AppTrainingStatus](#AppTrainingStatus) `json:"training_status,omitempty"`}
App - https://wit.ai/docs/http/20170307#get__apps_link
AppTrainingStatus - Represents the status of an app
const (
Done [AppTrainingStatus](#AppTrainingStatus) = "done"
Scheduled [AppTrainingStatus](#AppTrainingStatus) = "scheduled"
Ongoing [AppTrainingStatus](#AppTrainingStatus) = "ongoing")
Client - Wit.ai client type
NewClient - returns Wit.ai client for default API version
func NewClientWithVersion(token, version string) *Client
NewClientWithVersion - returns Wit.ai client for specified API version
Parse - parses text and returns entities
SetHTTPClient allows to use your custom http.Client
Speech - sends audio file for parsing
Time - Custom type to encapsulated a time.Time
func (witTime *Time) UnmarshalJSON(input []byte) error
UnmarshalJSON - Our unmarshal function for our custom type