Skip to content

Commit

Permalink
updated GPT version:
Browse files Browse the repository at this point in the history
  • Loading branch information
A-F-V committed May 4, 2024
1 parent db560cb commit 5d682fd
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/AIFeed.ts
Original file line number Diff line number Diff line change
Expand Up @@ -154,9 +154,9 @@ export default class AIFeed {

public async logCost(input: string, output: string) {
const inputPrice =
this.settings.MODEL_TYPE == 'gpt-4-1106-preview' ? 0.01 : 0.001;
this.settings.MODEL_TYPE == 'gpt-4-turbo' ? 0.01 : 0.0005;
const outputPrice =
this.settings.MODEL_TYPE == 'gpt-4-1106-preview' ? 0.03 : 0.002;
this.settings.MODEL_TYPE == 'gpt-4-turbo' ? 0.03 : 0.0015;

const inputTokens = await this.tokenize(input);
const outputTokens = await this.tokenize(output);
Expand Down
2 changes: 1 addition & 1 deletion src/components/ArcanaSettingsTab.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ export default class ArcanaSettingsTab extends PluginSettingTab {
.addDropdown(dropdown => {
dropdown
.addOption('gpt-3.5-turbo', 'GPT3.5')
.addOption('gpt-4-1106-preview', 'GPT4')
.addOption('gpt-4-turbo', 'GPT4')
.setValue(this.plugin.settings.MODEL_TYPE)
.onChange(async value => {
this.plugin.settings.MODEL_TYPE = value as AvailableModels;
Expand Down
4 changes: 2 additions & 2 deletions src/include/ArcanaSettings.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
export type AvailableModels = 'gpt-3.5-turbo' | 'gpt-4-1106-preview';
export type AvailableModels = 'gpt-3.5-turbo' | 'gpt-4-turbo';

export function isAvailableModel(model: string): model is AvailableModels {
return model == 'gpt-3.5-turbo' || model == 'gpt-4-1106-preview';
return model == 'gpt-3.5-turbo' || model == 'gpt-4-turbo';
}

export default interface ArcanaSettings {
Expand Down

0 comments on commit 5d682fd

Please sign in to comment.