AI Dev Kit
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[]

    Parts

    Declaration
    public List<ContentPart> Parts { get; }
    Property Value
    Type Description
    List<ContentPart>

    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

    GetContents()

    Declaration
    public Content[] GetContents()
    Returns
    Type Description
    Content[]

    GetFirstContent()

    Declaration
    public Content GetFirstContent()
    Returns
    Type Description
    Content

    GetToolCalls()

    Declaration
    public ToolCall[] GetToolCalls()
    Returns
    Type Description
    ToolCall[]

    ToChatContent()

    Declaration
    public Content ToChatContent()
    Returns
    Type Description
    Content

    ToChatDelta()

    Declaration
    public ChatDelta ToChatDelta()
    Returns
    Type Description
    ChatDelta

    ToGeneratedImageAsync(string)

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

    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()

    ToTextDelta()

    Declaration
    public string ToTextDelta()
    Returns
    Type Description
    string

    Extension Methods

    ResponseExtensions.GetOutputText(GenerateContentResponse)
    In this article
    Back to top Generated by DocFX