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 {
2929type MessagesList struct {
3030 Messages []Message `json:"data"`
3131
32+ Object string `json:"object"`
33+ FirstID * string `json:"first_id"`
34+ LastID * string `json:"last_id"`
35+ HasMore bool `json:"has_more"`
36+
3237 httpHeader
3338}
3439
Original file line number Diff line number Diff line change @@ -142,6 +142,7 @@ func TestMessages(t *testing.T) {
142142 fmt .Fprintln (w , string (resBytes ))
143143 case http .MethodGet :
144144 resBytes , _ := json .Marshal (openai.MessagesList {
145+ Object : "list" ,
145146 Messages : []openai.Message {{
146147 ID : messageID ,
147148 Object : "thread.message" ,
@@ -159,7 +160,11 @@ func TestMessages(t *testing.T) {
159160 AssistantID : & emptyStr ,
160161 RunID : & emptyStr ,
161162 Metadata : nil ,
162- }}})
163+ }},
164+ FirstID : & messageID ,
165+ LastID : & messageID ,
166+ HasMore : false ,
167+ })
163168 fmt .Fprintln (w , string (resBytes ))
164169 default :
165170 t .Fatalf ("unsupported messages http method: %s" , r .Method )
You can’t perform that action at this time.
0 commit comments