Search Results for

    Show / Hide Table of Contents

    Class GenerateContentResponse

    Individual response from {@link GenerativeModel.generateContent} and {@link GenerativeModel.generateContentStream}. generateContentStream() will return one in each chunk until the stream is done.

    Inheritance
    object
    GenerateContentResponse
    Implements
    IProjector<ChatCompletionEvent>
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.ReferenceEquals(object, object)
    Namespace: Glitch9.AIDevKit.Google
    Assembly: Glitch9.AIDevKit.Provider.Google.dll
    Syntax
    public sealed class GenerateContentResponse : IProjector<ChatCompletionEvent>
    Remarks

    This is Google's equivalent of the ChatCompletion object in OpenAI.

    Properties

    | Edit this page View Source

    Candidates

    Candidate responses from the model.

    Declaration
    [JsonProperty("candidates")]
    public GeminiCandidate[] Candidates { get; set; }
    Property Value
    Type Description
    GeminiCandidate[]
    | Edit this page View Source

    ModelVersion

    Output only. The model version used to generate the response.

    Declaration
    [JsonProperty("modelVersion")]
    public string ModelVersion { get; set; }
    Property Value
    Type Description
    string
    | Edit this page View Source

    PromptFeedback

    Returns the prompt's feedback related to the content filters.

    Declaration
    [JsonProperty("promptFeedback")]
    public PromptFeedback PromptFeedback { get; set; }
    Property Value
    Type Description
    PromptFeedback
    | Edit this page View Source

    ResponseId

    Output only. The unique identifier of the response.

    Declaration
    [JsonProperty("responseId")]
    public string ResponseId { get; set; }
    Property Value
    Type Description
    string
    | Edit this page View Source

    Usage

    Output only. Metadata on the generation requests' token usage.

    Declaration
    [JsonProperty("usageMetadata")]
    public Usage Usage { get; set; }
    Property Value
    Type Description
    Usage

    Methods

    | Edit this page View Source

    Project()

    Declaration
    public ChatCompletionEvent Project()
    Returns
    Type Description
    ChatCompletionEvent
    | Edit this page View Source

    ToContentParts()

    Declaration
    public List<GeminiContentPart> ToContentParts()
    Returns
    Type Description
    List<GeminiContentPart>
    | Edit this page View Source

    ToInlineDataList()

    Declaration
    public List<string> ToInlineDataList()
    Returns
    Type Description
    List<string>
    | Edit this page View Source

    ToString()

    Declaration
    public override string ToString()
    Returns
    Type Description
    string
    Overrides
    object.ToString()

    Implements

    IProjector<TOut>

    Extension Methods

    GenerateContentResponseExtensions.ExtractAudiosFromResponse(GenerateContentResponse, int, int, string)
    GenerateContentResponseExtensions.ExtractImagesFromResponse(GenerateContentResponse)
    ArrayExtensions.ToArrayOrEmpty<T>(T)
    ArrayExtensions.ToArrayOrNull<T>(T)
    EventExtensions.ToDelta<T>(T, string, int, string, bool)
    EventExtensions.ToDone<T>(T, string, int, string)
    EventExtensions.ToEvent<T>(T)
    EventExtensions.UpcastDelta<T1, T2>(T1, string, int, string, bool)
    FallbackExtensions.IsOr<TParent, TChild>(TParent, TChild)
    ResponseCastingExtensions.GetResult<T>(T)
    SystemExtensions.GetName(object)
    • Edit this page
    • View Source
    In this article
    Back to top AI DevKit Documentation