Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat:@coderabbitai #35

Merged
merged 1 commit into from
Nov 13, 2024
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 @@ -326,12 +326,10 @@ partial void ProcessGetLemurResponseResponseContent(
};
}

using var __responseStream = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false);

var __responseValue = await global::AssemblyAI.LemurResponse.FromJsonStreamAsync(__responseStream, JsonSerializerContext).ConfigureAwait(false);
using var __content = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false);

return
__responseValue ??
await global::AssemblyAI.LemurResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -332,12 +332,10 @@ partial void ProcessLemurActionItemsResponseContent(
};
}

using var __responseStream = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false);

var __responseValue = await global::AssemblyAI.LemurActionItemsResponse.FromJsonStreamAsync(__responseStream, JsonSerializerContext).ConfigureAwait(false);
using var __content = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false);

return
__responseValue ??
await global::AssemblyAI.LemurActionItemsResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -333,12 +333,10 @@ partial void ProcessLemurQuestionAnswerResponseContent(
};
}

using var __responseStream = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false);

var __responseValue = await global::AssemblyAI.LemurQuestionAnswerResponse.FromJsonStreamAsync(__responseStream, JsonSerializerContext).ConfigureAwait(false);
using var __content = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false);

return
__responseValue ??
await global::AssemblyAI.LemurQuestionAnswerResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -333,12 +333,10 @@ partial void ProcessLemurSummaryResponseContent(
};
}

using var __responseStream = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false);

var __responseValue = await global::AssemblyAI.LemurSummaryResponse.FromJsonStreamAsync(__responseStream, JsonSerializerContext).ConfigureAwait(false);
using var __content = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false);

return
__responseValue ??
await global::AssemblyAI.LemurSummaryResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -332,12 +332,10 @@ partial void ProcessLemurTaskResponseContent(
};
}

using var __responseStream = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false);

var __responseValue = await global::AssemblyAI.LemurTaskResponse.FromJsonStreamAsync(__responseStream, JsonSerializerContext).ConfigureAwait(false);
using var __content = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false);

return
__responseValue ??
await global::AssemblyAI.LemurTaskResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -327,12 +327,10 @@ partial void ProcessPurgeLemurRequestDataResponseContent(
};
}

using var __responseStream = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false);

var __responseValue = await global::AssemblyAI.PurgeLemurRequestDataResponse.FromJsonStreamAsync(__responseStream, JsonSerializerContext).ConfigureAwait(false);
using var __content = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false);

return
__responseValue ??
await global::AssemblyAI.PurgeLemurRequestDataResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,15 @@ public sealed partial class LemurBaseParams
/// Context to provide the model. This can be a string or a free-form JSON value.
/// </summary>
[global::System.Text.Json.Serialization.JsonPropertyName("context")]
[global::System.Text.Json.Serialization.JsonConverter(typeof(global::AssemblyAI.JsonConverters.OneOfJsonConverterFactory2))]
[global::System.Text.Json.Serialization.JsonConverter(typeof(global::AssemblyAI.JsonConverters.OneOfJsonConverter<string, object>))]
public global::AssemblyAI.OneOf<string, object>? Context { get; set; }

/// <summary>
/// The model that is used for the final prompt after compression is performed.<br/>
/// Default Value: default
/// </summary>
[global::System.Text.Json.Serialization.JsonPropertyName("final_model")]
[global::System.Text.Json.Serialization.JsonConverter(typeof(global::AssemblyAI.JsonConverters.AnyOfJsonConverterFactory2))]
[global::System.Text.Json.Serialization.JsonConverter(typeof(global::AssemblyAI.JsonConverters.AnyOfJsonConverter<global::AssemblyAI.LemurModel?, string>))]
public global::AssemblyAI.AnyOf<global::AssemblyAI.LemurModel?, string>? FinalModel { get; set; }

/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public sealed partial class LemurQuestion
/// Any context about the transcripts you wish to provide. This can be a string or any object.
/// </summary>
[global::System.Text.Json.Serialization.JsonPropertyName("context")]
[global::System.Text.Json.Serialization.JsonConverter(typeof(global::AssemblyAI.JsonConverters.OneOfJsonConverterFactory2))]
[global::System.Text.Json.Serialization.JsonConverter(typeof(global::AssemblyAI.JsonConverters.OneOfJsonConverter<string, object>))]
public global::AssemblyAI.OneOf<string, object>? Context { get; set; }

/// <summary>
Expand Down
12 changes: 6 additions & 6 deletions src/libs/AssemblyAI/Generated/AssemblyAI.Models.Transcript.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public sealed partial class Transcript
/// The default value is 'en_us'.
/// </summary>
[global::System.Text.Json.Serialization.JsonPropertyName("language_code")]
[global::System.Text.Json.Serialization.JsonConverter(typeof(global::AssemblyAI.JsonConverters.AnyOfJsonConverterFactory2))]
[global::System.Text.Json.Serialization.JsonConverter(typeof(global::AssemblyAI.JsonConverters.AnyOfJsonConverter<global::AssemblyAI.TranscriptLanguageCode?, string>))]
public global::AssemblyAI.AnyOf<global::AssemblyAI.TranscriptLanguageCode?, string>? LanguageCode { get; set; }

