@@ -127,22 +127,6 @@ func (r *VectorStoreFileService) Delete(ctx context.Context, fileID string, body
127
127
return
128
128
}
129
129
130
- // Retrieves the contents of a vector store file.
131
- func (r * VectorStoreFileService ) Content (ctx context.Context , fileID string , query VectorStoreFileContentParams , opts ... option.RequestOption ) (res * VectorStoreFileContentResponse , err error ) {
132
- opts = slices .Concat (r .Options , opts )
133
- if query .VectorStoreID == "" {
134
- err = errors .New ("missing required vector_store_id parameter" )
135
- return
136
- }
137
- if fileID == "" {
138
- err = errors .New ("missing required file_id parameter" )
139
- return
140
- }
141
- path := fmt .Sprintf ("v1/vector_stores/%s/files/%s/content" , query .VectorStoreID , fileID )
142
- err = requestconfig .ExecuteNewRequest (ctx , http .MethodGet , path , nil , & res , opts ... )
143
- return
144
- }
145
-
146
130
// OpenAI Vector Store File object.
147
131
type VectorStoreFile struct {
148
132
// Unique identifier for the file
@@ -429,106 +413,6 @@ func (r *VectorStoreFileDeleteResponse) UnmarshalJSON(data []byte) error {
429
413
return apijson .UnmarshalRoot (data , r )
430
414
}
431
415
432
- // Response from retrieving the contents of a vector store file.
433
- type VectorStoreFileContentResponse struct {
434
- // Key-value attributes associated with the file
435
- Attributes map [string ]VectorStoreFileContentResponseAttributeUnion `json:"attributes,required"`
436
- // List of content items from the file
437
- Content []VectorStoreFileContentResponseContent `json:"content,required"`
438
- // Unique identifier for the file
439
- FileID string `json:"file_id,required"`
440
- // Name of the file
441
- Filename string `json:"filename,required"`
442
- // JSON contains metadata for fields, check presence with [respjson.Field.Valid].
443
- JSON struct {
444
- Attributes respjson.Field
445
- Content respjson.Field
446
- FileID respjson.Field
447
- Filename respjson.Field
448
- ExtraFields map [string ]respjson.Field
449
- raw string
450
- } `json:"-"`
451
- }
452
-
453
- // Returns the unmodified JSON received from the API
454
- func (r VectorStoreFileContentResponse ) RawJSON () string { return r .JSON .raw }
455
- func (r * VectorStoreFileContentResponse ) UnmarshalJSON (data []byte ) error {
456
- return apijson .UnmarshalRoot (data , r )
457
- }
458
-
459
- // VectorStoreFileContentResponseAttributeUnion contains all possible properties
460
- // and values from [bool], [float64], [string], [[]any].
461
- //
462
- // Use the methods beginning with 'As' to cast the union to one of its variants.
463
- //
464
- // If the underlying value is not a json object, one of the following properties
465
- // will be valid: OfBool OfFloat OfString OfAnyArray]
466
- type VectorStoreFileContentResponseAttributeUnion struct {
467
- // This field will be present if the value is a [bool] instead of an object.
468
- OfBool bool `json:",inline"`
469
- // This field will be present if the value is a [float64] instead of an object.
470
- OfFloat float64 `json:",inline"`
471
- // This field will be present if the value is a [string] instead of an object.
472
- OfString string `json:",inline"`
473
- // This field will be present if the value is a [[]any] instead of an object.
474
- OfAnyArray []any `json:",inline"`
475
- JSON struct {
476
- OfBool respjson.Field
477
- OfFloat respjson.Field
478
- OfString respjson.Field
479
- OfAnyArray respjson.Field
480
- raw string
481
- } `json:"-"`
482
- }
483
-
484
- func (u VectorStoreFileContentResponseAttributeUnion ) AsBool () (v bool ) {
485
- apijson .UnmarshalRoot (json .RawMessage (u .JSON .raw ), & v )
486
- return
487
- }
488
-
489
- func (u VectorStoreFileContentResponseAttributeUnion ) AsFloat () (v float64 ) {
490
- apijson .UnmarshalRoot (json .RawMessage (u .JSON .raw ), & v )
491
- return
492
- }
493
-
494
- func (u VectorStoreFileContentResponseAttributeUnion ) AsString () (v string ) {
495
- apijson .UnmarshalRoot (json .RawMessage (u .JSON .raw ), & v )
496
- return
497
- }
498
-
499
- func (u VectorStoreFileContentResponseAttributeUnion ) AsAnyArray () (v []any ) {
500
- apijson .UnmarshalRoot (json .RawMessage (u .JSON .raw ), & v )
501
- return
502
- }
503
-
504
- // Returns the unmodified JSON received from the API
505
- func (u VectorStoreFileContentResponseAttributeUnion ) RawJSON () string { return u .JSON .raw }
506
-
507
- func (r * VectorStoreFileContentResponseAttributeUnion ) UnmarshalJSON (data []byte ) error {
508
- return apijson .UnmarshalRoot (data , r )
509
- }
510
-
511
- // Content item from a vector store file or search result.
512
- type VectorStoreFileContentResponseContent struct {
513
- // The actual text content
514
- Text string `json:"text,required"`
515
- // Content type, currently only "text" is supported
516
- Type constant.Text `json:"type,required"`
517
- // JSON contains metadata for fields, check presence with [respjson.Field.Valid].
518
- JSON struct {
519
- Text respjson.Field
520
- Type respjson.Field
521
- ExtraFields map [string ]respjson.Field
522
- raw string
523
- } `json:"-"`
524
- }
525
-
526
- // Returns the unmodified JSON received from the API
527
- func (r VectorStoreFileContentResponseContent ) RawJSON () string { return r .JSON .raw }
528
- func (r * VectorStoreFileContentResponseContent ) UnmarshalJSON (data []byte ) error {
529
- return apijson .UnmarshalRoot (data , r )
530
- }
531
-
532
416
type VectorStoreFileNewParams struct {
533
417
// The ID of the file to attach to the vector store.
534
418
FileID string `json:"file_id,required"`
@@ -787,8 +671,3 @@ type VectorStoreFileDeleteParams struct {
787
671
VectorStoreID string `path:"vector_store_id,required" json:"-"`
788
672
paramObj
789
673
}
790
-
791
- type VectorStoreFileContentParams struct {
792
- VectorStoreID string `path:"vector_store_id,required" json:"-"`
793
- paramObj
794
- }
0 commit comments