From d65ee75f2f0e02793df7b43ee535517874b8414b Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Thu, 31 Jul 2025 18:31:51 +0000 Subject: [PATCH] feat: Updated OpenAPI spec --- ...mblyAI.JsonConverters.LemurTaskParams.g.cs | 27 +------ .../AssemblyAI.Models.LemurTaskParams.g.cs | 68 +---------------- ...mblyAI.Models.LemurTaskParamsVariant1.g.cs | 73 ++++++++++++++++++- src/libs/AssemblyAI/openapi.yaml | 43 ++++++++++- 4 files changed, 116 insertions(+), 95 deletions(-) diff --git a/src/libs/AssemblyAI/Generated/AssemblyAI.JsonConverters.LemurTaskParams.g.cs b/src/libs/AssemblyAI/Generated/AssemblyAI.JsonConverters.LemurTaskParams.g.cs index 33826d4..879f028 100644 --- a/src/libs/AssemblyAI/Generated/AssemblyAI.JsonConverters.LemurTaskParams.g.cs +++ b/src/libs/AssemblyAI/Generated/AssemblyAI.JsonConverters.LemurTaskParams.g.cs @@ -28,21 +28,8 @@ public class LemurTaskParamsJsonConverter : global::System.Text.Json.Serializati { } - readerCopy = reader; - global::AssemblyAI.LemurBaseParams? value2 = default; - try - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::AssemblyAI.LemurBaseParams), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::AssemblyAI.LemurBaseParams).Name}"); - value2 = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo); - } - catch (global::System.Text.Json.JsonException) - { - } - var result = new global::AssemblyAI.LemurTaskParams( - value1, - value2 + value1 ); if (value1 != null) @@ -51,12 +38,6 @@ public class LemurTaskParamsJsonConverter : global::System.Text.Json.Serializati throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::AssemblyAI.LemurTaskParamsVariant1).Name}"); _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); } - else if (value2 != null) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::AssemblyAI.LemurBaseParams), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::AssemblyAI.LemurBaseParams).Name}"); - _ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); - } return result; } @@ -76,12 +57,6 @@ public override void Write( throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::AssemblyAI.LemurTaskParamsVariant1).Name}"); global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value1, typeInfo); } - else if (value.IsValue2) - { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::AssemblyAI.LemurBaseParams), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? - throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::AssemblyAI.LemurBaseParams).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value2, typeInfo); - } } } } \ No newline at end of file diff --git a/src/libs/AssemblyAI/Generated/AssemblyAI.Models.LemurTaskParams.g.cs b/src/libs/AssemblyAI/Generated/AssemblyAI.Models.LemurTaskParams.g.cs index 83076f3..318cfd4 100644 --- a/src/libs/AssemblyAI/Generated/AssemblyAI.Models.LemurTaskParams.g.cs +++ b/src/libs/AssemblyAI/Generated/AssemblyAI.Models.LemurTaskParams.g.cs @@ -44,58 +44,10 @@ public LemurTaskParams(global::AssemblyAI.LemurTaskParamsVariant1? value) Value1 = value; } - /// - /// - /// -#if NET6_0_OR_GREATER - public global::AssemblyAI.LemurBaseParams? Value2 { get; init; } -#else - public global::AssemblyAI.LemurBaseParams? Value2 { get; } -#endif - - /// - /// - /// -#if NET6_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value2))] -#endif - public bool IsValue2 => Value2 != null; - - /// - /// - /// - public static implicit operator LemurTaskParams(global::AssemblyAI.LemurBaseParams value) => new LemurTaskParams((global::AssemblyAI.LemurBaseParams?)value); - - /// - /// - /// - public static implicit operator global::AssemblyAI.LemurBaseParams?(LemurTaskParams @this) => @this.Value2; - - /// - /// - /// - public LemurTaskParams(global::AssemblyAI.LemurBaseParams? value) - { - Value2 = value; - } - - /// - /// - /// - public LemurTaskParams( - global::AssemblyAI.LemurTaskParamsVariant1? value1, - global::AssemblyAI.LemurBaseParams? value2 - ) - { - Value1 = value1; - Value2 = value2; - } - /// /// /// public object? Object => - Value2 as object ?? Value1 as object ; @@ -103,8 +55,7 @@ Value1 as object /// /// public override string? ToString() => - Value1?.ToString() ?? - Value2?.ToString() + Value1?.ToString() ; /// @@ -112,7 +63,7 @@ Value1 as object /// public bool Validate() { - return IsValue1 && IsValue2; + return IsValue1; } /// @@ -120,7 +71,6 @@ public bool Validate() /// public TResult? Match( global::System.Func? value1 = null, - global::System.Func? value2 = null, bool validate = true) { if (validate) @@ -132,10 +82,6 @@ public bool Validate() { return value1(Value1!); } - else if (IsValue2 && value2 != null) - { - return value2(Value2!); - } return default(TResult); } @@ -145,7 +91,6 @@ public bool Validate() /// public void Match( global::System.Action? value1 = null, - global::System.Action? value2 = null, bool validate = true) { if (validate) @@ -157,10 +102,6 @@ public void Match( { value1?.Invoke(Value1!); } - else if (IsValue2) - { - value2?.Invoke(Value2!); - } } /// @@ -172,8 +113,6 @@ public override int GetHashCode() { Value1, typeof(global::AssemblyAI.LemurTaskParamsVariant1), - Value2, - typeof(global::AssemblyAI.LemurBaseParams), }; const int offset = unchecked((int)2166136261); const int prime = 16777619; @@ -190,8 +129,7 @@ static int HashCodeAggregator(int hashCode, object? value) => value == null public bool Equals(LemurTaskParams other) { return - global::System.Collections.Generic.EqualityComparer.Default.Equals(Value1, other.Value1) && - global::System.Collections.Generic.EqualityComparer.Default.Equals(Value2, other.Value2) + global::System.Collections.Generic.EqualityComparer.Default.Equals(Value1, other.Value1) ; } diff --git a/src/libs/AssemblyAI/Generated/AssemblyAI.Models.LemurTaskParamsVariant1.g.cs b/src/libs/AssemblyAI/Generated/AssemblyAI.Models.LemurTaskParamsVariant1.g.cs index 6905e8b..a1eada6 100644 --- a/src/libs/AssemblyAI/Generated/AssemblyAI.Models.LemurTaskParamsVariant1.g.cs +++ b/src/libs/AssemblyAI/Generated/AssemblyAI.Models.LemurTaskParamsVariant1.g.cs @@ -8,6 +8,29 @@ namespace AssemblyAI /// public sealed partial class LemurTaskParamsVariant1 { + /// + /// The model that is used for the final prompt after compression is performed.
+ /// Default Value: default + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("final_model")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::AssemblyAI.JsonConverters.LemurModelJsonConverter))] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::AssemblyAI.LemurModel FinalModel { get; set; } + + /// + /// Custom formatted transcript data. Maximum size is the context limit of the selected model.
+ /// Use either transcript_ids or input_text as input into LeMUR. + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("input_text")] + public string? InputText { get; set; } + + /// + /// Max output size in tokens, up to 4000
+ /// Default Value: 2000 + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("max_output_size")] + public int? MaxOutputSize { get; set; } + /// /// Your text to prompt the model to produce a desired output, including any context you want to pass into the model. /// @@ -15,6 +38,22 @@ public sealed partial class LemurTaskParamsVariant1 [global::System.Text.Json.Serialization.JsonRequired] public required string Prompt { get; set; } + /// + /// The temperature to use for the model.
+ /// Higher values result in answers that are more creative, lower values are more conservative.
+ /// Can be any value between 0.0 and 1.0 inclusive.
+ /// Default Value: 0F + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("temperature")] + public float? Temperature { get; set; } + + /// + /// A list of completed transcripts with text. Up to a maximum of 100 hours of audio.
+ /// Use either transcript_ids or input_text as input into LeMUR. + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("transcript_ids")] + public global::System.Collections.Generic.IList? TranscriptIds { get; set; } + /// /// Additional properties that are not explicitly defined in the schema /// @@ -24,16 +63,48 @@ public sealed partial class LemurTaskParamsVariant1 /// /// Initializes a new instance of the class. /// + /// + /// The model that is used for the final prompt after compression is performed.
+ /// Default Value: default + /// + /// + /// Custom formatted transcript data. Maximum size is the context limit of the selected model.
+ /// Use either transcript_ids or input_text as input into LeMUR. + /// + /// + /// Max output size in tokens, up to 4000
+ /// Default Value: 2000 + /// /// /// Your text to prompt the model to produce a desired output, including any context you want to pass into the model. /// + /// + /// The temperature to use for the model.
+ /// Higher values result in answers that are more creative, lower values are more conservative.
+ /// Can be any value between 0.0 and 1.0 inclusive.
+ /// Default Value: 0F + /// + /// + /// A list of completed transcripts with text. Up to a maximum of 100 hours of audio.
+ /// Use either transcript_ids or input_text as input into LeMUR. + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public LemurTaskParamsVariant1( - string prompt) + global::AssemblyAI.LemurModel finalModel, + string prompt, + string? inputText, + int? maxOutputSize, + float? temperature, + global::System.Collections.Generic.IList? transcriptIds) { + this.FinalModel = finalModel; this.Prompt = prompt ?? throw new global::System.ArgumentNullException(nameof(prompt)); + this.InputText = inputText; + this.MaxOutputSize = maxOutputSize; + this.Temperature = temperature; + this.TranscriptIds = transcriptIds; } /// diff --git a/src/libs/AssemblyAI/openapi.yaml b/src/libs/AssemblyAI/openapi.yaml index d165fbc..3ed1929 100644 --- a/src/libs/AssemblyAI/openapi.yaml +++ b/src/libs/AssemblyAI/openapi.yaml @@ -5644,13 +5644,50 @@ components: x-label: Prompt description: Your text to prompt the model to produce a desired output, including any context you want to pass into the model. type: string - required: [prompt] - - $ref: "#/components/schemas/LemurBaseParams" + transcript_ids: + x-label: Transcript IDs + description: | + A list of completed transcripts with text. Up to a maximum of 100 hours of audio. + Use either transcript_ids or input_text as input into LeMUR. + type: array + items: + x-label: Transcript ID + type: string + format: uuid + input_text: + x-label: Input text + description: | + Custom formatted transcript data. Maximum size is the context limit of the selected model. + Use either transcript_ids or input_text as input into LeMUR. + type: string + final_model: + x-label: Final model + description: | + The model that is used for the final prompt after compression is performed. + default: "default" + oneOf: + - $ref: "#/components/schemas/LemurModel" + max_output_size: + x-label: Maximum output size + description: Max output size in tokens, up to 4000 + type: integer + default: 2000 + temperature: + x-label: Temperature + description: | + The temperature to use for the model. + Higher values result in answers that are more creative, lower values are more conservative. + Can be any value between 0.0 and 1.0 inclusive. + type: number + format: float + default: 0 + minimum: 0 + maximum: 1 + required: [prompt, final_model] example: { transcript_ids: ["64nygnr62k-405c-4ae8-8a6b-d90b40ff3cce"], prompt: "List all the locations affected by wildfires.", - context: "This is an interview about wildfires.", final_model: "anthropic/claude-sonnet-4-20250514", temperature: 0, max_output_size: 3000,