Skip to content

module OpenAI #

Extended modules

OpenAI

Constants#

ADA_CODE_SEARCH_CODE = "code-search-ada-code-001"#

ADA_CODE_SEARCH_TEXT = "code-search-ada-text-001"#

ADA_EMBEDDING_V2 = "text-embedding-ada-002"#

ADA_SEARCH_DOCUMENT = "text-search-ada-doc-001"#

ADA_SEARCH_QUERY = "text-search-ada-query-001"#

ADA_SIMILARITY = "text-similarity-ada-001"#

ASSISTANT_API_PATH = "/v1/assistants"#

ASSISTANT_FILES_API_PATH = "/v1/files"#

AZURE_API_KEY_HEADER = "api-key"#

AZURE_API_PREFIX = "openai"#

AZURE_DEPLOYMENTS_PREFIX = "deployments"#

BABBAGE_CODE_SEARCH_CODE = "code-search-babbage-code-001"#

BABBAGE_CODE_SEARCH_TEXT = "code-search-babbage-text-001"#

BABBAGE_SEARCH_DOCUMENT = "text-search-babbage-doc-001"#

BABBAGE_SEARCH_QUERY = "text-search-babbage-query-001"#

BABBAGE_SIMILARITY = "text-similarity-babbage-001"#

CHAT_COMPLETIONS_SUFFIX = "/v1/chat/completions"#

CODEX_CODE_CUSHMAN_001 = "code-cushman-001"#

CODEX_CODE_DAVINCI_001 = "code-davinci-001"#

CODEX_CODE_DAVINCI_002 = "code-davinci-002"#

COMPLETIONS_SUFFIX = "/v1/completions"#

CURIE_SEARCH_DOCUMENT = "text-search-curie-doc-001"#

CURIE_SEARCH_QUERY = "text-search-curie-query-001"#

CURIE_SIMILARITY = "text-similarity-curie-001"#

DAVINCI_SEARCH_DOCUMENT = "text-search-davinci-doc-001"#

DAVINCI_SEARCH_QUERY = "text-search-davinci-query-001"#

DAVINCI_SIMILARITY = "text-similarity-davinci-001"#

DEFAULT_ASSISTANT_VERSION = "v1"#

DEFAULT_EMPTY_MESSAGES_LIMIT = 300_u32#

DISABLED_MODELS_FOR_ENDPOINTS = {COMPLETIONS_SUFFIX => {GPT3DOT5_TURBO => true, GPT3DOT5_TURBO_0301 => true, GPT3DOT5_TURBO_0613 => true, GPT3DOT5_TURBO_1106 => true, GPT3DOT5_TURBO_0125 => true, GPT3DOT5_TURBO_16K => true, GPT3DOT5_TURBO_16K_0613 => true, GPT4 => true, GPT4_TURBO_PREVIEW => true, GPT4_VISION_PREVIEW => true, GPT4_TURBO_1106 => true, GPT4_TURBO_0125 => true, GPT4_TURBO => true, GPT4_TURBO_20240409 => true, GPT4_0314 => true, GPT4_0613 => true, GPT4_32K => true, GPT4_32K_0314 => true, GPT4_32K_0613 => true}, CHAT_COMPLETIONS_SUFFIX => {CODEX_CODE_DAVINCI_002 => true, CODEX_CODE_CUSHMAN_001 => true, CODEX_CODE_DAVINCI_001 => true, GPT3_DAVINCI_INSTRUCT_BETA => true, GPT3_DAVINCI => true, GPT3_DAVINCI_INSTRUCT_BETA => true, GPT3_CURIE => true, GPT3_ADA => true, GPT3_BABBAGE => true}}#

GPT3_ADA = "ada"#

GPT3_ADA_002 = "ada-002"#

GPT3_BABBAGE = "babbage"#

GPT3_BABBAGE_002 = "babbage-002"#

GPT3_CURIE = "curie"#

GPT3_CURIE_002 = "curie-002"#

GPT3_DAVINCI = "davinci"#

GPT3_DAVINCI_002 = "davinci-002"#

GPT3_DAVINCI_INSTRUCT_BETA = "davinci-instruct-beta"#

GPT3DOT5_TURBO = "gpt-3.5-turbo"#

GPT3DOT5_TURBO_0125 = "gpt-3.5-turbo-0125"#

GPT3DOT5_TURBO_0301 = "gpt-3.5-turbo-0301"#

GPT3DOT5_TURBO_0613 = "gpt-3.5-turbo-0613"#

GPT3DOT5_TURBO_1106 = "gpt-3.5-turbo-1106"#

GPT3DOT5_TURBO_16K = "gpt-3.5-turbo-16k"#

GPT3DOT5_TURBO_16K_0613 = "gpt-3.5-turbo-16k-0613"#

GPT3DOT5_TURBO_INSTRUCT = "gpt-3.5-turbo-instruct"#

GPT4 = "gpt-4"#

GPT4_0314 = "gpt-4-0314"#

GPT4_0613 = "gpt-4-0613"#

GPT4_32K = "gpt-4-32k"#

GPT4_32K_0314 = "gpt-4-32k-0314"#

GPT4_32K_0613 = "gpt-4-32k-0613"#

GPT4_TURBO = "gpt-4-turbo"#

GPT4_TURBO_0125 = "gpt-4-0125-preview"#

GPT4_TURBO_1106 = "gpt-4-1106-preview"#

GPT4_TURBO_20240409 = "gpt-4-turbo-2024-04-09"#

GPT4_TURBO_PREVIEW = "gpt-4-turbo-preview"#

GPT4_VISION_PREVIEW = "gpt-4-vision-preview"#

LARGE_EMBEDDING_3 = "text-embedding-3-large"#

OPENAI_API_URL_V1 = "api.openai.com"#

OPENAI_ASSISTANTS_V1 = "assistants=v1"#

SMALL_EMBEDDING_3 = "text-embedding-3-small"#

VERSION = "0.1.0"#

Methods#

#endpoint_supports_model(endpoint : String, model : String) : Bool#

View source