Documentation ¶
Index ¶
Constants ¶
View Source
const ( TypeUpdate float64 = 1 TypeFinish float64 = 2 )
View Source
const DelimiterByte = uint8(30)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Final ¶
type Final struct { Type int `json:"type"` InvocationId string `json:"invocationId,omitempty"` Item struct { Messages []*Message `json:"messages"` ConversationExpiryTime time.Time `json:"conversationExpiryTime,omitempty"` Throttling struct { MaxNumUserMessagesInConversation int `json:"maxNumUserMessagesInConversation"` NumUserMessagesInConversation int `json:"numUserMessagesInConversation"` } `json:"throttling"` } `json:"item"` }
Final response for final generate message
func (*Final) GetMaxUnit ¶
GetMaxUnit get max user questions for current session
func (*Final) GetSuggestions ¶
func (*Final) GetUserUnit ¶
GetUserUnit get current question for current session
type GptResponse ¶
type Message ¶
type Message struct { Text string `json:"text"` Author string `json:"author"` AdaptiveCards []struct { Type string `json:"type"` Version string `json:"version"` Body []struct { Type string `json:"type"` Text string `json:"text"` Wrap bool `json:"wrap"` } `json:"body"` } `json:"adaptiveCards,omitempty"` SuggestedResponses []*Suggestion `json:"suggestedResponses,omitempty"` }
Message struct for bing answer
type MessageWrapper ¶
type MessageWrapper struct { Final bool Question string Answer GptResponse Chan chan []byte // contains filtered or unexported fields }
MessageWrapper wrapper for message worker
func NewMessageWrapper ¶
NewMessageWrapper create new wrapper
func (*MessageWrapper) Worker ¶
func (m *MessageWrapper) Worker() error
Worker write and parse websocket messages
type Suggestion ¶
type Suggestion struct { Text string `json:"text"` Author string `json:"author"` CreatedAt time.Time `json:"createdAt"` Timestamp time.Time `json:"timestamp"` MessageId string `json:"messageId"` MessageType string `json:"messageType"` Offense string `json:"offense"` Feedback struct { Tag interface{} `json:"tag"` UpdatedOn interface{} `json:"updatedOn"` Type string `json:"type"` } `json:"feedback"` ContentOrigin string `json:"contentOrigin"` Privacy interface{} `json:"privacy"` }
Suggestion for this question
type Undefined ¶
type Undefined struct {
Type int `json:"type"`
}
Undefined response for unused messages
func (*Undefined) GetMaxUnit ¶
GetMaxUnit get max user questions for current session
func (*Undefined) GetSuggestions ¶
func (*Undefined) GetUserUnit ¶
GetUserUnit get current question for current session
type Update ¶
type Update struct { Type int `json:"type"` Target string `json:"target"` Arguments []struct { Cursor struct { J string `json:"j"` P int `json:"p"` } `json:"cursor"` Messages []*Message `json:"messages"` RequestId string `json:"requestId"` } `json:"arguments"` }
Update response for work generate message
func (*Update) GetMaxUnit ¶
GetMaxUnit get max user questions for current session
func (*Update) GetSuggestions ¶
func (*Update) GetUserUnit ¶
GetUserUnit get current question for current session
Click to show internal directories.
Click to hide internal directories.