GeminiConfig: {
    codeExecution?: boolean | {};
    contextCache?: boolean;
    functionCallingConfig?: {
        allowedFunctionNames?: string[];
        mode?: "ANY" | "MODE_UNSPECIFIED" | "AUTO" | "NONE";
    };
    maxOutputTokens?: number;
    safetySettings?: {
        category: | "HARM_CATEGORY_UNSPECIFIED"
        | "HARM_CATEGORY_HATE_SPEECH"
        | "HARM_CATEGORY_SEXUALLY_EXPLICIT"
        | "HARM_CATEGORY_HARASSMENT"
        | "HARM_CATEGORY_DANGEROUS_CONTENT";
        threshold: | "BLOCK_LOW_AND_ABOVE"
        | "BLOCK_MEDIUM_AND_ABOVE"
        | "BLOCK_ONLY_HIGH"
        | "BLOCK_NONE";
    }[];
    stopSequences?: string[];
    temperature?: number;
    topK?: number;
    topP?: number;
    version?: string;
}

Type declaration

  • OptionalcodeExecution?: boolean | {}
  • OptionalcontextCache?: boolean
  • OptionalfunctionCallingConfig?: {
        allowedFunctionNames?: string[];
        mode?: "ANY" | "MODE_UNSPECIFIED" | "AUTO" | "NONE";
    }
  • OptionalmaxOutputTokens?: number
  • OptionalsafetySettings?: {
        category:
            | "HARM_CATEGORY_UNSPECIFIED"
            | "HARM_CATEGORY_HATE_SPEECH"
            | "HARM_CATEGORY_SEXUALLY_EXPLICIT"
            | "HARM_CATEGORY_HARASSMENT"
            | "HARM_CATEGORY_DANGEROUS_CONTENT";
        threshold: | "BLOCK_LOW_AND_ABOVE"
        | "BLOCK_MEDIUM_AND_ABOVE"
        | "BLOCK_ONLY_HIGH"
        | "BLOCK_NONE";
    }[]
  • OptionalstopSequences?: string[]
  • Optionaltemperature?: number
  • OptionaltopK?: number
  • OptionaltopP?: number
  • Optionalversion?: string