Skip to content

Commit

Permalink
-m, --model description dynamically pulls all available models
Browse files Browse the repository at this point in the history
  • Loading branch information
peterdanwan committed Sep 15, 2024
1 parent 1111e3f commit b007d3b
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
10 changes: 10 additions & 0 deletions src/ai_models/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import geminiModels from './geminiModels.js';
import groqModels from './groqModels.js';

// Combine the two arrays and flatten them
const combinedModels = [...geminiModels, ...groqModels].flat();

// Convert the combined array to a comma-separated string
const modelsString = combinedModels.join(', ');

export default modelsString;
3 changes: 2 additions & 1 deletion src/commanderProgram.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
// Lets us use commonjs require syntax for older modules
import { createRequire } from 'module';
import chalk from 'chalk';
import modelsString from './ai_models/index.js';

const require = createRequire(import.meta.url);
const { name, version, description } = require('../package.json');
Expand Down Expand Up @@ -34,7 +35,7 @@ program.option('-f, --file [files...]', 'specify the files you wish to get expla
program.option('-o, --outputFile <string>', 'specify the file you wish to output to');
program.option(
'-m, --model <string>',
"specify which free-tier model you'd want to use (e.g., gemini, openai, grok)"
`specify which free-tier model you'd want to use (e.g., ${modelsString})`
);
program.option('-p, --prompt <string>', 'specify a custom prompt');
program.option(
Expand Down

0 comments on commit b007d3b

Please sign in to comment.