Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,15 @@ public enum AudioSpeechRequestModel
/// <summary>
///
/// </summary>
CanopylabsOrpheus3b01Ft,
CanopylabsDivideorpheus3b01Ft,
/// <summary>
///
/// </summary>
CartesiaSonic,
CartesiaDividesonic,
/// <summary>
///
/// </summary>
HexgradKokoro82m,
HexgradDivideKokoro82m,
}

/// <summary>
Expand All @@ -34,9 +34,9 @@ public static string ToValueString(this AudioSpeechRequestModel value)
{
return value switch
{
AudioSpeechRequestModel.CanopylabsOrpheus3b01Ft => "canopylabs/orpheus-3b-0.1-ft",
AudioSpeechRequestModel.CartesiaSonic => "cartesia/sonic",
AudioSpeechRequestModel.HexgradKokoro82m => "hexgrad/Kokoro-82M",
AudioSpeechRequestModel.CanopylabsDivideorpheus3b01Ft => "canopylabs/orpheus-3b-0.1-ft",
AudioSpeechRequestModel.CartesiaDividesonic => "cartesia/sonic",
AudioSpeechRequestModel.HexgradDivideKokoro82m => "hexgrad/Kokoro-82M",
_ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null),
};
}
Expand All @@ -47,9 +47,9 @@ public static string ToValueString(this AudioSpeechRequestModel value)
{
return value switch
{
"canopylabs/orpheus-3b-0.1-ft" => AudioSpeechRequestModel.CanopylabsOrpheus3b01Ft,
"cartesia/sonic" => AudioSpeechRequestModel.CartesiaSonic,
"hexgrad/Kokoro-82M" => AudioSpeechRequestModel.HexgradKokoro82m,
"canopylabs/orpheus-3b-0.1-ft" => AudioSpeechRequestModel.CanopylabsDivideorpheus3b01Ft,
"cartesia/sonic" => AudioSpeechRequestModel.CartesiaDividesonic,
"hexgrad/Kokoro-82M" => AudioSpeechRequestModel.HexgradDivideKokoro82m,
_ => null,
};
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,15 +39,15 @@ public sealed partial class AudioSpeechStreamChunk
/// <summary>
/// Initializes a new instance of the <see cref="AudioSpeechStreamChunk" /> class.
/// </summary>
/// <param name="object">
/// The object type, which is always `audio.tts.chunk`.
/// </param>
/// <param name="model">
/// Example: cartesia/sonic
/// </param>
/// <param name="b64">
/// base64 encoded audio stream
/// </param>
/// <param name="object">
/// The object type, which is always `audio.tts.chunk`.
/// </param>
#if NET7_0_OR_GREATER
[global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers]
#endif
Expand All @@ -56,9 +56,9 @@ public AudioSpeechStreamChunk(
string b64,
string @object = "audio.tts.chunk")
{
this.Object = @object;
this.Model = model ?? throw new global::System.ArgumentNullException(nameof(model));
this.B64 = b64 ?? throw new global::System.ArgumentNullException(nameof(b64));
this.Object = @object;
}

/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ public enum AudioTranscriptionRequestModel
/// <summary>
///
/// </summary>
OpenaiWhisperLargeV3,
OpenaiDividewhisperLargeV3,
}

/// <summary>
Expand All @@ -27,7 +27,7 @@ public static string ToValueString(this AudioTranscriptionRequestModel value)
{
return value switch
{
AudioTranscriptionRequestModel.OpenaiWhisperLargeV3 => "openai/whisper-large-v3",
AudioTranscriptionRequestModel.OpenaiDividewhisperLargeV3 => "openai/whisper-large-v3",
_ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null),
};
}
Expand All @@ -38,7 +38,7 @@ public static string ToValueString(this AudioTranscriptionRequestModel value)
{
return value switch
{
"openai/whisper-large-v3" => AudioTranscriptionRequestModel.OpenaiWhisperLargeV3,
"openai/whisper-large-v3" => AudioTranscriptionRequestModel.OpenaiDividewhisperLargeV3,
_ => null,
};
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ public enum AudioTranslationRequestModel
/// <summary>
///
/// </summary>
OpenaiWhisperLargeV3,
OpenaiDividewhisperLargeV3,
}

