MCPcopy
hub / github.com/enricoros/big-AGI / parseArgs

Function parseArgs

tools/develop/llm-parameter-sweep/sweep.ts:1472–1559  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1470}
1471
1472function parseArgs(): CliOptions {
1473 const args = process.argv.slice(2);
1474 const options: CliOptions = {
1475 delay: 1000,
1476 maxModels: 100,
1477 verbose: false,
1478 debug: false,
1479 includeSymlinks: false,
1480 dryRun: false,
1481 sequential: false,
1482 mergeModels: false,
1483 };
1484
1485 for (let i = 0; i < args.length; i++) {
1486 const arg = args[i];
1487 switch (arg) {
1488 case '--config':
1489 case '-c':
1490 options.config = args[++i];
1491 break;
1492 case '--dialect':
1493 case '-d':
1494 options.dialect = args[++i];
1495 break;
1496 case '--key':
1497 options.key = args[++i];
1498 break;
1499 case '--host':
1500 options.host = args[++i];
1501 break;
1502 case '--model-filter':
1503 case '-m':
1504 options.modelFilter = args[++i];
1505 break;
1506 case '--sweep-filter':
1507 options.sweepFilter = args[++i];
1508 break;
1509 case '--delay':
1510 options.delay = parseInt(args[++i], 10);
1511 break;
1512 case '--max-models':
1513 options.maxModels = parseInt(args[++i], 10);
1514 break;
1515 case '--verbose':
1516 case '-v':
1517 options.verbose = true;
1518 break;
1519 case '--debug':
1520 options.debug = true;
1521 break;
1522 case '--include-symlinks':
1523 options.includeSymlinks = true;
1524 break;
1525 case '--dry-run':
1526 options.dryRun = true;
1527 break;
1528 case '--sequential':
1529 options.sequential = true;

Callers 1

mainFunction · 0.70

Calls 3

printUsageFunction · 0.85
errorMethod · 0.80
logMethod · 0.80

Tested by

no test coverage detected