AI DevKit
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
    Namespace: Glitch9.AIDevKit.Google
    Assembly: .dll
    Syntax
    public class GenerateContentResponse
    Remarks

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

    Properties

    Candidates

    Declaration
    public Candidate[] Candidates { get; set; }
    Property Value
    Type Description
    Candidate[]

    PromptFeedback

    Declaration
    public PromptFeedback PromptFeedback { get; set; }
    Property Value
    Type Description
    PromptFeedback

    Usage

    Declaration
    public Usage Usage { get; set; }
    Property Value
    Type Description
    Usage

    Methods

    FirstTextDelta()

    Declaration
    public string FirstTextDelta()
    Returns
    Type Description
    string

    ToGeneratedImageAsync(string)

    Declaration
    public UniTask<GeneratedImage> ToGeneratedImageAsync(string outputPath)
    Parameters
    Type Name Description
    string outputPath
    Returns
    Type Description
    UniTask<GeneratedImage>

    ToInlineDataList()

    Declaration
    public List<string> ToInlineDataList()
    Returns
    Type Description
    List<string>

    ToParts()

    Declaration
    public List<ContentPart> ToParts()
    Returns
    Type Description
    List<ContentPart>

    ToString()

    Returns a string that represents the current object.

    Declaration
    public override string ToString()
    Returns
    Type Description
    string

    A string that represents the current object.

    Overrides
    object.ToString()

    Extension Methods

    ConverterExtensions.FirstContent(GenerateContentResponse)
    ConverterExtensions.FirstOutputText(GenerateContentResponse)
    ConverterExtensions.ToChatChoices(GenerateContentResponse)
    ConverterExtensions.ToSpeechAudioFloatArray(GenerateContentResponse)
    ConverterExtensions.ToToolCalls(GenerateContentResponse)
    In this article
    Back to top Generated by DocFX