Skip to content

Commit 9b54cd7

Browse files
committed
fb
1 parent 9a72a5d commit 9b54cd7

11 files changed

+96
-96
lines changed

api/OpenAI.net8.0.cs

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -5875,14 +5875,30 @@ public class VectorStoreFileAssociationCollectionOptions : IJsonModel<VectorStor
58755875
public string AfterId { get; set; }
58765876
public string BeforeId { get; set; }
58775877
public VectorStoreFileStatusFilter? Filter { get; set; }
5878-
public VectorStoreFileAssociationOrder? Order { get; set; }
5878+
public VectorStoreFileAssociationCollectionOrder? Order { get; set; }
58795879
public int? PageSizeLimit { get; set; }
58805880
protected virtual VectorStoreFileAssociationCollectionOptions JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options);
58815881
protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options);
58825882
protected virtual VectorStoreFileAssociationCollectionOptions PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options);
58835883
protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options);
58845884
}
58855885
[Experimental("OPENAI001")]
5886+
public readonly partial struct VectorStoreFileAssociationCollectionOrder : IEquatable<VectorStoreFileAssociationCollectionOrder> {
5887+
public VectorStoreFileAssociationCollectionOrder(string value);
5888+
public static VectorStoreFileAssociationCollectionOrder Ascending { get; }
5889+
public static VectorStoreFileAssociationCollectionOrder Descending { get; }
5890+
public readonly bool Equals(VectorStoreFileAssociationCollectionOrder other);
5891+
[EditorBrowsable(EditorBrowsableState.Never)]
5892+
public override readonly bool Equals(object obj);
5893+
[EditorBrowsable(EditorBrowsableState.Never)]
5894+
public override readonly int GetHashCode();
5895+
public static bool operator ==(VectorStoreFileAssociationCollectionOrder left, VectorStoreFileAssociationCollectionOrder right);
5896+
public static implicit operator VectorStoreFileAssociationCollectionOrder(string value);
5897+
public static implicit operator VectorStoreFileAssociationCollectionOrder?(string value);
5898+
public static bool operator !=(VectorStoreFileAssociationCollectionOrder left, VectorStoreFileAssociationCollectionOrder right);
5899+
public override readonly string ToString();
5900+
}
5901+
[Experimental("OPENAI001")]
58865902
public class VectorStoreFileAssociationError : IJsonModel<VectorStoreFileAssociationError>, IPersistableModel<VectorStoreFileAssociationError> {
58875903
public VectorStoreFileAssociationErrorCode Code { get; }
58885904
public string Message { get; }
@@ -5909,22 +5925,6 @@ public class VectorStoreFileAssociationError : IJsonModel<VectorStoreFileAssocia
59095925
public override readonly string ToString();
59105926
}
59115927
[Experimental("OPENAI001")]
5912-
public readonly partial struct VectorStoreFileAssociationOrder : IEquatable<VectorStoreFileAssociationOrder> {
5913-
public VectorStoreFileAssociationOrder(string value);
5914-
public static VectorStoreFileAssociationOrder Ascending { get; }
5915-
public static VectorStoreFileAssociationOrder Descending { get; }
5916-
public readonly bool Equals(VectorStoreFileAssociationOrder other);
5917-
[EditorBrowsable(EditorBrowsableState.Never)]
5918-
public override readonly bool Equals(object obj);
5919-
[EditorBrowsable(EditorBrowsableState.Never)]
5920-
public override readonly int GetHashCode();
5921-
public static bool operator ==(VectorStoreFileAssociationOrder left, VectorStoreFileAssociationOrder right);
5922-
public static implicit operator VectorStoreFileAssociationOrder(string value);
5923-
public static implicit operator VectorStoreFileAssociationOrder?(string value);
5924-
public static bool operator !=(VectorStoreFileAssociationOrder left, VectorStoreFileAssociationOrder right);
5925-
public override readonly string ToString();
5926-
}
5927-
[Experimental("OPENAI001")]
59285928
public enum VectorStoreFileAssociationStatus {
59295929
Unknown = 0,
59305930
InProgress = 1,

api/OpenAI.netstandard2.0.cs

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -5219,13 +5219,28 @@ public class VectorStoreFileAssociationCollectionOptions : IJsonModel<VectorStor
52195219
public string AfterId { get; set; }
52205220
public string BeforeId { get; set; }
52215221
public VectorStoreFileStatusFilter? Filter { get; set; }
5222-
public VectorStoreFileAssociationOrder? Order { get; set; }
5222+
public VectorStoreFileAssociationCollectionOrder? Order { get; set; }
52235223
public int? PageSizeLimit { get; set; }
52245224
protected virtual VectorStoreFileAssociationCollectionOptions JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options);
52255225
protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options);
52265226
protected virtual VectorStoreFileAssociationCollectionOptions PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options);
52275227
protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options);
52285228
}
5229+
public readonly partial struct VectorStoreFileAssociationCollectionOrder : IEquatable<VectorStoreFileAssociationCollectionOrder> {
5230+
public VectorStoreFileAssociationCollectionOrder(string value);
5231+
public static VectorStoreFileAssociationCollectionOrder Ascending { get; }
5232+
public static VectorStoreFileAssociationCollectionOrder Descending { get; }
5233+
public readonly bool Equals(VectorStoreFileAssociationCollectionOrder other);
5234+
[EditorBrowsable(EditorBrowsableState.Never)]
5235+
public override readonly bool Equals(object obj);
5236+
[EditorBrowsable(EditorBrowsableState.Never)]
5237+
public override readonly int GetHashCode();
5238+
public static bool operator ==(VectorStoreFileAssociationCollectionOrder left, VectorStoreFileAssociationCollectionOrder right);
5239+
public static implicit operator VectorStoreFileAssociationCollectionOrder(string value);
5240+
public static implicit operator VectorStoreFileAssociationCollectionOrder?(string value);
5241+
public static bool operator !=(VectorStoreFileAssociationCollectionOrder left, VectorStoreFileAssociationCollectionOrder right);
5242+
public override readonly string ToString();
5243+
}
52295244
public class VectorStoreFileAssociationError : IJsonModel<VectorStoreFileAssociationError>, IPersistableModel<VectorStoreFileAssociationError> {
52305245
public VectorStoreFileAssociationErrorCode Code { get; }
52315246
public string Message { get; }
@@ -5250,21 +5265,6 @@ public class VectorStoreFileAssociationError : IJsonModel<VectorStoreFileAssocia
52505265
public static bool operator !=(VectorStoreFileAssociationErrorCode left, VectorStoreFileAssociationErrorCode right);
52515266
public override readonly string ToString();
52525267
}
5253-
public readonly partial struct VectorStoreFileAssociationOrder : IEquatable<VectorStoreFileAssociationOrder> {
5254-
public VectorStoreFileAssociationOrder(string value);
5255-
public static VectorStoreFileAssociationOrder Ascending { get; }
5256-
public static VectorStoreFileAssociationOrder Descending { get; }
5257-
public readonly bool Equals(VectorStoreFileAssociationOrder other);
5258-
[EditorBrowsable(EditorBrowsableState.Never)]
5259-
public override readonly bool Equals(object obj);
5260-
[EditorBrowsable(EditorBrowsableState.Never)]
5261-
public override readonly int GetHashCode();
5262-
public static bool operator ==(VectorStoreFileAssociationOrder left, VectorStoreFileAssociationOrder right);
5263-
public static implicit operator VectorStoreFileAssociationOrder(string value);
5264-
public static implicit operator VectorStoreFileAssociationOrder?(string value);
5265-
public static bool operator !=(VectorStoreFileAssociationOrder left, VectorStoreFileAssociationOrder right);
5266-
public override readonly string ToString();
5267-
}
52685268
public enum VectorStoreFileAssociationStatus {
52695269
Unknown = 0,
52705270
InProgress = 1,

specification/client/models/vector-stores.models.tsp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,15 +44,15 @@ model VectorStoreCollectionOptions {
4444
}
4545

4646

47-
alias VectorStoreFileAssociationOrderQueryParameter = {
47+
alias VectorStoreFileAssociationCollectionOrderQueryParameter = {
4848
/**
4949
* Sort order by the `created_at` timestamp of the objects. `asc` for ascending order and`desc`
5050
* for descending order.
5151
*/
52-
@query order?: VectorStoreFileAssociationOrder;
52+
@query order?: VectorStoreFileAssociationCollectionOrder;
5353
};
5454

55-
union VectorStoreFileAssociationOrder {
55+
union VectorStoreFileAssociationCollectionOrder {
5656
string,
5757
Ascending: "asc",
5858
Descending: "desc",
@@ -64,7 +64,7 @@ model VectorStoreFileAssociationCollectionOptions {
6464
...CollectionAfterQueryParameter,
6565
...CollectionBeforeQueryParameter,
6666
...CollectionLimitQueryParameter,
67-
...VectorStoreFileAssociationOrderQueryParameter,
67+
...VectorStoreFileAssociationCollectionOrderQueryParameter,
6868

6969
@query filter?: ListVectorStoreFilesFilter;
7070
}

src/Custom/VectorStores/GeneratorStubs.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ namespace OpenAI.VectorStores;
33
/// <summary> The options to configure how <see cref="VectorStore"/> objects are retrieved and paginated. </summary>
44
// Customization: fix namespace
55
[CodeGenType("VectorStoreFileAssociationCollectionOptions")] public partial class VectorStoreFileAssociationCollectionOptions{ }
6-
[CodeGenType("VectorStoreFileAssociationOrder")] public partial struct VectorStoreFileAssociationOrder{ }
6+
[CodeGenType("VectorStoreFileAssociationCollectionOrder")] public partial struct VectorStoreFileAssociationCollectionOrder{ }

src/Generated/Models/VectorStores/VectorStoreFileAssociationCollectionOptions.Serialization.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ internal static VectorStoreFileAssociationCollectionOptions DeserializeVectorSto
7070
string afterId = default;
7171
string beforeId = default;
7272
int? pageSizeLimit = default;
73-
VectorStoreFileAssociationOrder? order = default;
73+
VectorStoreFileAssociationCollectionOrder? order = default;
7474
VectorStoreFileStatusFilter? filter = default;
7575
IDictionary<string, BinaryData> additionalBinaryDataProperties = new ChangeTrackingDictionary<string, BinaryData>();
7676
foreach (var prop in element.EnumerateObject())

src/Generated/Models/VectorStores/VectorStoreFileAssociationCollectionOptions.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ public VectorStoreFileAssociationCollectionOptions()
1717
{
1818
}
1919

20-
internal VectorStoreFileAssociationCollectionOptions(string afterId, string beforeId, int? pageSizeLimit, VectorStoreFileAssociationOrder? order, VectorStoreFileStatusFilter? filter, IDictionary<string, BinaryData> additionalBinaryDataProperties)
20+
internal VectorStoreFileAssociationCollectionOptions(string afterId, string beforeId, int? pageSizeLimit, VectorStoreFileAssociationCollectionOrder? order, VectorStoreFileStatusFilter? filter, IDictionary<string, BinaryData> additionalBinaryDataProperties)
2121
{
2222
AfterId = afterId;
2323
BeforeId = beforeId;
@@ -33,7 +33,7 @@ internal VectorStoreFileAssociationCollectionOptions(string afterId, string befo
3333

3434
public int? PageSizeLimit { get; set; }
3535

36-
public VectorStoreFileAssociationOrder? Order { get; set; }
36+
public VectorStoreFileAssociationCollectionOrder? Order { get; set; }
3737

3838
public VectorStoreFileStatusFilter? Filter { get; set; }
3939

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
// <auto-generated/>
2+
3+
#nullable disable
4+
5+
using System;
6+
using System.ComponentModel;
7+
using System.Diagnostics.CodeAnalysis;
8+
using OpenAI;
9+
10+
namespace OpenAI.VectorStores
11+
{
12+
[Experimental("OPENAI001")]
13+
public readonly partial struct VectorStoreFileAssociationCollectionOrder : IEquatable<VectorStoreFileAssociationCollectionOrder>
14+
{
15+
private readonly string _value;
16+
private const string AscendingValue = "asc";
17+
private const string DescendingValue = "desc";
18+
19+
public VectorStoreFileAssociationCollectionOrder(string value)
20+
{
21+
Argument.AssertNotNull(value, nameof(value));
22+
23+
_value = value;
24+
}
25+
26+
public static VectorStoreFileAssociationCollectionOrder Ascending { get; } = new VectorStoreFileAssociationCollectionOrder(AscendingValue);
27+
28+
public static VectorStoreFileAssociationCollectionOrder Descending { get; } = new VectorStoreFileAssociationCollectionOrder(DescendingValue);
29+
30+
public static bool operator ==(VectorStoreFileAssociationCollectionOrder left, VectorStoreFileAssociationCollectionOrder right) => left.Equals(right);
31+
32+
public static bool operator !=(VectorStoreFileAssociationCollectionOrder left, VectorStoreFileAssociationCollectionOrder right) => !left.Equals(right);
33+
34+
public static implicit operator VectorStoreFileAssociationCollectionOrder(string value) => new VectorStoreFileAssociationCollectionOrder(value);
35+
36+
public static implicit operator VectorStoreFileAssociationCollectionOrder?(string value) => value == null ? null : new VectorStoreFileAssociationCollectionOrder(value);
37+
38+
[EditorBrowsable(EditorBrowsableState.Never)]
39+
public override bool Equals(object obj) => obj is VectorStoreFileAssociationCollectionOrder other && Equals(other);
40+
41+
public bool Equals(VectorStoreFileAssociationCollectionOrder other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase);
42+
43+
[EditorBrowsable(EditorBrowsableState.Never)]
44+
public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0;
45+
46+
public override string ToString() => _value;
47+
}
48+
}

src/Generated/Models/VectorStores/VectorStoreFileAssociationOrder.cs

Lines changed: 0 additions & 48 deletions
This file was deleted.

src/Generated/OpenAIModelFactory.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1204,7 +1204,7 @@ public static VectorStoreCollectionOptions VectorStoreCollectionOptions(string a
12041204
return new VectorStoreCollectionOptions(afterId, beforeId, pageSizeLimit, order, additionalBinaryDataProperties: null);
12051205
}
12061206

1207-
public static VectorStoreFileAssociationCollectionOptions VectorStoreFileAssociationCollectionOptions(string afterId = default, string beforeId = default, int? pageSizeLimit = default, VectorStoreFileAssociationOrder? order = default, VectorStoreFileStatusFilter? filter = default)
1207+
public static VectorStoreFileAssociationCollectionOptions VectorStoreFileAssociationCollectionOptions(string afterId = default, string beforeId = default, int? pageSizeLimit = default, VectorStoreFileAssociationCollectionOrder? order = default, VectorStoreFileStatusFilter? filter = default)
12081208
{
12091209
return new VectorStoreFileAssociationCollectionOptions(
12101210
afterId,

tests/Assistants/Assistants.VectorStoresTests.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -516,12 +516,12 @@ public async Task CanTestGetFileAssociationsInBatchAsyncCollectionOptions()
516516
// Test Order property - Ascending vs Descending
517517
var ascendingOptions = new VectorStoreFileAssociationCollectionOptions
518518
{
519-
Order = VectorStoreFileAssociationOrder.Ascending,
519+
Order = VectorStoreFileAssociationCollectionOrder.Ascending,
520520
PageSizeLimit = 5
521521
};
522522
var descendingOptions = new VectorStoreFileAssociationCollectionOptions
523523
{
524-
Order = VectorStoreFileAssociationOrder.Descending,
524+
Order = VectorStoreFileAssociationCollectionOrder.Descending,
525525
PageSizeLimit = 5
526526
};
527527

@@ -564,7 +564,7 @@ public async Task CanTestGetFileAssociationsInBatchAsyncCollectionOptions()
564564
var afterOptions = new VectorStoreFileAssociationCollectionOptions
565565
{
566566
AfterId = firstAssociation,
567-
Order = VectorStoreFileAssociationOrder.Ascending
567+
Order = VectorStoreFileAssociationCollectionOrder.Ascending
568568
};
569569

570570
List<string> afterIds = new List<string>();
@@ -586,7 +586,7 @@ public async Task CanTestGetFileAssociationsInBatchAsyncCollectionOptions()
586586
var beforeOptions = new VectorStoreFileAssociationCollectionOptions
587587
{
588588
BeforeId = lastAssociation,
589-
Order = VectorStoreFileAssociationOrder.Ascending
589+
Order = VectorStoreFileAssociationCollectionOrder.Ascending
590590
};
591591

592592
List<string> beforeIds = new List<string>();

0 commit comments

Comments
 (0)