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


interface Credentials {
  googlePalmApi: CredentialReference;
}

/** Create a completion with Google Gemini model */
export type LcGoogleGeminiV1TextMessageParams = {
  resource: 'text';
  operation: 'message';
/**
 * Model
 * @searchListMethod modelSearch
 * @default {"mode":"list","value":""}
 */
    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> | PlaceholderValue;
      /** 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>;
/**
 * 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> | PlaceholderValue;
    /** 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 LcGoogleGeminiV1TextMessageSubnodeConfig {
  tools?: ToolInstance[];
}

export type LcGoogleGeminiV1TextMessageNode = {
  type: '@n8n/n8n-nodes-langchain.googleGemini';
  version: 1;
  credentials?: Credentials;
  config: NodeConfig<LcGoogleGeminiV1TextMessageParams> & { subnodes?: LcGoogleGeminiV1TextMessageSubnodeConfig };
};