Versions in this module Expand all Collapse all v0 v0.0.2 Jul 18, 2024 v0.0.1 May 22, 2024 Changes in this version + const PathAPI + const ValueChannelAdmin + const ValueIntendId + const ValueIsStartFalse + const ValueIsStartTrue + const ValueLangEn + const ValueLangJa + const ValueLangKo + const ValueModelMessage + const ValueRequestTypeButton + const ValueRequestTypeText + const ValueTimeZoneAsiaSeoul + const ValueUtteranceStart + const ValueVisitCountStart + var ErrInvalidMakeRequestChatResponseData = fmt.Errorf("invalid 'MakeRequestChat()' response data") + var ErrNeedChatDataExceptStartingTheChat = fmt.Errorf("need 'ChatData' except starting the chat") + var ErrNotInitialized = fmt.Errorf("not initialized") + func GetNewUUID() string + func IsInitialized() bool + func MakeRequest(method, path string, p url.Values, body []byte) ([]byte, error) + func MakeRequestAdmin(method, path string, p url.Values, body []byte) ([]byte, error) + func MakeRequestChat(method, path string, p url.Values, body []byte) ([]byte, error) + func SetVariables(drbotAPIEndpoint, drbotChatAPIEndpoint, drbotAdminAPIEndpoint string) + type ChatContext struct + type ChatData struct + Language string + Message string + SessionId string + UserID string + VisitCount int64 + func NewChatData() *ChatData + type ChatInput struct + Text string + type ChatIntent struct + Confidence float64 + IntentId string + IntentTitle string + Module string + type ChatItem []struct + type ChatOutput struct + Items []ChatItem + Type string + type ChatReq struct + Context *ChatContext + UserRequest *UserRequest + VisitCount int64 + func NewInitChatReq() *ChatReq + func (scr *ChatReq) Bytes() []byte + func (scr *ChatReq) String() string + type ChatResp struct + Outputs []ChatOutput + type Client struct + func GetDrbotClient() *Client + func (dc *Client) Do(req *http.Request) (*http.Response, error) + func (dc *Client) GetMaxRetriesCount() int + func (dc *Client) GetRetryDelay() time.Duration + func (dc *Client) SetMaxRetries(maxRetries int) *Client + func (dc *Client) SetRetryDelay(retryDelay time.Duration) *Client + type SendChatResp struct + Animation string + Context ChatContext + CreatedAt string + Input ChatInput + Intent ChatIntent + Response ChatResp + ResponseTime int + UserRequest UserRequest + VisitCount int + func NewSendChatResp() *SendChatResp + func SendChat(isStart bool, initData ...*ChatData) (*SendChatResp, error) + type UserReq struct + Id string + SessionId string + type UserRequest struct + CbcRound int64 + CbcTerm int64 + CbcType string + Channel string + IntentId string + IsStart int + Lang string + Model string + RequestType string + Timezone string + TopFolderId string + User *UserReq + Utterance string