Skip to content

Commit

Permalink
Merge pull request #43 from animalnots/dev
Browse files Browse the repository at this point in the history
Hotfix for model list
  • Loading branch information
animalnots committed Aug 15, 2024
2 parents d7cc08c + dc7b5ae commit 1851642
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 15 deletions.
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
```
```

# Models update
update models.json at
https://openrouter.ai/api/v1/models
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "better-chatgpt",
"private": true,
"version": "1.6.0",
"version": "1.7.0",
"type": "module",
"homepage": "./",
"main": "electron/index.cjs",
Expand Down
File renamed without changes.
2 changes: 0 additions & 2 deletions src/data/readme.md

This file was deleted.

21 changes: 10 additions & 11 deletions src/utils/modelReader.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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[];
Expand All @@ -49,21 +48,21 @@ 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',
},
{
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',
},
Expand Down Expand Up @@ -119,4 +118,4 @@ export const loadModels = async (): Promise<{
return { modelOptions, modelMaxToken, modelCost, modelTypes };
};

export type ModelOptions = string;
export type ModelOptions = string;

0 comments on commit 1851642

Please sign in to comment.