-
Notifications
You must be signed in to change notification settings - Fork 191
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix deserialization of Run Steps when using File Search
- Loading branch information
1 parent
78f3f96
commit 46f31a5
Showing
17 changed files
with
253 additions
and
122 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,7 @@ | ||
namespace OpenAI.Audio; | ||
|
||
/// <summary> | ||
/// Represents an audio data format available as either input or output into an audio operation. | ||
/// </summary> | ||
/// <summary> The audio format in which to generate the speech. </summary> | ||
[CodeGenModel("CreateSpeechRequestResponseFormat")] | ||
public enum GeneratedSpeechFormat | ||
public readonly partial struct GeneratedSpeechFormat | ||
{ | ||
/// <summary> MP3. /// </summary> | ||
[CodeGenMember("Mp3")] | ||
Mp3, | ||
|
||
/// <summary> Opus. /// </summary> | ||
[CodeGenMember("Opus")] | ||
Opus, | ||
|
||
/// <summary> AAC (advanced audio coding). /// </summary> | ||
[CodeGenMember("Aac")] | ||
Aac, | ||
|
||
/// <summary> FLAC (free lossless audio codec). /// </summary> | ||
[CodeGenMember("Flac")] | ||
Flac, | ||
|
||
/// <summary> WAV. /// </summary> | ||
[CodeGenMember("Wav")] | ||
Wav, | ||
|
||
/// <summary> PCM (pulse-code modulation). /// </summary> | ||
[CodeGenMember("Pcm")] | ||
Pcm, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,38 +1,40 @@ | ||
namespace OpenAI.Audio; | ||
|
||
/// <summary> | ||
/// A representation of additional options available to control the behavior of a text-to-speech audio generation | ||
/// operation. | ||
/// </summary> | ||
/// <summary> The options to configure text-to-speech audio generation. </summary> | ||
[CodeGenModel("CreateSpeechRequest")] | ||
[CodeGenSuppress("SpeechGenerationOptions", typeof(InternalCreateSpeechRequestModel), typeof(string), typeof(GeneratedSpeechVoice))] | ||
public partial class SpeechGenerationOptions | ||
{ | ||
// CUSTOM: | ||
// - Made internal. The model is specified by the client. | ||
// - Added setter. | ||
/// <summary> One of the available [TTS models](/docs/models/tts): `tts-1` or `tts-1-hd`. </summary> | ||
[CodeGenMember("Model")] | ||
internal InternalCreateSpeechRequestModel Model { get; set; } | ||
|
||
// CUSTOM: | ||
// - Made internal. This value comes from a parameter on the client method. | ||
// - Added setter. | ||
/// <summary> The text to generate audio for. The maximum length is 4096 characters. </summary> | ||
[CodeGenMember("Input")] | ||
internal string Input { get; set; } | ||
|
||
// CUSTOM: | ||
// - Made internal. This value comes from a parameter on the client method. | ||
// - Added setter. | ||
/// <summary> | ||
/// The voice to use when generating the audio. Supported voices are `alloy`, `echo`, `fable`, | ||
/// `onyx`, `nova`, and `shimmer`. Previews of the voices are available in the | ||
/// [Text to speech guide](/docs/guides/text-to-speech/voice-options). | ||
/// </summary> | ||
[CodeGenMember("Voice")] | ||
internal GeneratedSpeechVoice Voice { get; set; } | ||
|
||
// CUSTOM: Made public now that there are no required properties. | ||
/// <summary> Initializes a new instance of <see cref="SpeechGenerationOptions"/>. </summary> | ||
public SpeechGenerationOptions() | ||
{ | ||
} | ||
|
||
// CUSTOM: Renamed. | ||
/// <summary> | ||
/// The speed of the generated audio expressed as a ratio between 0.5 and 2.0. The default is 1.0. | ||
/// </summary> | ||
[CodeGenMember("Speed")] | ||
|
||
public float? SpeedRatio { get; set; } | ||
} |
33 changes: 0 additions & 33 deletions
33
src/Generated/Models/GeneratedSpeechFormat.Serialization.cs
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
// <auto-generated/> | ||
|
||
#nullable disable | ||
|
||
using System; | ||
using System.ComponentModel; | ||
|
||
namespace OpenAI.Audio | ||
{ | ||
public readonly partial struct GeneratedSpeechFormat : IEquatable<GeneratedSpeechFormat> | ||
{ | ||
private readonly string _value; | ||
|
||
public GeneratedSpeechFormat(string value) | ||
{ | ||
_value = value ?? throw new ArgumentNullException(nameof(value)); | ||
} | ||
|
||
private const string Mp3Value = "mp3"; | ||
private const string OpusValue = "opus"; | ||
private const string AacValue = "aac"; | ||
private const string FlacValue = "flac"; | ||
private const string WavValue = "wav"; | ||
private const string PcmValue = "pcm"; | ||
|
||
public static GeneratedSpeechFormat Mp3 { get; } = new GeneratedSpeechFormat(Mp3Value); | ||
public static GeneratedSpeechFormat Opus { get; } = new GeneratedSpeechFormat(OpusValue); | ||
public static GeneratedSpeechFormat Aac { get; } = new GeneratedSpeechFormat(AacValue); | ||
public static GeneratedSpeechFormat Flac { get; } = new GeneratedSpeechFormat(FlacValue); | ||
public static GeneratedSpeechFormat Wav { get; } = new GeneratedSpeechFormat(WavValue); | ||
public static GeneratedSpeechFormat Pcm { get; } = new GeneratedSpeechFormat(PcmValue); | ||
public static bool operator ==(GeneratedSpeechFormat left, GeneratedSpeechFormat right) => left.Equals(right); | ||
public static bool operator !=(GeneratedSpeechFormat left, GeneratedSpeechFormat right) => !left.Equals(right); | ||
public static implicit operator GeneratedSpeechFormat(string value) => new GeneratedSpeechFormat(value); | ||
|
||
[EditorBrowsable(EditorBrowsableState.Never)] | ||
public override bool Equals(object obj) => obj is GeneratedSpeechFormat other && Equals(other); | ||
public bool Equals(GeneratedSpeechFormat other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); | ||
|
||
[EditorBrowsable(EditorBrowsableState.Never)] | ||
public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; | ||
public override string ToString() => _value; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.