• Returns a reference to a model that can be used in generate calls.

    await ai.generate({
    prompt: 'hi',
    model: gemini('gemini-1.5-flash')
    });

    Parameters

    • version: GeminiVersionString
    • options: {
          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;
      } = {}

    Returns ModelReference<typeof GeminiConfigSchema>