forked from aurora-develop/aurora
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathresponse.go
91 lines (83 loc) · 2.54 KB
/
response.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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
package chatgpt
type ChatGPTResponse struct {
Message Message `json:"message"`
ConversationID string `json:"conversation_id"`
Error interface{} `json:"error"`
}
type ChatGPTWSSResponse struct {
WssUrl string `json:"wss_url"`
ConversationId string `json:"conversation_id,omitempty"`
ResponseId string `json:"response_id,omitempty"`
}
type WSSMsgResponse struct {
SequenceId int `json:"sequenceId"`
Type string `json:"type"`
From string `json:"from"`
DataType string `json:"dataType"`
Data WSSMsgResponseData `json:"data"`
}
type WSSMsgResponseData struct {
Type string `json:"type"`
Body string `json:"body"`
MoreBody bool `json:"more_body"`
ResponseId string `json:"response_id"`
ConversationId string `json:"conversation_id"`
}
type Message struct {
ID string `json:"id"`
Author Author `json:"author"`
CreateTime float64 `json:"create_time"`
UpdateTime interface{} `json:"update_time"`
Content Content `json:"content"`
EndTurn interface{} `json:"end_turn"`
Weight float64 `json:"weight"`
Metadata Metadata `json:"metadata"`
Recipient string `json:"recipient"`
}
type Content struct {
ContentType string `json:"content_type"`
Parts []interface{} `json:"parts"`
}
type Author struct {
Role string `json:"role"`
Name interface{} `json:"name"`
Metadata map[string]interface{} `json:"metadata"`
}
type Metadata struct {
Timestamp string `json:"timestamp_"`
Citations []Citation `json:"citations,omitempty"`
MessageType string `json:"message_type"`
FinishDetails *FinishDetails `json:"finish_details"`
ModelSlug string `json:"model_slug"`
}
type Citation struct {
Metadata CitaMeta `json:"metadata"`
StartIx int `json:"start_ix"`
EndIx int `json:"end_ix"`
}
type CitaMeta struct {
URL string `json:"url"`
Title string `json:"title"`
}
type FinishDetails struct {
Type string `json:"type"`
Stop string `json:"stop"`
}
type DalleContent struct {
AssetPointer string `json:"asset_pointer"`
Metadata struct {
Dalle struct {
Prompt string `json:"prompt"`
} `json:"dalle"`
} `json:"metadata"`
}
type RequirementsResponse struct {
Arkose struct {
Required bool `json:"required"`
Dx interface{} `json:"dx"`
} `json:"arkose"`
Turnstile struct {
Required bool `json:"required"`
} `json:"turnstile"`
Token string `json:"token"`
}