Documentation ¶
Index ¶
- type Chat
- type ChatAuthForm
- type ChatPartialResponse
- type ChatRequestForm
- type Conversation
- type ConversationDelete
- type ConversationList
- type ConversationLoad
- type Instance
- func (i *Instance) BuyQuota(quota int) error
- func (i *Instance) DeleteConversation(id int) error
- func (i *Instance) GetApiKey() string
- func (i *Instance) GetChatApiKey() string
- func (i *Instance) GetChatEndpoint() (host string)
- func (i *Instance) GetConversation(id int) (*Conversation, error)
- func (i *Instance) GetConversationList() ([]Conversation, error)
- func (i *Instance) GetEndpoint() string
- func (i *Instance) GetHeaders() utils.Headers
- func (i *Instance) GetPackage() (*Package, error)
- func (i *Instance) GetQuota() (float32, error)
- func (i *Instance) GetSubscription() (*Subscription, error)
- func (i *Instance) IsAuthenticated() bool
- func (i *Instance) Mix(path string) string
- func (i *Instance) NewChat(id int) (*Chat, error)
- func (i *Instance) SetApiKey(apiKey string)
- func (i *Instance) SetEndpoint(endpoint string)
- func (i *Instance) Subscribe(level int, month int) error
- type Message
- type Package
- type Quota
- type QuotaBuy
- type Subscribe
- type Subscription
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Chat ¶
func (*Chat) Ask ¶
func (c *Chat) Ask(form *ChatRequestForm, channel chan ChatPartialResponse)
func (*Chat) AskStream ¶
func (c *Chat) AskStream(form *ChatRequestForm, callback func(ChatPartialResponse))
func (*Chat) DeferClose ¶
func (c *Chat) DeferClose()
func (*Chat) SendAuthRequest ¶
type ChatAuthForm ¶
type ChatPartialResponse ¶
type ChatRequestForm ¶
type Conversation ¶
type ConversationDelete ¶
type ConversationList ¶
type ConversationList struct { Status bool `json:"status"` Message string `json:"message"` Data []Conversation `json:"data"` }
type ConversationLoad ¶
type ConversationLoad struct { Status bool `json:"status"` Message string `json:"message"` Data Conversation `json:"data"` }
type Instance ¶
func NewInstance ¶
NewInstance creates a new instance of the chatnio client
func NewInstanceFromEnv ¶
NewInstanceFromEnv creates a new instance of the chatnio client from the environment
func (*Instance) DeleteConversation ¶
func (*Instance) GetChatApiKey ¶
func (*Instance) GetChatEndpoint ¶
func (*Instance) GetConversation ¶
func (i *Instance) GetConversation(id int) (*Conversation, error)
func (*Instance) GetConversationList ¶
func (i *Instance) GetConversationList() ([]Conversation, error)
func (*Instance) GetEndpoint ¶
func (*Instance) GetHeaders ¶
func (*Instance) GetPackage ¶
func (*Instance) GetSubscription ¶
func (i *Instance) GetSubscription() (*Subscription, error)
func (*Instance) IsAuthenticated ¶
func (*Instance) SetEndpoint ¶
type Subscription ¶
Click to show internal directories.
Click to hide internal directories.