Documentation
¶
Index ¶
- type DialogFlowClient
- func (client *DialogFlowClient) ContextsCreateRequest(contexts []Context) (QueryResponse, error)
- func (client *DialogFlowClient) ContextsDeleteByNameRequest(name string) (QueryResponse, error)
- func (client *DialogFlowClient) ContextsDeleteRequest() (QueryResponse, error)
- func (client *DialogFlowClient) ContextsFindAllRequest() ([]Context, error)
- func (client *DialogFlowClient) ContextsFindByNameRequest(name string) (Context, error)
- func (client *DialogFlowClient) EntitiesAddEntryRequest(eid string, entries []Entry) (QueryResponse, error)
- func (client *DialogFlowClient) EntitiesCreateRequest(entity Entity) (QueryResponse, error)
- func (client *DialogFlowClient) EntitiesDeleteEntriesRequest(eid string, values []string) (QueryResponse, error)
- func (client *DialogFlowClient) EntitiesDeleteRequest(eid string) (QueryResponse, error)
- func (client *DialogFlowClient) EntitiesFindAllRequest() ([]Entity, error)
- func (client *DialogFlowClient) EntitiesFindByIdRequest(eid string) (Entity, error)
- func (client *DialogFlowClient) EntitiesUpdateEntityEntriesRequest(eid string, entries []Entry) (QueryResponse, error)
- func (client *DialogFlowClient) EntitiesUpdateEntityRequest(eid string, entity Entity) (QueryResponse, error)
- func (client *DialogFlowClient) EntitiesUpdateRequest(entities []Entity) (QueryResponse, error)
- func (client *DialogFlowClient) GetAccessToken() string
- func (client *DialogFlowClient) GetApiLang() string
- func (client *DialogFlowClient) GetApiVersion() string
- func (client *DialogFlowClient) GetBaseUrl() string
- func (client *DialogFlowClient) GetSessionID() string
- func (client *DialogFlowClient) IntentsCreateRequest(intent Intent) (QueryResponse, error)
- func (client *DialogFlowClient) IntentsDeleteRequest(id string) (QueryResponse, error)
- func (client *DialogFlowClient) IntentsFindAllRequest() ([]IntentAgent, error)
- func (client *DialogFlowClient) IntentsFindByIdRequest(id string) (Intent, error)
- func (client *DialogFlowClient) IntentsUpdateRequest(id string, intent Intent) (QueryResponse, error)
- func (client *DialogFlowClient) QueryCreateRequest(query Query) (QueryResponse, error)
- func (client *DialogFlowClient) QueryFindRequest(query Query) (QueryResponse, error)
- func (client *DialogFlowClient) SetSessionID(sessionID string)
- func (client *DialogFlowClient) UserEntitiesCreateRequest(userEntities []UserEntity) (QueryResponse, error)
- func (client *DialogFlowClient) UserEntitiesDeleteByNameRequest(name string) (QueryResponse, error)
- func (client *DialogFlowClient) UserEntitiesFindByNameRequest(name string) (UserEntity, error)
- func (client *DialogFlowClient) UserEntitiesUpdateRequest(name string, userEntity UserEntity) (QueryResponse, error)
- type Request
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DialogFlowClient ¶
type DialogFlowClient struct {
// contains filtered or unexported fields
}
func NewDialogFlowClient ¶
func NewDialogFlowClient(options Options) (error, *DialogFlowClient)
Create API.AI instance
func (*DialogFlowClient) ContextsCreateRequest ¶
func (client *DialogFlowClient) ContextsCreateRequest(contexts []Context) (QueryResponse, error)
Adds new active contexts to the specified session
func (*DialogFlowClient) ContextsDeleteByNameRequest ¶
func (client *DialogFlowClient) ContextsDeleteByNameRequest(name string) (QueryResponse, error)
Deletes the specified context from the specified session
func (*DialogFlowClient) ContextsDeleteRequest ¶
func (client *DialogFlowClient) ContextsDeleteRequest() (QueryResponse, error)
Deletes all contexts from the specified session
func (*DialogFlowClient) ContextsFindAllRequest ¶
func (client *DialogFlowClient) ContextsFindAllRequest() ([]Context, error)
retrieves the list of all currently active contexts for the specified session
func (*DialogFlowClient) ContextsFindByNameRequest ¶
func (client *DialogFlowClient) ContextsFindByNameRequest(name string) (Context, error)
Retrieves the specified context for the specified session
func (*DialogFlowClient) EntitiesAddEntryRequest ¶
func (client *DialogFlowClient) EntitiesAddEntryRequest(eid string, entries []Entry) (QueryResponse, error)
Adds entries to the specified entity.
func (*DialogFlowClient) EntitiesCreateRequest ¶
func (client *DialogFlowClient) EntitiesCreateRequest(entity Entity) (QueryResponse, error)
Creates a new entity
func (*DialogFlowClient) EntitiesDeleteEntriesRequest ¶
func (client *DialogFlowClient) EntitiesDeleteEntriesRequest(eid string, values []string) (QueryResponse, error)
Deletes entity entries
func (*DialogFlowClient) EntitiesDeleteRequest ¶
func (client *DialogFlowClient) EntitiesDeleteRequest(eid string) (QueryResponse, error)
Deletes the specified entity
func (*DialogFlowClient) EntitiesFindAllRequest ¶
func (client *DialogFlowClient) EntitiesFindAllRequest() ([]Entity, error)
Retrieves a list of all entities for the agent
func (*DialogFlowClient) EntitiesFindByIdRequest ¶
func (client *DialogFlowClient) EntitiesFindByIdRequest(eid string) (Entity, error)
Retrieves the specified entity
func (*DialogFlowClient) EntitiesUpdateEntityEntriesRequest ¶
func (client *DialogFlowClient) EntitiesUpdateEntityEntriesRequest(eid string, entries []Entry) (QueryResponse, error)
Updates entity entries
func (*DialogFlowClient) EntitiesUpdateEntityRequest ¶
func (client *DialogFlowClient) EntitiesUpdateEntityRequest(eid string, entity Entity) (QueryResponse, error)
Updates the specified entity
func (*DialogFlowClient) EntitiesUpdateRequest ¶
func (client *DialogFlowClient) EntitiesUpdateRequest(entities []Entity) (QueryResponse, error)
Creates or updates an array of entities
func (*DialogFlowClient) GetAccessToken ¶
func (client *DialogFlowClient) GetAccessToken() string
GET API.AI access token
func (*DialogFlowClient) GetApiLang ¶
func (client *DialogFlowClient) GetApiLang() string
GET API.AI language
func (*DialogFlowClient) GetApiVersion ¶
func (client *DialogFlowClient) GetApiVersion() string
GET API.AI version
func (*DialogFlowClient) GetBaseUrl ¶
func (client *DialogFlowClient) GetBaseUrl() string
Get API.AI base url
func (*DialogFlowClient) GetSessionID ¶
func (client *DialogFlowClient) GetSessionID() string
Get current session ID
func (*DialogFlowClient) IntentsCreateRequest ¶
func (client *DialogFlowClient) IntentsCreateRequest(intent Intent) (QueryResponse, error)
Creates a new intent
func (*DialogFlowClient) IntentsDeleteRequest ¶
func (client *DialogFlowClient) IntentsDeleteRequest(id string) (QueryResponse, error)
Deletes the specified intent
func (*DialogFlowClient) IntentsFindAllRequest ¶
func (client *DialogFlowClient) IntentsFindAllRequest() ([]IntentAgent, error)
Retrieves a list of all intents for the agent
func (*DialogFlowClient) IntentsFindByIdRequest ¶
func (client *DialogFlowClient) IntentsFindByIdRequest(id string) (Intent, error)
Retrieves the specified intent
func (*DialogFlowClient) IntentsUpdateRequest ¶
func (client *DialogFlowClient) IntentsUpdateRequest(id string, intent Intent) (QueryResponse, error)
Updates the specified intent
func (*DialogFlowClient) QueryCreateRequest ¶
func (client *DialogFlowClient) QueryCreateRequest(query Query) (QueryResponse, error)
Takes natural language text and information as JSON in the POST body and returns information as JSON
func (*DialogFlowClient) QueryFindRequest ¶
func (client *DialogFlowClient) QueryFindRequest(query Query) (QueryResponse, error)
Takes natural language text and information as query parameters and returns information as JSON
func (*DialogFlowClient) SetSessionID ¶
func (client *DialogFlowClient) SetSessionID(sessionID string)
Set a new seesion ID
func (*DialogFlowClient) UserEntitiesCreateRequest ¶
func (client *DialogFlowClient) UserEntitiesCreateRequest(userEntities []UserEntity) (QueryResponse, error)
Adds one or multiple user entities for a session.
func (*DialogFlowClient) UserEntitiesDeleteByNameRequest ¶
func (client *DialogFlowClient) UserEntitiesDeleteByNameRequest(name string) (QueryResponse, error)
Deletes a user entity object with a specified name
func (*DialogFlowClient) UserEntitiesFindByNameRequest ¶
func (client *DialogFlowClient) UserEntitiesFindByNameRequest(name string) (UserEntity, error)
Gets a user entity object by name
func (*DialogFlowClient) UserEntitiesUpdateRequest ¶
func (client *DialogFlowClient) UserEntitiesUpdateRequest(name string, userEntity UserEntity) (QueryResponse, error)
Updates user entity specified by name