diff --git a/README.md b/README.md index d669308c6..459947de6 100644 --- a/README.md +++ b/README.md @@ -252,4 +252,8 @@ Example of files that had to be changed in order for a new settings to be added - src/store/store.ts - src/types/chat.ts - src/utils/import.ts -``` \ No newline at end of file +``` + +# Models update +update models.json at +https://openrouter.ai/api/v1/models \ No newline at end of file diff --git a/package.json b/package.json index b5a37bfcf..6fb4062ed 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "better-chatgpt", "private": true, - "version": "1.6.0", + "version": "1.7.0", "type": "module", "homepage": "./", "main": "electron/index.cjs", diff --git a/src/data/models.json b/public/models.json similarity index 100% rename from src/data/models.json rename to public/models.json diff --git a/src/data/readme.md b/src/data/readme.md deleted file mode 100644 index f125b082e..000000000 --- a/src/data/readme.md +++ /dev/null @@ -1,2 +0,0 @@ -update models.json at -https://openrouter.ai/api/v1/models \ No newline at end of file diff --git a/src/utils/modelReader.ts b/src/utils/modelReader.ts index b21da731b..b3e352751 100644 --- a/src/utils/modelReader.ts +++ b/src/utils/modelReader.ts @@ -26,8 +26,7 @@ interface ModelData { interface ModelsJson { data: ModelData[]; } - -const modelsJsonUrl = '/src/data/models.json'; +const modelsJsonUrl = 'models.json'; export const loadModels = async (): Promise<{ modelOptions: string[]; @@ -49,10 +48,10 @@ export const loadModels = async (): Promise<{ id: 'gpt-4-0125-preview', context_length: 128000, pricing: { - "prompt": "0.00001", - "completion": "0.00003", - "image": "0.01445", - "request": "0" + prompt: '0.00001', + completion: '0.00003', + image: '0.01445', + request: '0', }, type: 'text', }, @@ -60,10 +59,10 @@ export const loadModels = async (): Promise<{ id: 'gpt-4-turbo-2024-04-09', context_length: 128000, pricing: { - "prompt": "0.00001", - "completion": "0.00003", - "image": "0.01445", - "request": "0" + prompt: '0.00001', + completion: '0.00003', + image: '0.01445', + request: '0', }, type: 'text', }, @@ -119,4 +118,4 @@ export const loadModels = async (): Promise<{ return { modelOptions, modelMaxToken, modelCost, modelTypes }; }; -export type ModelOptions = string; \ No newline at end of file +export type ModelOptions = string;