Interface OpenAiNodeParameters

Source
interface OpenAiNodeParameters {
    chatModel?: string;
    imageModel?: string;
    input?: string;
    instruction?: string;
    model?: string;
    operation?: "create" | "edit" | "complete" | "moderate";
    options?:
        | {
            echo?: boolean;
            frequency_penalty?: number;
            maxTokens?: number;
            n?: number;
            presence_penalty?: number;
            temperature?: number;
            topP?: number;
        }
        | {
            n?: number;
            quality?: "standard"
            | "hd";
            size?:
                | "256x256"
                | "512x512"
                | "1024x1024"
                | "1792x1024"
                | "1024x1792";
            style?: "natural"
            | "vivid";
        };
    prompt?: | string
    | {
        messages: {
            content?: string;
            role?: "system"
            | "user"
            | "assistant";
        }[];
    };
    resource?: "image"
    | "text"
    | "chat";
    responseFormat?: "imageUrl" | "binaryData";
    simplifyOutput?: boolean;
}

Properties§

Source§

readonly chatModel?: string

The model which will generate the completion. Learn more. Default: "gpt-3.5-turbo" Type options: {"loadOptions":{"routing":{"request":{"method":"GET","url":"/v1/models"},"output":{"postReceive":[{"type":"rootProperty","properties":{"property":"data"}},{"type":"filter","properties":{"pass":"={{ $responseItem.id.startsWith('gpt-') && !$responseItem.id.startsWith('gpt-4-vision') }}"}},{"type":"setKeyValue","properties":{"name":"={{$responseItem.id}}","value":"={{$responseItem.id}}"}},{"type":"sort","properties":{"key":"name"}}]}}}}

Source§

readonly imageModel?: string

The model to use for image generation Default: "dall-e-2" Type options: {"loadOptions":{"routing":{"request":{"method":"GET","url":"/v1/models"},"output":{"postReceive":[{"type":"rootProperty","properties":{"property":"data"}},{"type":"filter","properties":{"pass":"={{ $responseItem.id.startsWith('dall-') }}"}},{"type":"setKeyValue","properties":{"name":"={{$responseItem.id}}","value":"={{$responseItem.id}}"}},{"type":"sort","properties":{"key":"name"}}]}}}}

Source§

readonly input?: string

The input text to be edited

Source§

readonly instruction?: string

The instruction that tells the model how to edit the input text

Source§

readonly model?: string

The model which will generate the completion. Learn more. Default: "gpt-3.5-turbo" Type options: {"loadOptions":{"routing":{"request":{"method":"GET","url":"/v1/models"},"output":{"postReceive":[{"type":"rootProperty","properties":{"property":"data"}},{"type":"filter","properties":{"pass":"={{ $responseItem.id.startsWith('gpt-') && !$responseItem.id.startsWith('gpt-4-vision') }}"}},{"type":"setKeyValue","properties":{"name":"={{$responseItem.id}}","value":"={{$responseItem.id}}"}},{"type":"sort","properties":{"key":"name"}}]}}}}

Source§

readonly operation?: "create" | "edit" | "complete" | "moderate"

Default: "complete"

Source§

readonly options?:
    | {
        echo?: boolean;
        frequency_penalty?: number;
        maxTokens?: number;
        n?: number;
        presence_penalty?: number;
        temperature?: number;
        topP?: number;
    }
    | {
        n?: number;
        quality?: "standard"
        | "hd";
        size?:
            | "256x256"
            | "512x512"
            | "1024x1024"
            | "1792x1024"
            | "1024x1792";
        style?: "natural"
        | "vivid";
    }

Additional options to add Default: {}

Source§

readonly prompt?:
    | string
    | {
        messages: {
            content?: string;
            role?: "system"
            | "user"
            | "assistant";
        }[];
    }

Default: {} Type options: {"sortable":true,"multipleValues":true}

Source§

readonly resource?: "image" | "text" | "chat"

Default: "text"

Source§

readonly responseFormat?: "imageUrl" | "binaryData"

The format in which to return the image(s) Default: "binaryData"

Source§

readonly simplifyOutput?: boolean

Whether to return a simplified version of the response instead of the raw data Default: true