@@ -133,28 +133,28 @@ func (r *BetaThreadMessageService) Delete(ctx context.Context, threadID string,
133133// File associated with the assistant or the message. Generated when the assistant
134134// uses the "file_search" tool to search files.
135135type Annotation struct {
136- // Always `file_citation`.
137- Type AnnotationType `json:"type,required"`
138- // The text in the message content that needs to be replaced.
139- Text string `json:"text,required"`
136+ EndIndex int64 `json:"end_index,required"`
140137 // This field can have the runtime type of [FileCitationAnnotationFileCitation].
141138 FileCitation interface {} `json:"file_citation,required"`
142- StartIndex int64 `json:"start_index,required"`
143- EndIndex int64 `json:"end_index,required"`
144139 // This field can have the runtime type of [FilePathAnnotationFilePath].
145- FilePath interface {} `json:"file_path,required"`
146- JSON annotationJSON `json:"-"`
147- union AnnotationUnion
140+ FilePath interface {} `json:"file_path,required"`
141+ StartIndex int64 `json:"start_index,required"`
142+ // The text in the message content that needs to be replaced.
143+ Text string `json:"text,required"`
144+ // Always `file_citation`.
145+ Type AnnotationType `json:"type,required"`
146+ JSON annotationJSON `json:"-"`
147+ union AnnotationUnion
148148}
149149
150150// annotationJSON contains the JSON metadata for the struct [Annotation]
151151type annotationJSON struct {
152- Type apijson.Field
153- Text apijson.Field
154- FileCitation apijson.Field
155- StartIndex apijson.Field
156152 EndIndex apijson.Field
153+ FileCitation apijson.Field
157154 FilePath apijson.Field
155+ StartIndex apijson.Field
156+ Text apijson.Field
157+ Type apijson.Field
158158 raw string
159159 ExtraFields map [string ]apijson.Field
160160}
@@ -227,32 +227,32 @@ func (r AnnotationType) IsKnown() bool {
227227// File associated with the assistant or the message. Generated when the assistant
228228// uses the "file_search" tool to search files.
229229type AnnotationDelta struct {
230- // The index of the annotation in the text content part.
231- Index int64 `json:"index,required"`
232- // Always `file_citation`.
233- Type AnnotationDeltaType `json:"type,required"`
234- // The text in the message content that needs to be replaced.
235- Text string `json:"text"`
236230 // This field can have the runtime type of
237231 // [FileCitationDeltaAnnotationFileCitation].
238232 FileCitation interface {} `json:"file_citation,required"`
239- StartIndex int64 `json:"start_index"`
240- EndIndex int64 `json:"end_index"`
241233 // This field can have the runtime type of [FilePathDeltaAnnotationFilePath].
242- FilePath interface {} `json:"file_path,required"`
243- JSON annotationDeltaJSON `json:"-"`
244- union AnnotationDeltaUnion
234+ FilePath interface {} `json:"file_path,required"`
235+ // The index of the annotation in the text content part.
236+ Index int64 `json:"index,required"`
237+ // Always `file_citation`.
238+ Type AnnotationDeltaType `json:"type,required"`
239+ EndIndex int64 `json:"end_index"`
240+ StartIndex int64 `json:"start_index"`
241+ // The text in the message content that needs to be replaced.
242+ Text string `json:"text"`
243+ JSON annotationDeltaJSON `json:"-"`
244+ union AnnotationDeltaUnion
245245}
246246
247247// annotationDeltaJSON contains the JSON metadata for the struct [AnnotationDelta]
248248type annotationDeltaJSON struct {
249+ FileCitation apijson.Field
250+ FilePath apijson.Field
249251 Index apijson.Field
250252 Type apijson.Field
251- Text apijson.Field
252- FileCitation apijson.Field
253- StartIndex apijson.Field
254253 EndIndex apijson.Field
255- FilePath apijson.Field
254+ StartIndex apijson.Field
255+ Text apijson.Field
256256 raw string
257257 ExtraFields map [string ]apijson.Field
258258}
@@ -1336,8 +1336,8 @@ type MessageContent struct {
13361336 Type MessageContentType `json:"type,required"`
13371337 ImageFile ImageFile `json:"image_file"`
13381338 ImageURL ImageURL `json:"image_url"`
1339- Text Text `json:"text"`
13401339 Refusal string `json:"refusal"`
1340+ Text Text `json:"text"`
13411341 JSON messageContentJSON `json:"-"`
13421342 union MessageContentUnion
13431343}
@@ -1347,8 +1347,8 @@ type messageContentJSON struct {
13471347 Type apijson.Field
13481348 ImageFile apijson.Field
13491349 ImageURL apijson.Field
1350- Text apijson.Field
13511350 Refusal apijson.Field
1351+ Text apijson.Field
13521352 raw string
13531353 ExtraFields map [string ]apijson.Field
13541354}
@@ -1437,9 +1437,9 @@ type MessageContentDelta struct {
14371437 // Always `image_file`.
14381438 Type MessageContentDeltaType `json:"type,required"`
14391439 ImageFile ImageFileDelta `json:"image_file"`
1440- Text TextDelta `json:"text"`
1441- Refusal string `json:"refusal"`
14421440 ImageURL ImageURLDelta `json:"image_url"`
1441+ Refusal string `json:"refusal"`
1442+ Text TextDelta `json:"text"`
14431443 JSON messageContentDeltaJSON `json:"-"`
14441444 union MessageContentDeltaUnion
14451445}
@@ -1450,9 +1450,9 @@ type messageContentDeltaJSON struct {
14501450 Index apijson.Field
14511451 Type apijson.Field
14521452 ImageFile apijson.Field
1453- Text apijson.Field
1454- Refusal apijson.Field
14551453 ImageURL apijson.Field
1454+ Refusal apijson.Field
1455+ Text apijson.Field
14561456 raw string
14571457 ExtraFields map [string ]apijson.Field
14581458}
0 commit comments