/// <summary>
Expand Down Expand Up @@ -66,7 +66,7 @@ public sealed partial class Transcript
/// The speech model used for the transcription. When `null`, the default model is used.
/// </summary>
[global::System.Text.Json.Serialization.JsonPropertyName("speech_model")]
[global::System.Text.Json.Serialization.JsonConverter(typeof(global::AssemblyAI.JsonConverters.OneOfJsonConverterFactory2))]
[global::System.Text.Json.Serialization.JsonConverter(typeof(global::AssemblyAI.JsonConverters.OneOfJsonConverter<global::AssemblyAI.SpeechModel2?, object>))]
[global::System.Text.Json.Serialization.JsonRequired]
public required global::AssemblyAI.OneOf<global::AssemblyAI.SpeechModel2?, object> SpeechModel { get; set; }

Expand Down Expand Up @@ -185,7 +185,7 @@ public sealed partial class Transcript
/// See [Key Phrases](https://www.assemblyai.com/docs/models/key-phrases) for more information.
/// </summary>
[global::System.Text.Json.Serialization.JsonPropertyName("auto_highlights_result")]
[global::System.Text.Json.Serialization.JsonConverter(typeof(global::AssemblyAI.JsonConverters.OneOfJsonConverterFactory2))]
[global::System.Text.Json.Serialization.JsonConverter(typeof(global::AssemblyAI.JsonConverters.OneOfJsonConverter<global::AssemblyAI.AutoHighlightsResult2, object>))]
public global::AssemblyAI.OneOf<global::AssemblyAI.AutoHighlightsResult2, object>? AutoHighlightsResult { get; set; }

/// <summary>
Expand Down Expand Up @@ -237,7 +237,7 @@ public sealed partial class Transcript
/// See [PII redaction](https://www.assemblyai.com/docs/models/pii-redaction) for more information.
/// </summary>
[global::System.Text.Json.Serialization.JsonPropertyName("redact_pii_audio_quality")]
[global::System.Text.Json.Serialization.JsonConverter(typeof(global::AssemblyAI.JsonConverters.OneOfJsonConverterFactory2))]
[global::System.Text.Json.Serialization.JsonConverter(typeof(global::AssemblyAI.JsonConverters.OneOfJsonConverter<global::AssemblyAI.RedactPiiAudioQuality?, object>))]
public global::AssemblyAI.OneOf<global::AssemblyAI.RedactPiiAudioQuality?, object>? RedactPiiAudioQuality { get; set; }

/// <summary>
Expand Down Expand Up @@ -277,7 +277,7 @@ public sealed partial class Transcript
/// See [Content moderation](https://www.assemblyai.com/docs/models/content-moderation) for more information.
/// </summary>
[global::System.Text.Json.Serialization.JsonPropertyName("content_safety_labels")]
[global::System.Text.Json.Serialization.JsonConverter(typeof(global::AssemblyAI.JsonConverters.OneOfJsonConverterFactory2))]
[global::System.Text.Json.Serialization.JsonConverter(typeof(global::AssemblyAI.JsonConverters.OneOfJsonConverter<global::AssemblyAI.ContentSafetyLabelsResult, object>))]
public global::AssemblyAI.OneOf<global::AssemblyAI.ContentSafetyLabelsResult, object>? ContentSafetyLabels { get; set; }

/// <summary>
Expand All @@ -291,7 +291,7 @@ public sealed partial class Transcript
/// See [Topic Detection](https://www.assemblyai.com/docs/models/topic-detection) for more information.
/// </summary>
[global::System.Text.Json.Serialization.JsonPropertyName("iab_categories_result")]
[global::System.Text.Json.Serialization.JsonConverter(typeof(global::AssemblyAI.JsonConverters.OneOfJsonConverterFactory2))]
[global::System.Text.Json.Serialization.JsonConverter(typeof(global::AssemblyAI.JsonConverters.OneOfJsonConverter<global::AssemblyAI.TopicDetectionModelResult, object>))]
public global::AssemblyAI.OneOf<global::AssemblyAI.TopicDetectionModelResult, object>? IabCategoriesResult { get; set; }

