/**
 * Google Gemini Node - Version 1.2
 * Discriminator: resource=text, operation=message
 */


interface Credentials {
  googlePalmApi: CredentialReference;
}

/** Create a completion with Google Gemini model */
export type LcGoogleGeminiV12TextMessageParams = {
  resource: 'text';
  operation: 'message';
/**
 * Model
 * @searchListMethod modelSearch
 * @default {"mode":"list","value":"models/gemini-3-flash-preview"}
 */
    modelId?: { __rl: true; mode: 'list' | 'id'; value: string; cachedResultName?: string };
/**
 * Messages
 * @default {"values":[{"content":""}]}
 */
    messages?: {
        /** Values
     */
    values?: Array<{
      /** The content of the message to be send
       */
      content?: string | Expression<string>;
      /** Role in shaping the model's response, it tells the model how it should behave and interact with the user
       * @default user
       */
      role?: 'user' | 'model' | Expression<string>;
    }>;
  };
/**
 * Whether to return a simplified version of the response instead of the raw data
 * @default true
 */
    simplify?: boolean | Expression<boolean>;
/**
 * Whether to attempt to return the response in JSON format
 * @default false
 */
    jsonOutput?: boolean | Expression<boolean>;
/**
 * Built-in Tools
 * @default {}
 */
    builtInTools?: {
    /** Whether to allow the model to search the web using Google Search to get real-time information
     * @default true
     */
    googleSearch?: boolean | Expression<boolean>;
    /** Google Maps
     * @default {"latitude":"","longitude":""}
     */
    googleMaps?: {
    /** The latitude coordinate for location-based queries
     */
    latitude?: number | Expression<number>;
    /** The longitude coordinate for location-based queries
     */
    longitude?: number | Expression<number>;
  };
    /** Whether to allow the model to read and analyze content from specific URLs
     * @default true
     */
    urlContext?: boolean | Expression<boolean>;
    /** File Search
     * @default {"fileSearchStoreNames":"[]"}
     */
    fileSearch?: {
    /** The file search store names to use for the file search. File search stores are managed via Google AI Studio.
     * @default []
     */
    fileSearchStoreNames?: IDataObject | string | Expression<string>;
    /** Use metadata filter to search within a subset of documents. Example: author="Robert Graves".
     */
    metadataFilter?: string | Expression<string>;
  };
    /** Whether to allow the model to execute code it generates to produce a response. Supported only by certain models.
     * @default true
     */
    codeExecution?: boolean | Expression<boolean>;
  };
/**
 * Options
 * @default {}
 */
    options?: {
    /** Whether to include a single output string merging all text parts of the response
     * @default false
     */
    includeMergedResponse?: boolean | Expression<boolean>;
    /** System Message
     */
    systemMessage?: string | Expression<string>;
    /** Whether to allow the model to execute code it generates to produce a response. Supported only by certain models.
     * @default false
     */
    codeExecution?: boolean | Expression<boolean>;
    /** Positive values penalize new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim
     * @default 0
     */
    frequencyPenalty?: number | Expression<number>;
    /** The maximum number of tokens to generate in the completion
     * @default 16
     */
    maxOutputTokens?: number | Expression<number>;
    /** How many completions to generate for each prompt
     * @default 1
     */
    candidateCount?: number | Expression<number>;
    /** Positive values penalize new tokens based on whether they appear in the text so far, increasing the model's likelihood to talk about new topics
     * @default 0
     */
    presencePenalty?: number | Expression<number>;
    /** Controls the randomness of the output. Lowering results in less random completions. As the temperature approaches zero, the model will become deterministic and repetitive
     * @default 1
     */
    temperature?: number | Expression<number>;
    /** The maximum cumulative probability of tokens to consider when sampling
     * @default 1
     */
    topP?: number | Expression<number>;
    /** The maximum number of tokens to consider when sampling
     * @default 1
     */
    topK?: number | Expression<number>;
    /** Controls reasoning tokens for thinking models. Set to 0 to disable automatic thinking. Set to -1 for dynamic thinking (default).
     * @default -1
     */
    thinkingBudget?: number | Expression<number>;
    /** The maximum number of tool iteration cycles the LLM will run before stopping. A single iteration can contain multiple tool calls. Set to 0 for no limit
     * @default 15
     */
    maxToolsIterations?: number | Expression<number>;
  };
};

export interface LcGoogleGeminiV12TextMessageSubnodeConfig {
  tools?: ToolInstance[];
}

export type LcGoogleGeminiV12TextMessageNode = {
  type: '@n8n/n8n-nodes-langchain.googleGemini';
  version: 1.2;
  credentials?: Credentials;
  isTrigger: true;
  config: NodeConfig<LcGoogleGeminiV12TextMessageParams> & { subnodes?: LcGoogleGeminiV12TextMessageSubnodeConfig };
};