/// <summary>
Expand All @@ -27,7 +27,7 @@ public static string ToValueString(this AudioTranslationRequestModel value)
{
return value switch
{
AudioTranslationRequestModel.OpenaiWhisperLargeV3 => "openai/whisper-large-v3",
AudioTranslationRequestModel.OpenaiDividewhisperLargeV3 => "openai/whisper-large-v3",
_ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null),
};
}
Expand All @@ -38,7 +38,7 @@ public static string ToValueString(this AudioTranslationRequestModel value)
{
return value switch
{
"openai/whisper-large-v3" => AudioTranslationRequestModel.OpenaiWhisperLargeV3,
"openai/whisper-large-v3" => AudioTranslationRequestModel.OpenaiDividewhisperLargeV3,
_ => null,
};
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ public sealed partial class ChatCompletionChoice
/// </summary>
/// <param name="index"></param>
/// <param name="finishReason"></param>
/// <param name="logprobs"></param>
/// <param name="delta"></param>
/// <param name="logprobs"></param>
#if NET7_0_OR_GREATER
[global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers]
#endif
Expand All @@ -60,8 +60,8 @@ public ChatCompletionChoice(
{
this.Index = index;
this.FinishReason = finishReason;
this.Delta = delta ?? throw new global::System.ArgumentNullException(nameof(delta));
this.Logprobs = logprobs;
this.Delta = delta ?? throw new global::System.ArgumentNullException(nameof(delta));
}

/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@ public sealed partial class ChatCompletionChoiceDelta
/// <summary>
/// Initializes a new instance of the <see cref="ChatCompletionChoiceDelta" /> class.
/// </summary>
/// <param name="tokenId"></param>
/// <param name="role"></param>
/// <param name="tokenId"></param>
/// <param name="content"></param>
/// <param name="toolCalls"></param>
/// <param name="reasoning"></param>
Expand All @@ -73,8 +73,8 @@ public ChatCompletionChoiceDelta(
global::System.Collections.Generic.IList<global::Together.ToolChoice2>? toolCalls,
string? reasoning)
{
this.Role = role;
this.TokenId = tokenId;
this.Role = role;
this.Content = content;
this.ToolCalls = toolCalls;
this.Reasoning = reasoning;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,17 +73,17 @@ public sealed partial class ChatCompletionChunk
/// Initializes a new instance of the <see cref="ChatCompletionChunk" /> class.
/// </summary>
/// <param name="id"></param>
/// <param name="object">
/// The object type, which is always `chat.completion.chunk`.
/// </param>
/// <param name="created"></param>
/// <param name="systemFingerprint"></param>
/// <param name="model">
/// Example: mistralai/Mixtral-8x7B-Instruct-v0.1
/// </param>
/// <param name="choices"></param>
/// <param name="systemFingerprint"></param>
/// <param name="usage"></param>
/// <param name="warnings"></param>
/// <param name="object">
/// The object type, which is always `chat.completion.chunk`.
/// </param>
#if NET7_0_OR_GREATER
[global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers]
#endif
Expand All @@ -98,11 +98,11 @@ public ChatCompletionChunk(
string @object = "chat.completion.chunk")
{
this.Id = id ?? throw new global::System.ArgumentNullException(nameof(id));
this.Object = @object;
this.Created = created;
this.SystemFingerprint = systemFingerprint;
this.Model = model ?? throw new global::System.ArgumentNullException(nameof(model));
this.Choices = choices ?? throw new global::System.ArgumentNullException(nameof(choices));
this.Object = @object;
this.SystemFingerprint = systemFingerprint;
this.Usage = usage;
this.Warnings = warnings;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,12 +59,12 @@ public sealed partial class ChatCompletionChunkChoice
/// </summary>
/// <param name="index"></param>
/// <param name="finishReason"></param>
/// <param name="delta"></param>
/// <param name="logprobs"></param>
/// <param name="topLogprobs">
/// Top log probabilities for the tokens.
/// </param>
/// <param name="seed"></param>
/// <param name="delta"></param>
#if NET7_0_OR_GREATER
[global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers]
#endif
Expand All @@ -78,10 +78,10 @@ public ChatCompletionChunkChoice(
{
this.Index = index;
this.FinishReason = finishReason;
this.Delta = delta ?? throw new global::System.ArgumentNullException(nameof(delta));
this.Logprobs = logprobs;
this.TopLogprobs = topLogprobs;
this.Seed = seed;
this.Delta = delta ?? throw new global::System.ArgumentNullException(nameof(delta));
}

/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@ public sealed partial class ChatCompletionChunkChoiceDelta
/// <summary>
/// Initializes a new instance of the <see cref="ChatCompletionChunkChoiceDelta" /> class.
/// </summary>
/// <param name="tokenId"></param>
/// <param name="role"></param>
/// <param name="tokenId"></param>
/// <param name="content"></param>
/// <param name="reasoning"></param>
/// <param name="toolCalls"></param>
Expand All @@ -73,8 +73,8 @@ public ChatCompletionChunkChoiceDelta(
string? reasoning,
global::System.Collections.Generic.IList<global::Together.ToolChoice2>? toolCalls)
{
this.Role = role;
this.TokenId = tokenId;
this.Role = role;
this.Content = content;
this.Reasoning = reasoning;
this.ToolCalls = toolCalls;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,9 @@ public sealed partial class ChatCompletionFunctionMessageParam
/// <summary>
/// Initializes a new instance of the <see cref="ChatCompletionFunctionMessageParam" /> class.
/// </summary>
/// <param name="role"></param>
/// <param name="content"></param>
/// <param name="name"></param>
/// <param name="role"></param>
#if NET7_0_OR_GREATER
[global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers]
#endif
Expand All @@ -53,9 +53,9 @@ public ChatCompletionFunctionMessageParam(
string name,
global::Together.ChatCompletionFunctionMessageParamRole role)
{
this.Role = role;
this.Content = content ?? throw new global::System.ArgumentNullException(nameof(content));
this.Name = name ?? throw new global::System.ArgumentNullException(nameof(name));
this.Role = role;
}

/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,16 +73,16 @@ public sealed partial class ChatCompletionResponse
/// </summary>
/// <param name="id"></param>
/// <param name="choices"></param>
/// <param name="usage"></param>
/// <param name="created"></param>
/// <param name="model"></param>
/// <param name="prompt">
/// When `echo` is true, the prompt is included in the response. Additionally, when `logprobs` is also provided, log probability information is provided on the prompt.
/// </param>
/// <param name="usage"></param>
/// <param name="warnings"></param>
/// <param name="object">
/// The object type, which is always `chat.completion`.
/// </param>
/// <param name="warnings"></param>
#if NET7_0_OR_GREATER
[global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers]
#endif
Expand All @@ -98,10 +98,10 @@ public ChatCompletionResponse(
{
this.Id = id ?? throw new global::System.ArgumentNullException(nameof(id));
this.Choices = choices ?? throw new global::System.ArgumentNullException(nameof(choices));
this.Usage = usage;
this.Created = created;
this.Model = model ?? throw new global::System.ArgumentNullException(nameof(model));
this.Prompt = prompt ?? throw new global::System.ArgumentNullException(nameof(prompt));
this.Usage = usage;
this.Object = @object;
this.Warnings = warnings;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,17 +31,17 @@ public sealed partial class ChatCompletionTool
/// <summary>
/// Initializes a new instance of the <see cref="ChatCompletionTool" /> class.
/// </summary>
/// <param name="type"></param>
/// <param name="function"></param>
/// <param name="type"></param>
#if NET7_0_OR_GREATER
[global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers]
#endif
public ChatCompletionTool(
global::Together.ChatCompletionToolFunction function,
global::Together.ChatCompletionToolType type)
{
this.Function = function ?? throw new global::System.ArgumentNullException(nameof(function));
this.Type = type;
this.Function = function ?? throw new global::System.ArgumentNullException(nameof(function));
}

/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ public sealed partial class ChatCompletionToolFunction
/// <summary>
/// Initializes a new instance of the <see cref="ChatCompletionToolFunction" /> class.
/// </summary>
/// <param name="description"></param>
/// <param name="name"></param>
/// <param name="description"></param>
/// <param name="parameters"></param>
#if NET7_0_OR_GREATER
[global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers]
Expand All @@ -47,8 +47,8 @@ public ChatCompletionToolFunction(
string? description,
object? parameters)
{
this.Name = name ?? throw new global::System.ArgumentNullException(nameof(name));
this.Description = description;
this.Name = name ?? throw new global::System.ArgumentNullException(nameof(name));
this.Parameters = parameters;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,10 @@ public sealed partial class ChatCompletionToolMessageParam
/// <summary>
/// Initializes a new instance of the <see cref="ChatCompletionToolMessageParam" /> class.
/// </summary>
/// <param name="name"></param>
/// <param name="role"></param>
/// <param name="content"></param>
/// <param name="toolCallId"></param>
/// <param name="name"></param>
/// <param name="role"></param>
#if NET7_0_OR_GREATER
[global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers]
#endif
Expand All @@ -57,10 +57,10 @@ public ChatCompletionToolMessageParam(
string? name,
global::Together.ChatCompletionToolMessageParamRole role)
{
this.Content = content ?? throw new global::System.ArgumentNullException(nameof(content));
this.ToolCallId = toolCallId ?? throw new global::System.ArgumentNullException(nameof(toolCallId));
this.Name = name;
this.Role = role;
this.Content = content ?? throw new global::System.ArgumentNullException(nameof(content));
this.ToolCallId = toolCallId ?? throw new global::System.ArgumentNullException(nameof(toolCallId));
}

/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,17 +31,17 @@ public sealed partial class ChatCompletionUserMessageContentMultimodalItemAudio
/// <summary>
/// Initializes a new instance of the <see cref="ChatCompletionUserMessageContentMultimodalItemAudio" /> class.
/// </summary>
/// <param name="type"></param>
/// <param name="audioUrl"></param>
/// <param name="type"></param>
#if NET7_0_OR_GREATER
[global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers]
#endif
public ChatCompletionUserMessageContentMultimodalItemAudio(
global::Together.ChatCompletionUserMessageContentMultimodalItemAudioAudioUrl audioUrl,
global::Together.ChatCompletionUserMessageContentMultimodalItemAudioType type)
{
this.AudioUrl = audioUrl ?? throw new global::System.ArgumentNullException(nameof(audioUrl));
this.Type = type;
this.AudioUrl = audioUrl ?? throw new global::System.ArgumentNullException(nameof(audioUrl));
}

/// <summary>
Expand Down
Loading