/**
 * OpenAI Node - Version 1.6
 * Discriminator: resource=assistant, operation=create
 */


interface Credentials {
  openAiApi: CredentialReference;
}

/** Create a new assistant */
export type LcOpenAiV16AssistantCreateParams = {
  resource: 'assistant';
  operation: 'create';
/**
 * Model
 * @builderHint Keep a working or explicitly requested model unless provider evidence shows it is unavailable or unsuitable. When choosing a new model, select a current stable model supported by this node version, the configured API, and the required operation. Use the declared model-list lookup with the connected credential when available. Gateway credits can restrict that list. For a new choice without credentials, use current provider catalog information. Choose a model that fits the task and budget. Copy the exact model ID. Do not rely on node defaults, invent model IDs, or treat an unfamiliar model as invalid.
 * @searchListMethod modelSearch
 * @default {"mode":"list","value":""}
 */
    modelId?: { __rl: true; mode: 'list' | 'id'; value: string; cachedResultName?: string };
/**
 * The name of the assistant. The maximum length is 256 characters.
 */
    name: string | Expression<string>;
/**
 * The description of the assistant. The maximum length is 512 characters.
 */
    description?: string | Expression<string>;
/**
 * The system instructions that the assistant uses. The maximum length is 32768 characters.
 */
    instructions?: string | Expression<string>;
/**
 * Whether to enable the code interpreter that allows the assistants to write and run Python code in a sandboxed execution environment, find more &lt;a href="https://developers.openai.com/api/docs/guides/tools-code-interpreter" target="_blank"&gt;here&lt;/a&gt;
 * @default false
 */
    codeInterpreter?: boolean | Expression<boolean>;
/**
 * Whether to augments the assistant with knowledge from outside its model, such as proprietary product information or documents, find more &lt;a href="https://developers.openai.com/api/docs/guides/tools-file-search" target="_blank"&gt;here&lt;/a&gt;
 * @default false
 */
    knowledgeRetrieval?: boolean | Expression<boolean>;
/**
 * The files to be used by the assistant, there can be a maximum of 20 files attached to the assistant. You can use expression to pass file IDs as an array or comma-separated string.
 * @hint Add more files by using the 'Upload a File' operation
 * @loadOptionsMethod getFiles
 * @displayOptions.show { codeInterpreter: [true] }
 * @default []
 */
    file_ids?: string[];
/**
 * Options
 * @default {}
 */
    options?: {
    /** Controls randomness: Lowering results in less random completions. As the temperature approaches zero, the model will become deterministic and repetitive. We generally recommend altering this or temperature but not both.
     * @default 1
     */
    temperature?: number | Expression<number>;
    /** An alternative to sampling with temperature, controls diversity via nucleus sampling: 0.5 means half of all likelihood-weighted options are considered. We generally recommend altering this or temperature but not both.
     * @default 1
     */
    topP?: number | Expression<number>;
    /** Whether to fail an operation if the assistant with the same name already exists
     * @default false
     */
    failIfExists?: boolean | Expression<boolean>;
  };
};

export interface LcOpenAiV16AssistantCreateSubnodeConfig {
  tools?: ToolInstance[];
  memory?: MemoryInstance;
}

export type LcOpenAiV16AssistantCreateNode = {
  type: '@n8n/n8n-nodes-langchain.openAi';
  version: 1.6;
  isTrigger: true;
  config: NodeConfig<LcOpenAiV16AssistantCreateParams> & { credentials?: Credentials } & { subnodes?: LcOpenAiV16AssistantCreateSubnodeConfig };
};