getGPTWebModelString improved
This commit is contained in:
parent
03f2cfafab
commit
640ff4fa50
1 changed files with 2 additions and 0 deletions
|
|
@ -251,6 +251,7 @@ export function convertNewlinesToParagraphs(input) {
|
||||||
// This method is used to convert the model string id used in the URL
|
// This method is used to convert the model string id used in the URL
|
||||||
// to the model string used in the webpage
|
// to the model string used in the webpage
|
||||||
export function getGPTWebModelString(model) {
|
export function getGPTWebModelString(model) {
|
||||||
|
if (!model) return '';
|
||||||
model = model.toLowerCase().trim();
|
model = model.toLowerCase().trim();
|
||||||
switch (model) {
|
switch (model) {
|
||||||
case 'gpt-5':
|
case 'gpt-5':
|
||||||
|
|
@ -639,6 +640,7 @@ export function validateChatGPTWebCustomData(data) {
|
||||||
}
|
}
|
||||||
|
|
||||||
export function sanitizeChatGPTModelData(input) {
|
export function sanitizeChatGPTModelData(input) {
|
||||||
|
if(!input) return '';
|
||||||
return encodeURIComponent(input).toLowerCase()
|
return encodeURIComponent(input).toLowerCase()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue