"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.PARAMETERIZED_SQL_DESCRIPTION = exports.OPEN_AI_DOC_LINKS = exports.OPEN_AI_DEFAULT_TEMPERATURE = exports.OPEN_AI_DEFAULT_MAX_TOKENS = exports.OPEN_AI_TRANSCRIBE_LANGUAGES_AND_ISO_639_1_CODES = exports.OPEN_AI_GENERATE_IMAGE_TYPES_AND_DESCRIPTIONS = exports.OPEN_AI_GENERATE_IMAGE_TYPES = exports.OPEN_AI_GENERATE_CODE_TYPES_AND_DESCRIPTIONS = exports.OPEN_AI_GENERATE_CODE_TYPES = exports.OPEN_AI_GENERATE_TEXT_TYPES_AND_DESCRIPTIONS = exports.OPEN_AI_GENERATE_TEXT_TYPES = exports.OPEN_AI_SUPPORTED_IMAGE_SIZES = exports.MODERATION_AI_MODELS_AND_DESCRIPTIONS = exports.AUDIO_AI_MODELS_AND_DESCRIPTIONS = exports.EMBEDDING_AI_MODELS_AND_DESCRIPTIONS = exports.EDIT_CODE_AI_MODELS_AND_DESCRIPTIONS = exports.EDIT_TEXT_AI_MODELS_AND_DESCRIPTIONS = exports.TEXT_COMPLETION_AI_MODELS_AND_DESCRIPTIONS = exports.CHAT_COMPLETION_AI_MODELS_AND_DESCRIPTIONS = exports.DEPRECATED_MODELS_AND_RECOMMENDED_REPLACEMENT_MODELS = exports.OPEN_AI_ACTION = exports.OPEN_AI_MODEL = exports.SERVICE_ACCOUNT_GHOST_TEXT = exports.SQL_INITIAL_TEXT = exports.DOCS_BASE_URL = exports.PUBLIC_INTEGRATIONS_LOGO_URL = exports.PUBLIC_INTEGRATIONS_CDN_URL = void 0;
// Logos & Docs
exports.PUBLIC_INTEGRATIONS_CDN_URL = process.env.SUPERBLOCKS_PUBLIC_INTEGRATIONS_CDN_URL ?? 'https://integrations.superblocks.com';
exports.PUBLIC_INTEGRATIONS_LOGO_URL = `${exports.PUBLIC_INTEGRATIONS_CDN_URL}/img`;
exports.DOCS_BASE_URL = 'https://docs.superblocks.com/integrations/integrations-library';
// Placeholder text
exports.SQL_INITIAL_TEXT = `-- You can use SQL to query data (ex. SELECT * FROM orders;)

`;
exports.SERVICE_ACCOUNT_GHOST_TEXT = `{
  "type": "service_account",
  "project_id": "project-id",
  "private_key_id": "key-id",
  "private_key": "-----BEGIN PRIVATE KEY-----\\nprivate-key\\n-----END PRIVATE KEY-----\\n",
  "client_email": "service-account-email",
  "client_id": "client-id",
  "auth_uri": "https://accounts.google.com/o/oauth2/auth",
  "token_uri": "https://accounts.google.com/o/oauth2/token",
  "auth_provider_x509_cert_url": "https://www.googleapis.com/oauth2/v1/certs",
  "client_x509_cert_url": "https://www.googleapis.com/robot/v1/metadata/x509/service-account-email"
}`;
// An enum of all models.
var OPEN_AI_MODEL;
(function (OPEN_AI_MODEL) {
    OPEN_AI_MODEL["CODE_CUSHMAN_001"] = "code-cushman-001";
    OPEN_AI_MODEL["CODE_DAVINCI_EDIT_001"] = "code-davinci-edit-001";
    OPEN_AI_MODEL["CODE_DAVINCI_002"] = "code-davinci-002";
    OPEN_AI_MODEL["GPT_3_5_TURBO"] = "gpt-3.5-turbo";
    OPEN_AI_MODEL["GPT_3_5_TURBO_INSTRUCT"] = "gpt-3.5-turbo-instruct";
    OPEN_AI_MODEL["GPT_3_5_TURBO_16K"] = "gpt-3.5-turbo-16k";
    OPEN_AI_MODEL["GPT_4"] = "gpt-4";
    OPEN_AI_MODEL["GPT_4O"] = "gpt-4o";
    OPEN_AI_MODEL["GPT_4O_MINI"] = "gpt-4o-mini";
    OPEN_AI_MODEL["GPT_4_TURBO"] = "gpt-4-turbo";
    OPEN_AI_MODEL["TEXT_ADA_001"] = "text-ada-001";
    OPEN_AI_MODEL["TEXT_BABBAGE_001"] = "text-babbage-001";
    OPEN_AI_MODEL["TEXT_CURIE_001"] = "text-curie-001";
    OPEN_AI_MODEL["TEXT_DAVINCI_EDIT_001"] = "text-davinci-edit-001";
    OPEN_AI_MODEL["TEXT_DAVINCI_003"] = "text-davinci-003";
    OPEN_AI_MODEL["TEXT_EMBEDDING_ADA_002"] = "text-embedding-ada-002";
    OPEN_AI_MODEL["TEXT_EMBEDDING_3_LARGE"] = "text-embedding-3-large";
    OPEN_AI_MODEL["TEXT_EMBEDDING_3_SMALL"] = "text-embedding-3-small";
    OPEN_AI_MODEL["TEXT_MODERATION_LATEST"] = "text-moderation-latest";
    OPEN_AI_MODEL["TEXT_MODERATION_STABLE"] = "text-moderation-stable";
    OPEN_AI_MODEL["WHISPER_1"] = "whisper-1";
})(OPEN_AI_MODEL || (exports.OPEN_AI_MODEL = OPEN_AI_MODEL = {}));
// superblocks openai actions
// these are used for a case insensitive comparison in openai/src/index.ts
// so before modifying these, check the logic there to prevent a breaking
// change
var OPEN_AI_ACTION;
(function (OPEN_AI_ACTION) {
    OPEN_AI_ACTION["GENERATE_CHATGPT_RESPONSE"] = "Generate ChatGPT Response";
    OPEN_AI_ACTION["GENERATE_TEXT"] = "Generate Text";
    OPEN_AI_ACTION["GENERATE_CODE"] = "Generate Code";
    OPEN_AI_ACTION["GENERATE_IMAGE"] = "Generate Image";
    OPEN_AI_ACTION["CHECK_MODERATION"] = "Check Moderation";
    OPEN_AI_ACTION["TRANSCRIBE_AUDIO_TO_TEXT"] = "Transcribe Audio to Text";
    OPEN_AI_ACTION["GENERATE_TEXT_EMBEDDING"] = "Generate Text Embedding";
})(OPEN_AI_ACTION || (exports.OPEN_AI_ACTION = OPEN_AI_ACTION = {}));
// https://platform.openai.com/docs/deprecations
exports.DEPRECATED_MODELS_AND_RECOMMENDED_REPLACEMENT_MODELS = {
    [OPEN_AI_MODEL.TEXT_ADA_001]: OPEN_AI_MODEL.GPT_3_5_TURBO_INSTRUCT,
    [OPEN_AI_MODEL.TEXT_BABBAGE_001]: OPEN_AI_MODEL.GPT_3_5_TURBO_INSTRUCT,
    [OPEN_AI_MODEL.TEXT_CURIE_001]: OPEN_AI_MODEL.GPT_3_5_TURBO_INSTRUCT,
    [OPEN_AI_MODEL.TEXT_DAVINCI_003]: OPEN_AI_MODEL.GPT_3_5_TURBO_INSTRUCT,
    [OPEN_AI_MODEL.CODE_DAVINCI_002]: OPEN_AI_MODEL.GPT_3_5_TURBO_INSTRUCT,
    [OPEN_AI_MODEL.TEXT_DAVINCI_EDIT_001]: OPEN_AI_MODEL.GPT_4,
    [OPEN_AI_MODEL.CODE_DAVINCI_EDIT_001]: OPEN_AI_MODEL.GPT_4,
    [OPEN_AI_MODEL.CODE_CUSHMAN_001]: OPEN_AI_MODEL.GPT_4
};
// https://platform.openai.com/docs/models
const MODEL_DESCRIPTIONS = getUpdatedDescriptions({
    [OPEN_AI_MODEL.TEXT_DAVINCI_003]: 'Can do any language task with better quality, longer output, and consistent instruction-following than the curie, babbage, or ada models. Also supports inserting completions within text.',
    [OPEN_AI_MODEL.TEXT_CURIE_001]: 'Very capable, faster and lower cost than Davinci.',
    [OPEN_AI_MODEL.TEXT_BABBAGE_001]: 'Capable of straightforward tasks, very fast, and lower cost.',
    [OPEN_AI_MODEL.TEXT_ADA_001]: 'Capable of very simple tasks, usually the fastest model in the GPT-3 series, and lowest cost.',
    [OPEN_AI_MODEL.CODE_CUSHMAN_001]: 'Capable of simple tasks, usually the fastest model in the GPT-3 series, and lowest cost.',
    [OPEN_AI_MODEL.CODE_DAVINCI_002]: 'Capable of simple tasks, usually the fastest model in the GPT-3 series, and lowest cost.',
    [OPEN_AI_MODEL.TEXT_DAVINCI_EDIT_001]: 'Can do any language task with better quality, longer output, and consistent instruction-following than the curie, babbage, or ada models. Also supports inserting completions within text.',
    [OPEN_AI_MODEL.CODE_DAVINCI_EDIT_001]: 'Capable of simple tasks, usually the fastest model in the GPT-3 series, and lowest cost.',
    [OPEN_AI_MODEL.TEXT_EMBEDDING_ADA_002]: 'Designed to replace the previous 16 first-generation embedding models at a fraction of the cost.',
    [OPEN_AI_MODEL.GPT_3_5_TURBO]: 'Most capable GPT-3.5 model and optimized for chat at 1/10th the cost of text-davinci-003. Will be updated with our latest model iteration.',
    [OPEN_AI_MODEL.GPT_3_5_TURBO_INSTRUCT]: 'Similar capabilities to the GPT-3 era models.',
    [OPEN_AI_MODEL.GPT_3_5_TURBO_16K]: 'Same capabilities as the standard gpt-3.5-turbo model but with 4 times the context.',
    [OPEN_AI_MODEL.GPT_4]: 'A model that improved on GPT-3.5 and can understand as well as generate natural language or code.',
    [OPEN_AI_MODEL.GPT_4O]: 'Multimodal flagship model that is cheaper and faster than GPT-4 Turbo.',
    [OPEN_AI_MODEL.GPT_4O_MINI]: 'Affordable and intelligent small model that’s significantly smarter, cheaper, and just as fast as GPT-3.5 Turbo',
    [OPEN_AI_MODEL.GPT_4_TURBO]: 'A faster model that improved on GPT-3.5 and can understand as well as generate natural language or code.',
    [OPEN_AI_MODEL.WHISPER_1]: 'A text-to-speech model that can generate whispers.',
    [OPEN_AI_MODEL.TEXT_MODERATION_LATEST]: 'The latest version of our text moderation model.',
    [OPEN_AI_MODEL.TEXT_MODERATION_STABLE]: 'The stable version of our text moderation model.',
    [OPEN_AI_MODEL.TEXT_EMBEDDING_3_LARGE]: 'Most capable embedding model for both english and non-english tasks.',
    [OPEN_AI_MODEL.TEXT_EMBEDDING_3_SMALL]: 'Increased performance over 2nd generation ada embedding model.'
});
exports.CHAT_COMPLETION_AI_MODELS_AND_DESCRIPTIONS = {
    [OPEN_AI_MODEL.GPT_3_5_TURBO]: MODEL_DESCRIPTIONS[OPEN_AI_MODEL.GPT_3_5_TURBO],
    [OPEN_AI_MODEL.GPT_3_5_TURBO_INSTRUCT]: MODEL_DESCRIPTIONS[OPEN_AI_MODEL.GPT_3_5_TURBO_INSTRUCT],
    [OPEN_AI_MODEL.GPT_3_5_TURBO_16K]: MODEL_DESCRIPTIONS[OPEN_AI_MODEL.GPT_3_5_TURBO_16K],
    [OPEN_AI_MODEL.GPT_4]: MODEL_DESCRIPTIONS[OPEN_AI_MODEL.GPT_4],
    [OPEN_AI_MODEL.GPT_4O]: MODEL_DESCRIPTIONS[OPEN_AI_MODEL.GPT_4O],
    [OPEN_AI_MODEL.GPT_4O_MINI]: MODEL_DESCRIPTIONS[OPEN_AI_MODEL.GPT_4O_MINI],
    [OPEN_AI_MODEL.GPT_4_TURBO]: MODEL_DESCRIPTIONS[OPEN_AI_MODEL.GPT_4_TURBO]
};
exports.TEXT_COMPLETION_AI_MODELS_AND_DESCRIPTIONS = {
    [OPEN_AI_MODEL.GPT_3_5_TURBO]: MODEL_DESCRIPTIONS[OPEN_AI_MODEL.GPT_3_5_TURBO],
    [OPEN_AI_MODEL.GPT_3_5_TURBO_INSTRUCT]: MODEL_DESCRIPTIONS[OPEN_AI_MODEL.GPT_3_5_TURBO_INSTRUCT],
    [OPEN_AI_MODEL.GPT_4]: MODEL_DESCRIPTIONS[OPEN_AI_MODEL.GPT_4],
    [OPEN_AI_MODEL.GPT_4O_MINI]: MODEL_DESCRIPTIONS[OPEN_AI_MODEL.GPT_4O_MINI],
    [OPEN_AI_MODEL.TEXT_DAVINCI_003]: MODEL_DESCRIPTIONS[OPEN_AI_MODEL.TEXT_DAVINCI_003],
    [OPEN_AI_MODEL.TEXT_CURIE_001]: MODEL_DESCRIPTIONS[OPEN_AI_MODEL.TEXT_CURIE_001],
    [OPEN_AI_MODEL.TEXT_BABBAGE_001]: MODEL_DESCRIPTIONS[OPEN_AI_MODEL.TEXT_BABBAGE_001],
    [OPEN_AI_MODEL.TEXT_ADA_001]: MODEL_DESCRIPTIONS[OPEN_AI_MODEL.TEXT_ADA_001]
};
exports.EDIT_TEXT_AI_MODELS_AND_DESCRIPTIONS = {
    [OPEN_AI_MODEL.TEXT_DAVINCI_EDIT_001]: MODEL_DESCRIPTIONS[OPEN_AI_MODEL.TEXT_DAVINCI_EDIT_001]
};
exports.EDIT_CODE_AI_MODELS_AND_DESCRIPTIONS = {
    [OPEN_AI_MODEL.CODE_DAVINCI_EDIT_001]: MODEL_DESCRIPTIONS[OPEN_AI_MODEL.CODE_DAVINCI_EDIT_001]
};
exports.EMBEDDING_AI_MODELS_AND_DESCRIPTIONS = {
    [OPEN_AI_MODEL.TEXT_EMBEDDING_ADA_002]: MODEL_DESCRIPTIONS[OPEN_AI_MODEL.TEXT_EMBEDDING_ADA_002],
    [OPEN_AI_MODEL.TEXT_EMBEDDING_3_LARGE]: MODEL_DESCRIPTIONS[OPEN_AI_MODEL.TEXT_EMBEDDING_3_LARGE],
    [OPEN_AI_MODEL.TEXT_EMBEDDING_3_SMALL]: MODEL_DESCRIPTIONS[OPEN_AI_MODEL.TEXT_EMBEDDING_3_SMALL]
};
exports.AUDIO_AI_MODELS_AND_DESCRIPTIONS = {
    [OPEN_AI_MODEL.WHISPER_1]: MODEL_DESCRIPTIONS[OPEN_AI_MODEL.WHISPER_1]
};
exports.MODERATION_AI_MODELS_AND_DESCRIPTIONS = {
    [OPEN_AI_MODEL.TEXT_MODERATION_LATEST]: MODEL_DESCRIPTIONS[OPEN_AI_MODEL.TEXT_MODERATION_LATEST],
    [OPEN_AI_MODEL.TEXT_MODERATION_STABLE]: MODEL_DESCRIPTIONS[OPEN_AI_MODEL.TEXT_MODERATION_STABLE]
};
exports.OPEN_AI_SUPPORTED_IMAGE_SIZES = ['256x256', '512x512', '1024x1024'];
var OPEN_AI_GENERATE_TEXT_TYPES;
(function (OPEN_AI_GENERATE_TEXT_TYPES) {
    OPEN_AI_GENERATE_TEXT_TYPES["NEW_TEXT"] = "New Text";
    OPEN_AI_GENERATE_TEXT_TYPES["EDIT_TEXT"] = "Edit Text";
})(OPEN_AI_GENERATE_TEXT_TYPES || (exports.OPEN_AI_GENERATE_TEXT_TYPES = OPEN_AI_GENERATE_TEXT_TYPES = {}));
exports.OPEN_AI_GENERATE_TEXT_TYPES_AND_DESCRIPTIONS = {
    [OPEN_AI_GENERATE_TEXT_TYPES.NEW_TEXT]: 'Given a prompt, the model will return a predicted text completion',
    [OPEN_AI_GENERATE_TEXT_TYPES.EDIT_TEXT]: 'Given text, the model will edit the text based on the prompt.'
};
var OPEN_AI_GENERATE_CODE_TYPES;
(function (OPEN_AI_GENERATE_CODE_TYPES) {
    OPEN_AI_GENERATE_CODE_TYPES["NEW_CODE"] = "New Code";
    OPEN_AI_GENERATE_CODE_TYPES["EDIT_CODE"] = "Edit Code";
})(OPEN_AI_GENERATE_CODE_TYPES || (exports.OPEN_AI_GENERATE_CODE_TYPES = OPEN_AI_GENERATE_CODE_TYPES = {}));
exports.OPEN_AI_GENERATE_CODE_TYPES_AND_DESCRIPTIONS = {
    [OPEN_AI_GENERATE_CODE_TYPES.NEW_CODE]: 'Given a prompt, the model will return code completion.',
    [OPEN_AI_GENERATE_CODE_TYPES.EDIT_CODE]: 'Given a code snippet, the model will edit the code based on the prompt.'
};
var OPEN_AI_GENERATE_IMAGE_TYPES;
(function (OPEN_AI_GENERATE_IMAGE_TYPES) {
    OPEN_AI_GENERATE_IMAGE_TYPES["GENERATE_FROM_PROMPT"] = "Generate from Prompt";
    OPEN_AI_GENERATE_IMAGE_TYPES["EDIT_IMAGE"] = "Edit Image";
    OPEN_AI_GENERATE_IMAGE_TYPES["VARY_IMAGE"] = "Vary Image";
})(OPEN_AI_GENERATE_IMAGE_TYPES || (exports.OPEN_AI_GENERATE_IMAGE_TYPES = OPEN_AI_GENERATE_IMAGE_TYPES = {}));
exports.OPEN_AI_GENERATE_IMAGE_TYPES_AND_DESCRIPTIONS = {
    [OPEN_AI_GENERATE_IMAGE_TYPES.GENERATE_FROM_PROMPT]: 'Given a prompt, the model will generate a new image.',
    [OPEN_AI_GENERATE_IMAGE_TYPES.EDIT_IMAGE]: 'Given an original image and a prompt, the model will create an edited or extended image.',
    [OPEN_AI_GENERATE_IMAGE_TYPES.VARY_IMAGE]: 'Given an original image, the model will create a variation of the image.'
};
// source: https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes
exports.OPEN_AI_TRANSCRIBE_LANGUAGES_AND_ISO_639_1_CODES = {
    'Auto Detect': '',
    Afrikaans: 'af',
    Arabic: 'ar',
    Armenian: 'hy',
    Azerbaijani: 'az',
    Belarusian: 'be',
    Bosnian: 'bs',
    Bulgarian: 'bg',
    'Catalan, Valencian': 'ca',
    Chinese: 'zh',
    Croatian: 'hr',
    Czech: 'cs',
    Danish: 'da',
    'Dutch, Flemish': 'nl',
    English: 'en',
    Estonian: 'et',
    Finnish: 'fi',
    French: 'fr',
    Galician: 'gl',
    German: 'de',
    'Greek, Modern (1453–)': 'el',
    Hebrew: 'he',
    Hindi: 'hi',
    Hungarian: 'hu',
    Icelandic: 'is',
    Indonesian: 'id',
    Italian: 'it',
    Japanese: 'ja',
    Kannada: 'kn',
    Kazakh: 'kk',
    Korean: 'ko',
    Latvian: 'lv',
    Lithuanian: 'lt',
    Macedonian: 'mk',
    Malay: 'ms',
    Maori: 'mi',
    Marathi: 'mr',
    Nepali: 'ne',
    Norwegian: 'no',
    Persian: 'fa',
    Polish: 'pl',
    Portuguese: 'pt',
    'Romanian, Moldavian, Moldovan': 'ro',
    Russian: 'ru',
    Serbian: 'sr',
    Slovak: 'sk',
    Slovenian: 'sl',
    'Spanish, Castilian': 'es',
    Swahili: 'sw',
    Swedish: 'sv',
    Tagalog: 'tl',
    Tamil: 'ta',
    Thai: 'th',
    Turkish: 'tr',
    Ukrainian: 'uk',
    Urdu: 'ur',
    Vietnamese: 'vi',
    Welsh: 'cy'
};
exports.OPEN_AI_DEFAULT_MAX_TOKENS = 256;
exports.OPEN_AI_DEFAULT_TEMPERATURE = 1;
exports.OPEN_AI_DOC_LINKS = {
    GENERATE_CHATGPT_RESPONSE: 'https://platform.openai.com/docs/guides/chat/chat-completions-beta',
    GENERATE_TEXT_NEW: 'https://platform.openai.com/docs/guides/completion/introduction',
    GENERATE_TEXT_EDIT: 'https://platform.openai.com/docs/guides/completion/editing-text',
    GENERATE_CODE_NEW: 'https://platform.openai.com/docs/guides/code',
    GENERATE_CODE_EDIT: 'https://platform.openai.com/docs/guides/code/editing-code',
    GENERATE_IMAGE_NEW: 'https://platform.openai.com/docs/guides/images/generations',
    GENERATE_IMAGE_EDIT: 'https://platform.openai.com/docs/guides/images/edits',
    GENERATE_IMAGE_VARY: 'https://platform.openai.com/docs/guides/images/variations',
    MODERATION: 'https://platform.openai.com/docs/guides/moderation',
    TRANSCRIBE_AUDIO: 'https://platform.openai.com/docs/guides/speech-to-text/transcriptions',
    TRANSCRIBE_AUDIO_TRANSLATE: 'https://platform.openai.com/docs/guides/speech-to-text/translations',
    EMBEDDINGS: 'https://platform.openai.com/docs/guides/embeddings/what-are-embeddings'
};
function getUpdatedDescriptions(modelsAndDescriptions) {
    const newModelsAndDescriptions = {};
    for (const [model, description] of Object.entries(modelsAndDescriptions)) {
        let newDescription = description;
        if (Object.keys(exports.DEPRECATED_MODELS_AND_RECOMMENDED_REPLACEMENT_MODELS).includes(model)) {
            // deprecated model
            const replacementModel = exports.DEPRECATED_MODELS_AND_RECOMMENDED_REPLACEMENT_MODELS[model];
            newDescription = `This model has been deprecated, use '${replacementModel}' instead.`;
        }
        newModelsAndDescriptions[model] = newDescription;
    }
    return newModelsAndDescriptions;
}
// SQL
exports.PARAMETERIZED_SQL_DESCRIPTION = 'Using parameterized SQL provides SQL injection protection but inhibits the use of JavaScript to generate SQL.';
//# sourceMappingURL=constants.js.map