Skip to content

Commit 443620c

Browse files
committed
Export public API
1 parent d2afa16 commit 443620c

File tree

3 files changed

+38
-0
lines changed

3 files changed

+38
-0
lines changed

api/OpenAI.net8.0.cs

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3828,6 +3828,23 @@ public class ResponseStartedUpdate : RealtimeUpdate, IJsonModel<ResponseStartedU
38283828
protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options);
38293829
}
38303830
[Experimental("OPENAI002")]
3831+
public readonly partial struct SemanticEagernessLevel : IEquatable<SemanticEagernessLevel> {
3832+
public SemanticEagernessLevel(string value);
3833+
public static SemanticEagernessLevel Auto { get; }
3834+
public static SemanticEagernessLevel High { get; }
3835+
public static SemanticEagernessLevel Low { get; }
3836+
public static SemanticEagernessLevel Medium { get; }
3837+
public readonly bool Equals(SemanticEagernessLevel other);
3838+
[EditorBrowsable(EditorBrowsableState.Never)]
3839+
public override readonly bool Equals(object obj);
3840+
[EditorBrowsable(EditorBrowsableState.Never)]
3841+
public override readonly int GetHashCode();
3842+
public static bool operator ==(SemanticEagernessLevel left, SemanticEagernessLevel right);
3843+
public static implicit operator SemanticEagernessLevel(string value);
3844+
public static bool operator !=(SemanticEagernessLevel left, SemanticEagernessLevel right);
3845+
public override readonly string ToString();
3846+
}
3847+
[Experimental("OPENAI002")]
38313848
public class TranscriptionSessionConfiguredUpdate : RealtimeUpdate, IJsonModel<TranscriptionSessionConfiguredUpdate>, IPersistableModel<TranscriptionSessionConfiguredUpdate> {
38323849
public RealtimeContentModalities ContentModalities { get; }
38333850
public RealtimeAudioFormat InputAudioFormat { get; }
@@ -3862,6 +3879,7 @@ public enum TurnDetectionKind {
38623879
public class TurnDetectionOptions : IJsonModel<TurnDetectionOptions>, IPersistableModel<TurnDetectionOptions> {
38633880
public TurnDetectionKind Kind { get; }
38643881
public static TurnDetectionOptions CreateDisabledTurnDetectionOptions();
3882+
public static TurnDetectionOptions CreateSemanticVoiceActivityTurnDetectionOptions(SemanticEagernessLevel? eagernessLevel = null, bool? enableAutomaticResponseCreation = null, bool? enableResponseInterruption = null);
38653883
public static TurnDetectionOptions CreateServerVoiceActivityTurnDetectionOptions(float? detectionThreshold = null, TimeSpan? prefixPaddingDuration = null, TimeSpan? silenceDuration = null, bool? enableAutomaticResponseCreation = null, bool? enableResponseInterruption = null);
38663884
protected virtual TurnDetectionOptions JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options);
38673885
protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options);

api/OpenAI.netstandard2.0.cs

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3370,6 +3370,22 @@ public class ResponseStartedUpdate : RealtimeUpdate, IJsonModel<ResponseStartedU
33703370
protected override RealtimeUpdate PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options);
33713371
protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options);
33723372
}
3373+
public readonly partial struct SemanticEagernessLevel : IEquatable<SemanticEagernessLevel> {
3374+
public SemanticEagernessLevel(string value);
3375+
public static SemanticEagernessLevel Auto { get; }
3376+
public static SemanticEagernessLevel High { get; }
3377+
public static SemanticEagernessLevel Low { get; }
3378+
public static SemanticEagernessLevel Medium { get; }
3379+
public readonly bool Equals(SemanticEagernessLevel other);
3380+
[EditorBrowsable(EditorBrowsableState.Never)]
3381+
public override readonly bool Equals(object obj);
3382+
[EditorBrowsable(EditorBrowsableState.Never)]
3383+
public override readonly int GetHashCode();
3384+
public static bool operator ==(SemanticEagernessLevel left, SemanticEagernessLevel right);
3385+
public static implicit operator SemanticEagernessLevel(string value);
3386+
public static bool operator !=(SemanticEagernessLevel left, SemanticEagernessLevel right);
3387+
public override readonly string ToString();
3388+
}
33733389
public class TranscriptionSessionConfiguredUpdate : RealtimeUpdate, IJsonModel<TranscriptionSessionConfiguredUpdate>, IPersistableModel<TranscriptionSessionConfiguredUpdate> {
33743390
public RealtimeContentModalities ContentModalities { get; }
33753391
public RealtimeAudioFormat InputAudioFormat { get; }
@@ -3401,6 +3417,7 @@ public enum TurnDetectionKind {
34013417
public class TurnDetectionOptions : IJsonModel<TurnDetectionOptions>, IPersistableModel<TurnDetectionOptions> {
34023418
public TurnDetectionKind Kind { get; }
34033419
public static TurnDetectionOptions CreateDisabledTurnDetectionOptions();
3420+
public static TurnDetectionOptions CreateSemanticVoiceActivityTurnDetectionOptions(SemanticEagernessLevel? eagernessLevel = null, bool? enableAutomaticResponseCreation = null, bool? enableResponseInterruption = null);
34043421
public static TurnDetectionOptions CreateServerVoiceActivityTurnDetectionOptions(float? detectionThreshold = null, TimeSpan? prefixPaddingDuration = null, TimeSpan? silenceDuration = null, bool? enableAutomaticResponseCreation = null, bool? enableResponseInterruption = null);
34053422
protected virtual TurnDetectionOptions JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options);
34063423
protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options);

scripts/Export-Api.ps1

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -258,6 +258,9 @@ function Invoke-GenAPI {
258258
# Remove Diagnostics.DebuggerStepThrough attribute.
259259
$content = $content -creplace ".*Diagnostics.DebuggerStepThrough.*\n", ""
260260

261+
# Remove ModelReaderWriterBuildable attributes.
262+
$content = $content -creplace '\[ModelReaderWriterBuildable\(typeof\([^\)]+\)\)\]\s*', ''
263+
261264
# Remove internal APIs.
262265
$content = $content -creplace " * internal.*`n", ""
263266

0 commit comments

Comments
 (0)