chore: lots of chores
This commit is contained in:
@@ -28,4 +28,4 @@ public sealed class FailedTranscriptAnalysisException : Exception
|
||||
public FailedTranscriptAnalysisException(string message, Exception innerException) : base(message, innerException)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,10 @@
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
/// <summary>
|
||||
/// Represents content with role and parts for Gemini API.
|
||||
/// </summary>
|
||||
/// <param name="Role">The role of the content (e.g., "user", "assistant").</param>
|
||||
/// <param name="Parts">The array of content parts.</param>
|
||||
internal record Content(
|
||||
[property: JsonPropertyName("role")]
|
||||
string Role,
|
||||
@@ -7,6 +12,10 @@ internal record Content(
|
||||
Part[] Parts
|
||||
);
|
||||
|
||||
/// <summary>
|
||||
/// Represents a part of content for Gemini API.
|
||||
/// </summary>
|
||||
/// <param name="Text">The text content of the part.</param>
|
||||
internal record Part(
|
||||
[property: JsonPropertyName("text")]
|
||||
string Text
|
||||
|
||||
@@ -2,6 +2,11 @@ using System.Text.Json.Serialization;
|
||||
|
||||
namespace StreamShorts.Library.Analysis.Gemini;
|
||||
|
||||
/// <summary>
|
||||
/// Represents a request to generate content using Gemini.
|
||||
/// </summary>
|
||||
/// <param name="Contents">The content array for the request.</param>
|
||||
/// <param name="GenerationConfig">The generation configuration.</param>
|
||||
internal record GenerateContentRequest(
|
||||
[property: JsonPropertyName("contents")]
|
||||
Content[] Contents,
|
||||
@@ -9,6 +14,10 @@ internal record GenerateContentRequest(
|
||||
GenerationConfig GenerationConfig
|
||||
);
|
||||
|
||||
/// <summary>
|
||||
/// Represents configuration for content generation.
|
||||
/// </summary>
|
||||
/// <param name="ResponseMimeType">The MIME type for the response.</param>
|
||||
internal record GenerationConfig(
|
||||
[property: JsonPropertyName("responseMimeType")]
|
||||
string ResponseMimeType
|
||||
|
||||
@@ -2,13 +2,20 @@ using System.Text.Json.Serialization;
|
||||
|
||||
namespace StreamShorts.Library.Analysis.Gemini;
|
||||
|
||||
/// <summary>
|
||||
/// Represents a response from the Gemini content generation API.
|
||||
/// </summary>
|
||||
/// <param name="Candidates">The array of candidate responses.</param>
|
||||
internal record GenerateContentResponse(
|
||||
[property: JsonPropertyName("candidates")]
|
||||
Candidate[] Candidates
|
||||
);
|
||||
|
||||
/// <summary>
|
||||
/// Represents a candidate response from content generation.
|
||||
/// </summary>
|
||||
/// <param name="Content">The generated content.</param>
|
||||
internal record Candidate(
|
||||
[property: JsonPropertyName("content")]
|
||||
Content Content
|
||||
);
|
||||
|
||||
);
|
||||
@@ -16,4 +16,4 @@ public record ShortCandidate(
|
||||
TimeSpan StartTime,
|
||||
[property: JsonPropertyName("end_time")]
|
||||
TimeSpan EndTime
|
||||
);
|
||||
);
|
||||
Reference in New Issue
Block a user