Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Default the gpt4 model to gpt-4-turbo-preview #58

Merged
merged 1 commit into from
Jan 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ By leveraging the templating feature, prompt engineers can significantly reduce
| Option | Description |
| ------ | ----------- |
| `-p, --prompt <prompt>` | Specifies the prompt to use in non-interactive mode. A path or a url can also be specified - in this case the content at the specified path or url is used as the prompt. The prompt can leverage the liquidjs templating system. |
| `-m, --model <model>` | Optional flag to set the model, defaults to `gpt-4-1106-preview`. Using the value "gpt3" will use the `gpt-3.5-turbo` model. |
| `-m, --model <model>` | Optional flag to set the model, defaults to `gpt-4-turbo-preview`. Using the value "gpt3" will use the `gpt-3.5-turbo` model. |
| `-d, --dry-run` | Optional boolean flag that can be used to run the tool in dry-run mode where only the prompt that will be sent to the model is displayed. No changes are made to your filesystem when this option is used. |
| `-i, --interactive` | Optional boolean flag that enables interactive mode where the user can provide input interactively. If this flag is not set, the tool runs in non-interactive mode. |
| `-t, --template <templateName | templatePath | templateUrl>` | Optional string flag that specifies a built in template name, the absolute path to a template file, or a url for a template file that will be used to generate the output. The default is the built in `refactor` template. The available built in templates are: `empty`, `refactor`, `swe`, and `test-first`. The prompt is interpolated with the template to form the payload sent to the model. |
Expand Down
2 changes: 1 addition & 1 deletion src/CliState.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export default class CliState {
this.program.option('-t, --template <template>', 'Teplate name, template path, or a url for a template file')
this.program.option('-o, --output-path <outputPath>', 'Path to output file. If no path is specified, output will be printed to stdout.')
this.program.option('-v, --verbose', 'Verbose output')
this.program.option('-m, --model <model>', 'Specify the model to use', 'gpt-4-1106-preview')
this.program.option('-m, --model <model>', 'Specify the model to use', 'gpt-4-turbo-preview')
this.program.option('-dac, --disable-auto-context', 'Prevents files referenced in the prompt from being automatically included in the context sent to the model.');

this.program.version(version, '--version', 'Display the current version')
Expand Down
2 changes: 1 addition & 1 deletion src/services/OpenAiGptService.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export default class OpenAiGptService {

static async call(prompt, model, requestJsonOutput = true) {
if (model == "gpt3") model = "gpt-3.5-turbo";
if (model == "gpt4") model = "gpt-4-1106-preview";
if (model == "gpt4") model = "gpt-4-turbo-preview";

const configuration = new Configuration({
apiKey: process.env.OPENAI_API_KEY
Expand Down
2 changes: 1 addition & 1 deletion test/OpenAiGptService.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ describe('OpenAiGptService', () => {
const prompt = 'What is the capital of France?';
const expectedResult = 'The capital of France is Paris.';
const models = ['gpt3', 'gpt4'];
const expectedModels = ['gpt-3.5-turbo', 'gpt-4-1106-preview'];
const expectedModels = ['gpt-3.5-turbo', 'gpt-4-turbo-preview'];

const openaiStub = sinon.stub(OpenAIApi.prototype, 'createChatCompletion').resolves({
data: {
Expand Down
Loading