File tree Expand file tree Collapse file tree 2 files changed +11
-1
lines changed Expand file tree Collapse file tree 2 files changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -29,6 +29,11 @@ type Message struct {
29
29
type MessagesList struct {
30
30
Messages []Message `json:"data"`
31
31
32
+ Object string `json:"object"`
33
+ FirstID * string `json:"first_id"`
34
+ LastID * string `json:"last_id"`
35
+ HasMore bool `json:"has_more"`
36
+
32
37
httpHeader
33
38
}
34
39
Original file line number Diff line number Diff line change @@ -142,6 +142,7 @@ func TestMessages(t *testing.T) {
142
142
fmt .Fprintln (w , string (resBytes ))
143
143
case http .MethodGet :
144
144
resBytes , _ := json .Marshal (openai.MessagesList {
145
+ Object : "list" ,
145
146
Messages : []openai.Message {{
146
147
ID : messageID ,
147
148
Object : "thread.message" ,
@@ -159,7 +160,11 @@ func TestMessages(t *testing.T) {
159
160
AssistantID : & emptyStr ,
160
161
RunID : & emptyStr ,
161
162
Metadata : nil ,
162
- }}})
163
+ }},
164
+ FirstID : & messageID ,
165
+ LastID : & messageID ,
166
+ HasMore : false ,
167
+ })
163
168
fmt .Fprintln (w , string (resBytes ))
164
169
default :
165
170
t .Fatalf ("unsupported messages http method: %s" , r .Method )
You can’t perform that action at this time.
0 commit comments