polyfact
Version:
<h1 align="center">PolyFact</h1>
29 lines (28 loc) • 1.4 kB
JavaScript
Object.defineProperty(exports, "__esModule", { value: true });
exports.getEmbeddingSize = exports.getModelSize = exports.models = void 0;
exports.models = {
"gpt-3.5-turbo-16k": { resolvedName: "gpt-3.5-turbo-16k", contextSize: 16384 },
"gpt-3.5-turbo": { resolvedName: "gpt-3.5-turbo", contextSize: 4096 },
"gpt-4-32k-": { resolvedName: "gpt-4-32k", contextSize: 32768 },
"gpt-4": { resolvedName: "gpt-4", contextSize: 8192 },
"code-davinci-002": { resolvedName: "code-davinci-002", contextSize: 8000 },
"text-davinci-003": { resolvedName: "text-davinci-003", contextSize: 4097 },
"text-curie-001": { resolvedName: "text-curie-001", contextSize: 2048 },
"text-babbage-001": { resolvedName: "text-babbage-001", contextSize: 2048 },
"text-ada-001": { resolvedName: "text-ada-001", contextSize: 2048 },
"code-cushman-001": { resolvedName: "code-cushman-001", contextSize: 2048 },
};
var getModelSize = function (modelName) {
for (var prefix in exports.models) {
if (modelName.startsWith(prefix)) {
return exports.models[prefix].contextSize;
}
}
throw new Error("Unknown model name: ".concat(modelName));
};
exports.getModelSize = getModelSize;
var getEmbeddingSize = function (modelName) {
return modelName === "text-embedding-ada-002" ? 8191 : 2046;
};
exports.getEmbeddingSize = getEmbeddingSize;
;