Versions in this module Expand all Collapse all v1 v1.3.3 May 2, 2023 Changes in this version type Hub + func NewHub(conversation *Conversation, config *config.GPT) (*Hub, error) + func (h *Hub) CheckAndReconnect() error + func (h *Hub) NewConnect() (*websocket.Conn, error) v1.3.2 Apr 27, 2023 v1.3.2-stable May 2, 2023 v1.3.1 Apr 26, 2023 v1.3.0 Apr 26, 2023 v1.2.0 Apr 6, 2023 v1.1.2 Apr 4, 2023 v1.1.1 Apr 3, 2023 v1.1.0 Apr 3, 2023 Changes in this version + const Delimiter + const DelimiterByte + const StyleBalanced + const StyleCreative + const StylePrecise + const TypeFinish + const TypeUpdate + type Conversation struct + ClientId string + ConversationId string + ConversationSignature string + Result struct{ ... } + type FinalResponse struct + InvocationId string + Item struct{ ... } + Type int + func (r *FinalResponse) GetAnswer() string + func (r *FinalResponse) GetMaxUnit() int + func (r *FinalResponse) GetSuggestions() []*Suggestion + func (r *FinalResponse) GetType() int + func (r *FinalResponse) GetUserUnit() int + type GPT struct + Config *config.GPT + Conversation *Conversation + ExpiredAt time.Time + Hub *Hub + func NewGPT(conf *config.GPT) (*GPT, error) + func (g *GPT) AskAsync(message string) (*MessageWrapper, error) + func (g *GPT) AskSync(message string) (*MessageWrapper, error) + type GptResponse interface + GetAnswer func() string + GetMaxUnit func() int + GetSuggestions func() []*Suggestion + GetType func() int + GetUserUnit func() int + type Hub struct + InvocationId int + func (c *Hub) Close() + type Message struct + AdaptiveCards []struct{ ... } + Author string + SuggestedResponses []*Suggestion + Text string + type MessageWrapper struct + Answer GptResponse + Chan chan []byte + Final bool + Question string + func NewMessageWrapper(question string, mutex *sync.Mutex, conn *websocket.Conn) *MessageWrapper + func (m *MessageWrapper) Worker() error + type Storage map[string]*GPT + func NewStorage() *Storage + func (s *Storage) Add(gpt *GPT, key string) + func (s *Storage) Get(key string) (*GPT, error) + func (s *Storage) GetOrSet(key string) (*GPT, error) + func (s *Storage) Remove(key string) error + type StorageGpt interface + Add func(gpt *GPT, key string) + Get func(key string) (*GPT, error) + GetOrSet func(key string) (*GPT, error) + Remove func(key string) error + type Suggestion struct + Author string + ContentOrigin string + CreatedAt time.Time + Feedback struct{ ... } + MessageId string + MessageType string + Offense string + Privacy interface{} + Text string + Timestamp time.Time + type UndefinedResponse struct + Type int + func (r *UndefinedResponse) GetAnswer() string + func (r *UndefinedResponse) GetMaxUnit() int + func (r *UndefinedResponse) GetSuggestions() []*Suggestion + func (r *UndefinedResponse) GetType() int + func (r *UndefinedResponse) GetUserUnit() int + type UpdateResponse struct + Arguments []struct{ ... } + Target string + Type int + func (u *UpdateResponse) GetAnswer() string + func (u *UpdateResponse) GetMaxUnit() int + func (u *UpdateResponse) GetSuggestions() []*Suggestion + func (u *UpdateResponse) GetType() int + func (u *UpdateResponse) GetUserUnit() int v1.0.2 Apr 3, 2023 v1.0.0 Apr 3, 2023