namespace AIStudio.Provider.Google;
///
/// A request for an embedding to the Gemini API.
///
/// The texts to embed.
public sealed record GoogleEmbeddingRequest(GoogleEmbeddingContent Content)
{
///
/// Asks for vectors which tell how similar texts are.
///
///
/// Written as task_type, like every other field of our requests. The API reads both its field names in
/// snake case and in camel case.
///
public string TaskType => "SEMANTIC_SIMILARITY";
///
/// Creates the request for the given texts, each of them as a part of its own.
///
public static GoogleEmbeddingRequest Of(IEnumerable texts) => new(new GoogleEmbeddingContent([..texts.Select(text => new GoogleEmbeddingPart(text))]));
}