-
Notifications
You must be signed in to change notification settings - Fork 5
/
chat_hub.go
74 lines (60 loc) Β· 1.89 KB
/
chat_hub.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
package binglib
func newChatHub(chatReq ChatReq) *ChatHub {
return &ChatHub{
chatReq: chatReq,
style: CREATIVE,
}
}
func (chatHub *ChatHub) Clone() *ChatHub {
return &ChatHub{
chatReq: ChatReq{
ConversationId: chatHub.chatReq.ConversationId,
ClientId: chatHub.chatReq.ClientId,
ConversationSignature: chatHub.chatReq.ConversationSignature,
EncryptedConversationSignature: chatHub.chatReq.EncryptedConversationSignature,
},
style: chatHub.style,
}
}
func (chatHub *ChatHub) SetStyle(style string) *ChatHub {
chatHub.style = style
return chatHub
}
func (chatHub *ChatHub) SetChatReq(chatReq ChatReq) *ChatHub {
chatHub.chatReq = chatReq
return chatHub
}
func (chatHub *ChatHub) SetConversationId(conversationId string) *ChatHub {
chatHub.chatReq.ConversationId = conversationId
return chatHub
}
func (chatHub *ChatHub) SetClientId(clientId string) *ChatHub {
chatHub.chatReq.ClientId = clientId
return chatHub
}
func (chatHub *ChatHub) SetConversationSignature(conversationSignature string) *ChatHub {
chatHub.chatReq.ConversationSignature = conversationSignature
return chatHub
}
func (chatHub *ChatHub) SetEncryptedConversationSignature(encryptedconversationsignature string) *ChatHub {
chatHub.chatReq.EncryptedConversationSignature = encryptedconversationsignature
return chatHub
}
func (chatHub *ChatHub) GetStyle() string {
return chatHub.style
}
func (chatHub *ChatHub) GetChatReq() ChatReq {
return chatHub.chatReq
}
func (chatHub *ChatHub) GetConversationId() string {
return chatHub.chatReq.ConversationId
}
func (chatHub *ChatHub) GetClientId() string {
return chatHub.chatReq.ClientId
}
func (chatHub *ChatHub) GetConversationSignature() string {
return chatHub.chatReq.ConversationSignature
}
func (chatHub *ChatHub) GetEncryptedConversationSignature() string {
return chatHub.chatReq.EncryptedConversationSignature
}