Versions in this module Expand all Collapse all v0 v0.0.3 Apr 8, 2023 Changes in this version type ConvTurn + CompletionTokens int + PromptTokens int + TotalTokens int v0.0.2 Apr 7, 2023 Changes in this version + type App struct + AppID string + CreatedAt *time.Time + ID uint64 + UpdatedAt *time.Time + type Bot struct + ID uint64 + Name string + type Client struct + func New(appID, appSecret string, opts ...Option) *Client + func (c *Client) CreateConversation(ctx context.Context, req CreateConversationRequest) (*Conversation, error) + func (c *Client) CreateIndexes(ctx context.Context, req CreateIndexesRequest) error + func (c *Client) DeleteConversation(ctx context.Context, conversationID string) error + func (c *Client) DeleteIndex(ctx context.Context, objectId string) error + func (c *Client) GetConvTurn(ctx context.Context, conversationID string, turnID uint64, ...) (*ConvTurn, error) + func (c *Client) GetConversation(ctx context.Context, conversationID string) (*Conversation, error) + func (c *Client) PostToConversation(ctx context.Context, req PostToConversationPayloadRequest) (*ConvTurn, error) + func (c *Client) SearchIndexes(ctx context.Context, req SearchIndexesRequest) (*SearchIndexesResponse, error) + func (c *Client) UpdateConversation(ctx context.Context, req UpdateConversationRequest) error + type ConvTurn struct + AppID uint64 + BotID uint64 + ConversationID string + CreatedAt *time.Time + ID uint64 + Request string + RequestToken int + Response string + ResponseToken int + Status int + UpdatedAt *time.Time + UserIdentity string + type Conversation struct + App *App + Bot *Bot + ExpiredAt time.Time + History []*ConvTurn + ID string + Lang string + UserIdentity string + type CreateConversationRequest struct + BotID uint64 + Lang string + UserIdentity string + type CreateIndexesItem struct + Category string + Data string + ObjectID string + Properties string + type CreateIndexesRequest struct + Items []*CreateIndexesItem + type Error struct + Code int + Msg string + StatusCode int + func (e Error) Error() string + type Index struct + Category string + CreatedAt int64 + Data string + ObjectID string + Properties string + Score float32 + type Logger interface + Debugf func(format string, args ...interface{}) + type Middleware struct + ID uint64 + Name string + Options map[string]interface{} + type Option func(*Client) + func WithDebug(debug bool) Option + func WithHost(host string) Option + func WithLogger(logger Logger) Option + type PostToConversationPayloadRequest struct + Category string + Content string + ConversationID string + type SearchIndexesRequest struct + Keywords string + N int + type SearchIndexesResponse struct + Items []*Index + type UpdateConversationRequest struct + ConversationID string + Lang string