Skip to content

Commit 2815731

Browse files
committed
cleanup
1 parent 2a3f4ed commit 2815731

File tree

4 files changed

+183
-13
lines changed

4 files changed

+183
-13
lines changed

api/OpenAI.net8.0.cs

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -138,20 +138,16 @@ public class AssistantClient {
138138
public virtual ClientResult<ThreadRun> GetRun(string threadId, string runId, CancellationToken cancellationToken = default);
139139
public virtual Task<ClientResult> GetRunAsync(string threadId, string runId, RequestOptions options);
140140
public virtual Task<ClientResult<ThreadRun>> GetRunAsync(string threadId, string runId, CancellationToken cancellationToken = default);
141-
public virtual CollectionResult<ThreadRun> GetRuns(ContinuationToken firstPageToken, CancellationToken cancellationToken = default);
142141
public virtual CollectionResult<ThreadRun> GetRuns(string threadId, RunCollectionOptions options = null, CancellationToken cancellationToken = default);
143142
public virtual CollectionResult GetRuns(string threadId, int? limit, string order, string after, string before, RequestOptions options);
144-
public virtual AsyncCollectionResult<ThreadRun> GetRunsAsync(ContinuationToken firstPageToken, CancellationToken cancellationToken = default);
145143
public virtual AsyncCollectionResult<ThreadRun> GetRunsAsync(string threadId, RunCollectionOptions options = null, CancellationToken cancellationToken = default);
146144
public virtual AsyncCollectionResult GetRunsAsync(string threadId, int? limit, string order, string after, string before, RequestOptions options);
147145
public virtual ClientResult GetRunStep(string threadId, string runId, string stepId, RequestOptions options);
148146
public virtual ClientResult<RunStep> GetRunStep(string threadId, string runId, string stepId, CancellationToken cancellationToken = default);
149147
public virtual Task<ClientResult> GetRunStepAsync(string threadId, string runId, string stepId, RequestOptions options);
150148
public virtual Task<ClientResult<RunStep>> GetRunStepAsync(string threadId, string runId, string stepId, CancellationToken cancellationToken = default);
151-
public virtual CollectionResult<RunStep> GetRunSteps(ContinuationToken firstPageToken, CancellationToken cancellationToken = default);
152149
public virtual CollectionResult<RunStep> GetRunSteps(string threadId, string runId, RunStepCollectionOptions options = null, CancellationToken cancellationToken = default);
153150
public virtual CollectionResult GetRunSteps(string threadId, string runId, int? limit, string order, string after, string before, RequestOptions options);
154-
public virtual AsyncCollectionResult<RunStep> GetRunStepsAsync(ContinuationToken firstPageToken, CancellationToken cancellationToken = default);
155151
public virtual AsyncCollectionResult<RunStep> GetRunStepsAsync(string threadId, string runId, RunStepCollectionOptions options = null, CancellationToken cancellationToken = default);
156152
public virtual AsyncCollectionResult GetRunStepsAsync(string threadId, string runId, int? limit, string order, string after, string before, RequestOptions options);
157153
public virtual ClientResult GetThread(string threadId, RequestOptions options);
@@ -528,11 +524,15 @@ public class RequiredActionUpdate : RunUpdate {
528524
public ThreadRun GetThreadRun();
529525
}
530526
[Experimental("OPENAI001")]
531-
public class RunCollectionOptions {
527+
public class RunCollectionOptions : IJsonModel<RunCollectionOptions>, IPersistableModel<RunCollectionOptions> {
532528
public string AfterId { get; set; }
533529
public string BeforeId { get; set; }
534530
public RunCollectionOrder? Order { get; set; }
535531
public int? PageSizeLimit { get; set; }
532+
protected virtual RunCollectionOptions JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options);
533+
protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options);
534+
protected virtual RunCollectionOptions PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options);
535+
protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options);
536536
}
537537
[Experimental("OPENAI001")]
538538
public readonly partial struct RunCollectionOrder : IEquatable<RunCollectionOrder> {
@@ -546,6 +546,7 @@ public class RunCollectionOptions {
546546
public override readonly int GetHashCode();
547547
public static bool operator ==(RunCollectionOrder left, RunCollectionOrder right);
548548
public static implicit operator RunCollectionOrder(string value);
549+
public static implicit operator RunCollectionOrder?(string value);
549550
public static bool operator !=(RunCollectionOrder left, RunCollectionOrder right);
550551
public override readonly string ToString();
551552
}
@@ -685,11 +686,15 @@ public abstract class RunStepCodeInterpreterOutput : IJsonModel<RunStepCodeInter
685686
protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options);
686687
}
687688
[Experimental("OPENAI001")]
688-
public class RunStepCollectionOptions {
689+
public class RunStepCollectionOptions : IJsonModel<RunStepCollectionOptions>, IPersistableModel<RunStepCollectionOptions> {
689690
public string AfterId { get; set; }
690691
public string BeforeId { get; set; }
691692
public RunStepCollectionOrder? Order { get; set; }
692693
public int? PageSizeLimit { get; set; }
694+
protected virtual RunStepCollectionOptions JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options);
695+
protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options);
696+
protected virtual RunStepCollectionOptions PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options);
697+
protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options);
693698
}
694699
[Experimental("OPENAI001")]
695700
public readonly partial struct RunStepCollectionOrder : IEquatable<RunStepCollectionOrder> {
@@ -703,6 +708,7 @@ public class RunStepCollectionOptions {
703708
public override readonly int GetHashCode();
704709
public static bool operator ==(RunStepCollectionOrder left, RunStepCollectionOrder right);
705710
public static implicit operator RunStepCollectionOrder(string value);
711+
public static implicit operator RunStepCollectionOrder?(string value);
706712
public static bool operator !=(RunStepCollectionOrder left, RunStepCollectionOrder right);
707713
public override readonly string ToString();
708714
}

api/OpenAI.netstandard2.0.cs

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -125,20 +125,16 @@ public class AssistantClient {
125125
public virtual ClientResult<ThreadRun> GetRun(string threadId, string runId, CancellationToken cancellationToken = default);
126126
public virtual Task<ClientResult> GetRunAsync(string threadId, string runId, RequestOptions options);
127127
public virtual Task<ClientResult<ThreadRun>> GetRunAsync(string threadId, string runId, CancellationToken cancellationToken = default);
128-
public virtual CollectionResult<ThreadRun> GetRuns(ContinuationToken firstPageToken, CancellationToken cancellationToken = default);
129128
public virtual CollectionResult<ThreadRun> GetRuns(string threadId, RunCollectionOptions options = null, CancellationToken cancellationToken = default);
130129
public virtual CollectionResult GetRuns(string threadId, int? limit, string order, string after, string before, RequestOptions options);
131-
public virtual AsyncCollectionResult<ThreadRun> GetRunsAsync(ContinuationToken firstPageToken, CancellationToken cancellationToken = default);
132130
public virtual AsyncCollectionResult<ThreadRun> GetRunsAsync(string threadId, RunCollectionOptions options = null, CancellationToken cancellationToken = default);
133131
public virtual AsyncCollectionResult GetRunsAsync(string threadId, int? limit, string order, string after, string before, RequestOptions options);
134132
public virtual ClientResult GetRunStep(string threadId, string runId, string stepId, RequestOptions options);
135133
public virtual ClientResult<RunStep> GetRunStep(string threadId, string runId, string stepId, CancellationToken cancellationToken = default);
136134
public virtual Task<ClientResult> GetRunStepAsync(string threadId, string runId, string stepId, RequestOptions options);
137135
public virtual Task<ClientResult<RunStep>> GetRunStepAsync(string threadId, string runId, string stepId, CancellationToken cancellationToken = default);
138-
public virtual CollectionResult<RunStep> GetRunSteps(ContinuationToken firstPageToken, CancellationToken cancellationToken = default);
139136
public virtual CollectionResult<RunStep> GetRunSteps(string threadId, string runId, RunStepCollectionOptions options = null, CancellationToken cancellationToken = default);
140137
public virtual CollectionResult GetRunSteps(string threadId, string runId, int? limit, string order, string after, string before, RequestOptions options);
141-
public virtual AsyncCollectionResult<RunStep> GetRunStepsAsync(ContinuationToken firstPageToken, CancellationToken cancellationToken = default);
142138
public virtual AsyncCollectionResult<RunStep> GetRunStepsAsync(string threadId, string runId, RunStepCollectionOptions options = null, CancellationToken cancellationToken = default);
143139
public virtual AsyncCollectionResult GetRunStepsAsync(string threadId, string runId, int? limit, string order, string after, string before, RequestOptions options);
144140
public virtual ClientResult GetThread(string threadId, RequestOptions options);
@@ -484,11 +480,15 @@ public class RequiredActionUpdate : RunUpdate {
484480
public string ToolCallId { get; }
485481
public ThreadRun GetThreadRun();
486482
}
487-
public class RunCollectionOptions {
483+
public class RunCollectionOptions : IJsonModel<RunCollectionOptions>, IPersistableModel<RunCollectionOptions> {
488484
public string AfterId { get; set; }
489485
public string BeforeId { get; set; }
490486
public RunCollectionOrder? Order { get; set; }
491487
public int? PageSizeLimit { get; set; }
488+
protected virtual RunCollectionOptions JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options);
489+
protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options);
490+
protected virtual RunCollectionOptions PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options);
491+
protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options);
492492
}
493493
public readonly partial struct RunCollectionOrder : IEquatable<RunCollectionOrder> {
494494
public RunCollectionOrder(string value);
@@ -501,6 +501,7 @@ public class RunCollectionOptions {
501501
public override readonly int GetHashCode();
502502
public static bool operator ==(RunCollectionOrder left, RunCollectionOrder right);
503503
public static implicit operator RunCollectionOrder(string value);
504+
public static implicit operator RunCollectionOrder?(string value);
504505
public static bool operator !=(RunCollectionOrder left, RunCollectionOrder right);
505506
public override readonly string ToString();
506507
}
@@ -630,11 +631,15 @@ public abstract class RunStepCodeInterpreterOutput : IJsonModel<RunStepCodeInter
630631
protected virtual RunStepCodeInterpreterOutput PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options);
631632
protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options);
632633
}
633-
public class RunStepCollectionOptions {
634+
public class RunStepCollectionOptions : IJsonModel<RunStepCollectionOptions>, IPersistableModel<RunStepCollectionOptions> {
634635
public string AfterId { get; set; }
635636
public string BeforeId { get; set; }
636637
public RunStepCollectionOrder? Order { get; set; }
637638
public int? PageSizeLimit { get; set; }
639+
protected virtual RunStepCollectionOptions JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options);
640+
protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options);
641+
protected virtual RunStepCollectionOptions PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options);
642+
protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options);
638643
}
639644
public readonly partial struct RunStepCollectionOrder : IEquatable<RunStepCollectionOrder> {
640645
public RunStepCollectionOrder(string value);
@@ -647,6 +652,7 @@ public class RunStepCollectionOptions {
647652
public override readonly int GetHashCode();
648653
public static bool operator ==(RunStepCollectionOrder left, RunStepCollectionOrder right);
649654
public static implicit operator RunStepCollectionOrder(string value);
655+
public static implicit operator RunStepCollectionOrder?(string value);
650656
public static bool operator !=(RunStepCollectionOrder left, RunStepCollectionOrder right);
651657
public override readonly string ToString();
652658
}

0 commit comments

Comments
 (0)