Refactor getGPTWebModelString function to update model conversion logic
This commit is contained in:
parent
3be8d24255
commit
5ccc312695
1 changed files with 2 additions and 8 deletions
|
|
@ -175,6 +175,8 @@ export function sanitizeHtml(input) {
|
||||||
return input.replace(/<(?!br\s*\/?)[^>]+>/gi, '');
|
return input.replace(/<(?!br\s*\/?)[^>]+>/gi, '');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// This method is used to convert the model string id used in the URL
|
||||||
|
// to the model string used in the webpage
|
||||||
export function getGPTWebModelString(model) {
|
export function getGPTWebModelString(model) {
|
||||||
model = model.toLowerCase().trim();
|
model = model.toLowerCase().trim();
|
||||||
switch (model) {
|
switch (model) {
|
||||||
|
|
@ -183,14 +185,6 @@ export function getGPTWebModelString(model) {
|
||||||
return '4o';
|
return '4o';
|
||||||
case 'gpt-4o-mini':
|
case 'gpt-4o-mini':
|
||||||
return '4o mini';
|
return '4o mini';
|
||||||
case 'gpt-4':
|
|
||||||
return 'gpt-4';
|
|
||||||
case 'o1':
|
|
||||||
return 'o1';
|
|
||||||
case 'o3-mini':
|
|
||||||
return 'o3-mini';
|
|
||||||
case 'o3-mini-high':
|
|
||||||
return 'o3-mini-high';
|
|
||||||
default:
|
default:
|
||||||
return model;
|
return model;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue