AI Dev Kit
Search Results for

    Show / Hide Table of Contents

    Class GenerateContentRequest.Builder

    Inheritance
    object
    RequestBody.RequestBodyBuilder<GenerateContentRequest.Builder, GenerateContentRequest>
    GenerativeAIRequest.GenerativeAIRequestBuilder<GenerateContentRequest.Builder, GenerateContentRequest>
    GenerateContentRequest.Builder
    Inherited Members
    GenerativeAIRequest.GenerativeAIRequestBuilder<GenerateContentRequest.Builder, GenerateContentRequest>.SetModel(Model)
    Namespace: Glitch9.AIDevKit.Google
    Assembly: .dll
    Syntax
    public class GenerateContentRequest.Builder : GenerativeAIRequest.GenerativeAIRequestBuilder<GenerateContentRequest.Builder, GenerateContentRequest>

    Methods

    PushMessage(ChatMessage)

    Declaration
    public GenerateContentRequest.Builder PushMessage(ChatMessage message)
    Parameters
    Type Name Description
    ChatMessage message
    Returns
    Type Description
    GenerateContentRequest.Builder

    SetConfig(GenerationConfig)

    Declaration
    public GenerateContentRequest.Builder SetConfig(GenerationConfig generationConfig)
    Parameters
    Type Name Description
    GenerationConfig generationConfig
    Returns
    Type Description
    GenerateContentRequest.Builder

    SetFrequencyPenalty(float)

    Declaration
    public GenerateContentRequest.Builder SetFrequencyPenalty(float frequencyPenalty)
    Parameters
    Type Name Description
    float frequencyPenalty
    Returns
    Type Description
    GenerateContentRequest.Builder

    SetFunctions(params FunctionDeclaration[])

    Declaration
    public GenerateContentRequest.Builder SetFunctions(params FunctionDeclaration[] functions)
    Parameters
    Type Name Description
    FunctionDeclaration[] functions
    Returns
    Type Description
    GenerateContentRequest.Builder

    SetInstruction(string)

    Adds a system instruction to the beginning of the message list.

    Declaration
    public GenerateContentRequest.Builder SetInstruction(string systemInstruction)
    Parameters
    Type Name Description
    string systemInstruction
    Returns
    Type Description
    GenerateContentRequest.Builder

    SetJsonSchema(Type)

    Declaration
    public GenerateContentRequest.Builder SetJsonSchema(Type type)
    Parameters
    Type Name Description
    Type type
    Returns
    Type Description
    GenerateContentRequest.Builder

    SetMaxTokens(int)

    Declaration
    public GenerateContentRequest.Builder SetMaxTokens(int maxTokens)
    Parameters
    Type Name Description
    int maxTokens
    Returns
    Type Description
    GenerateContentRequest.Builder

    SetMessages(List<ChatMessage>)

    Declaration
    public GenerateContentRequest.Builder SetMessages(List<ChatMessage> messages)
    Parameters
    Type Name Description
    List<ChatMessage> messages
    Returns
    Type Description
    GenerateContentRequest.Builder

    SetModelOptions(ModelOptions)

    Declaration
    public GenerateContentRequest.Builder SetModelOptions(ModelOptions options)
    Parameters
    Type Name Description
    ModelOptions options
    Returns
    Type Description
    GenerateContentRequest.Builder

    SetPresencePenalty(float)

    Declaration
    public GenerateContentRequest.Builder SetPresencePenalty(float presencePenalty)
    Parameters
    Type Name Description
    float presencePenalty
    Returns
    Type Description
    GenerateContentRequest.Builder

    SetPrompt(InpaintPrompt)

    Declaration
    public GenerateContentRequest.Builder SetPrompt(InpaintPrompt prompt)
    Parameters
    Type Name Description
    InpaintPrompt prompt
    Returns
    Type Description
    GenerateContentRequest.Builder

    SetPrompt(string)

    Declaration
    public GenerateContentRequest.Builder SetPrompt(string prompt)
    Parameters
    Type Name Description
    string prompt
    Returns
    Type Description
    GenerateContentRequest.Builder

    SetResponseCount(int)

    Declaration
    public GenerateContentRequest.Builder SetResponseCount(int count)
    Parameters
    Type Name Description
    int count
    Returns
    Type Description
    GenerateContentRequest.Builder

    SetResponseModalities(params Modality[])

    Declaration
    public GenerateContentRequest.Builder SetResponseModalities(params Modality[] responseModalities)
    Parameters
    Type Name Description
    Modality[] responseModalities
    Returns
    Type Description
    GenerateContentRequest.Builder

    SetSafetySettings(IEnumerable<SafetySetting>)

    Declaration
    public GenerateContentRequest.Builder SetSafetySettings(IEnumerable<SafetySetting> safetySettings)
    Parameters
    Type Name Description
    IEnumerable<SafetySetting> safetySettings
    Returns
    Type Description
    GenerateContentRequest.Builder

    SetSeed(int)

    Declaration
    public GenerateContentRequest.Builder SetSeed(int seed)
    Parameters
    Type Name Description
    int seed
    Returns
    Type Description
    GenerateContentRequest.Builder

    SetStartingMessage(string)

    Adds a system instruction and an assistant message to the beginning of the message list.

    Declaration
    public GenerateContentRequest.Builder SetStartingMessage(string startingMessage)
    Parameters
    Type Name Description
    string startingMessage
    Returns
    Type Description
    GenerateContentRequest.Builder

    SetSystemInstruction(Content)

    Declaration
    public GenerateContentRequest.Builder SetSystemInstruction(Content systemInstruction)
    Parameters
    Type Name Description
    Content systemInstruction
    Returns
    Type Description
    GenerateContentRequest.Builder

    SetTemperature(float)

    Declaration
    public GenerateContentRequest.Builder SetTemperature(float temperature)
    Parameters
    Type Name Description
    float temperature
    Returns
    Type Description
    GenerateContentRequest.Builder

    SetTools(params Tool[])

    Declaration
    public GenerateContentRequest.Builder SetTools(params Tool[] tools)
    Parameters
    Type Name Description
    Tool[] tools
    Returns
    Type Description
    GenerateContentRequest.Builder

    SetTopK(int)

    Declaration
    public GenerateContentRequest.Builder SetTopK(int topK)
    Parameters
    Type Name Description
    int topK
    Returns
    Type Description
    GenerateContentRequest.Builder

    SetTopP(float)

    Declaration
    public GenerateContentRequest.Builder SetTopP(float topP)
    Parameters
    Type Name Description
    float topP
    Returns
    Type Description
    GenerateContentRequest.Builder
    In this article
    Back to top Generated by DocFX