fetchModels ouput are only the gpt- models ordered by id desc
This commit is contained in:
parent
2576800e94
commit
59ec47b2e8
1 changed files with 4 additions and 1 deletions
|
|
@ -45,7 +45,10 @@ export class OpenAI {
|
|||
console.log(err_msg);
|
||||
throw new Error(err_msg);
|
||||
}
|
||||
return await response.json();
|
||||
|
||||
let output = await response.json();
|
||||
|
||||
return output.data.filter(item => item.id.startsWith('gpt-')).sort((a, b) => b.id.localeCompare(a.id));
|
||||
}
|
||||
|
||||
fetchResponse = async (model, messages, maxTokens = 0) => {
|
||||
|
|
|
|||
Loading…
Reference in a new issue