UNPKG

optimizeit

Version:

OptimizeIt is a command-line tool that automatically optimizes source code for performance and readability, supporting multiple programming languages and configurable settings.

22 lines (21 loc) 851 B
"use strict"; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); const getFlagValue_1 = __importDefault(require("../helpers/getFlagValue")); /** * This function handles the model flag and returns the model name. * * @param { string[] } args - The arguments passed to the CLI. * @param { string } modelConfig - The model name from the config file. * @returns { string } The model name. */ function handleModelFlag(args, modelConfig = 'llama-3.1-70b-versatile') { const model = (0, getFlagValue_1.default)(args, ['-m', '--model'], modelConfig) || modelConfig; if (model !== modelConfig) { console.log('model:', model); } return model; } exports.default = handleModelFlag;