/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public sealed partial class TranscriptOptionalParams
/// Default Value: en_us
/// </summary>
[global::System.Text.Json.Serialization.JsonPropertyName("language_code")]
[global::System.Text.Json.Serialization.JsonConverter(typeof(global::AssemblyAI.JsonConverters.OneOfJsonConverterFactory2))]
[global::System.Text.Json.Serialization.JsonConverter(typeof(global::AssemblyAI.JsonConverters.OneOfJsonConverter<global::AssemblyAI.AnyOf<global::AssemblyAI.TranscriptLanguageCode?, string>?, object>))]
public global::AssemblyAI.OneOf<global::AssemblyAI.AnyOf<global::AssemblyAI.TranscriptLanguageCode?, string>?, object>? LanguageCode { get; set; }

/// <summary>
Expand All @@ -40,7 +40,7 @@ public sealed partial class TranscriptOptionalParams
/// Default Value: best
/// </summary>
[global::System.Text.Json.Serialization.JsonPropertyName("speech_model")]
[global::System.Text.Json.Serialization.JsonConverter(typeof(global::AssemblyAI.JsonConverters.OneOfJsonConverterFactory2))]
[global::System.Text.Json.Serialization.JsonConverter(typeof(global::AssemblyAI.JsonConverters.OneOfJsonConverter<global::AssemblyAI.SpeechModel2?, object>))]
public global::AssemblyAI.OneOf<global::AssemblyAI.SpeechModel2?, object>? SpeechModel { get; set; }

/// <summary>
Expand Down Expand Up @@ -172,7 +172,7 @@ public sealed partial class TranscriptOptionalParams
/// Default Value: hash
/// </summary>
[global::System.Text.Json.Serialization.JsonPropertyName("redact_pii_sub")]
[global::System.Text.Json.Serialization.JsonConverter(typeof(global::AssemblyAI.JsonConverters.OneOfJsonConverterFactory2))]
[global::System.Text.Json.Serialization.JsonConverter(typeof(global::AssemblyAI.JsonConverters.OneOfJsonConverter<global::AssemblyAI.SubstitutionPolicy?, object>))]
public global::AssemblyAI.OneOf<global::AssemblyAI.SubstitutionPolicy?, object>? RedactPiiSub { get; set; }

/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -334,12 +334,10 @@ partial void ProcessCreateTemporaryTokenResponseContent(
};
}

using var __responseStream = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false);

var __responseValue = await global::AssemblyAI.RealtimeTemporaryTokenResponse.FromJsonStreamAsync(__responseStream, JsonSerializerContext).ConfigureAwait(false);
using var __content = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false);

return
__responseValue ??
await global::AssemblyAI.RealtimeTemporaryTokenResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -332,12 +332,10 @@ partial void ProcessCreateTranscriptResponseContent(
};
}

using var __responseStream = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false);

var __responseValue = await global::AssemblyAI.Transcript.FromJsonStreamAsync(__responseStream, JsonSerializerContext).ConfigureAwait(false);
using var __content = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false);

return
__responseValue ??
await global::AssemblyAI.Transcript.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -326,12 +326,10 @@ partial void ProcessDeleteTranscriptResponseContent(
};
}

using var __responseStream = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false);

var __responseValue = await global::AssemblyAI.Transcript.FromJsonStreamAsync(__responseStream, JsonSerializerContext).ConfigureAwait(false);
using var __content = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false);

return
__responseValue ??
await global::AssemblyAI.Transcript.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -326,12 +326,10 @@ partial void ProcessGetRedactedAudioResponseContent(
};
}

using var __responseStream = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false);

var __responseValue = await global::AssemblyAI.RedactedAudioResponse.FromJsonStreamAsync(__responseStream, JsonSerializerContext).ConfigureAwait(false);
using var __content = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false);

return
__responseValue ??
await global::AssemblyAI.RedactedAudioResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,7 @@ partial void ProcessGetSubtitlesResponseContent(
};
}

return __content;
return __content;
}
else
{
Expand All @@ -341,13 +341,9 @@ partial void ProcessGetSubtitlesResponseContent(
};
}

using var __responseStream = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false);

var __responseValue = await global::System.Text.Json.JsonSerializer.DeserializeAsync(__responseStream, typeof(string), JsonSerializerContext).ConfigureAwait(false) as string;
var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);

return
__responseValue ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
return __content;
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -326,12 +326,10 @@ partial void ProcessGetTranscriptResponseContent(
};
}

using var __responseStream = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false);

var __responseValue = await global::AssemblyAI.Transcript.FromJsonStreamAsync(__responseStream, JsonSerializerContext).ConfigureAwait(false);
using var __content = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false);

return
__responseValue ??
await global::AssemblyAI.Transcript.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -326,12 +326,10 @@ partial void ProcessGetTranscriptParagraphsResponseContent(
};
}

using var __responseStream = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false);

var __responseValue = await global::AssemblyAI.ParagraphsResponse.FromJsonStreamAsync(__responseStream, JsonSerializerContext).ConfigureAwait(false);
using var __content = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false);

return
__responseValue ??
await global::AssemblyAI.ParagraphsResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
}
}
Expand Down
Loading
Loading