New ChatGPT model
| @@ -383,7 +383,7 @@ | |||
| 383 | Max Response Length (tokens) | 383 | Max Response Length (tokens) |
| 384 | </div> | 384 | </div> |
| 385 | <div class="wide100p"> | 385 | <div class="wide100p"> |
| 386 | <input type="number" id="openai_max_tokens" name="openai_max_tokens" class="text_pole" min="50" max="8000"> | 386 | <input type="number" id="openai_max_tokens" name="openai_max_tokens" class="text_pole" min="1" max="16384"> |
| 387 | </div> | 387 | </div> |
| 388 | </div> | 388 | </div> |
| 389 | <div class="range-block" data-source="openai,custom"> | 389 | <div class="range-block" data-source="openai,custom"> |
| @@ -2573,6 +2573,7 @@ | |||
| 2573 | <option value="gpt-4o">gpt-4o</option> | 2573 | <option value="gpt-4o">gpt-4o</option> |
| 2574 | <option value="gpt-4o-2024-08-06">gpt-4o-2024-08-06</option> | 2574 | <option value="gpt-4o-2024-08-06">gpt-4o-2024-08-06</option> |
| 2575 | <option value="gpt-4o-2024-05-13">gpt-4o-2024-05-13</option> | 2575 | <option value="gpt-4o-2024-05-13">gpt-4o-2024-05-13</option> |
| 2576 | <option value="chatgpt-4o-latest">chatgpt-4o-latest</option> | ||
| 2576 | </optgroup> | 2577 | </optgroup> |
| 2577 | <optgroup label="gpt-4o-mini"> | 2578 | <optgroup label="gpt-4o-mini"> |
| 2578 | <option value="gpt-4o-mini">gpt-4o-mini</option> | 2579 | <option value="gpt-4o-mini">gpt-4o-mini</option> |
| @@ -3921,7 +3921,7 @@ function getMaxContextOpenAI(value) { | |||
| 3921 | if (oai_settings.max_context_unlocked) { | 3921 | if (oai_settings.max_context_unlocked) { |
| 3922 | return unlocked_max; | 3922 | return unlocked_max; |
| 3923 | } | 3923 | } |
| 3924 | else if (value.includes('gpt-4-turbo') || value.includes('gpt-4o') || value.includes('gpt-4-1106') || value.includes('gpt-4-0125') || value.includes('gpt-4-vision')) { | 3924 | else if (value.includes('chatgpt-4o-latest') || value.includes('gpt-4-turbo') || value.includes('gpt-4o') || value.includes('gpt-4-1106') || value.includes('gpt-4-0125') || value.includes('gpt-4-vision')) { |
| 3925 | return max_128k; | 3925 | return max_128k; |
| 3926 | } | 3926 | } |
| 3927 | else if (value.includes('gpt-3.5-turbo-1106')) { | 3927 | else if (value.includes('gpt-3.5-turbo-1106')) { |
| @@ -4768,7 +4768,7 @@ export function isImageInliningSupported() { | |||
| 4768 | 4768 | ||
| 4769 | switch (oai_settings.chat_completion_source) { | 4769 | switch (oai_settings.chat_completion_source) { |
| 4770 | case chat_completion_sources.OPENAI: | 4770 | case chat_completion_sources.OPENAI: |
| 4771 | return visionSupportedModels.some(model => oai_settings.openai_model.includes(model) && !oai_settings.openai_model.includes('gpt-4-turbo-preview')); | 4771 | return visionSupportedModels.some(model => oai_settings.openai_model.includes(model) && !oai_settings.openai_model.includes('chatgpt-4o-latest') && !oai_settings.openai_model.includes('gpt-4-turbo-preview')); |
| 4772 | case chat_completion_sources.MAKERSUITE: | 4772 | case chat_completion_sources.MAKERSUITE: |
| 4773 | return visionSupportedModels.some(model => oai_settings.google_model.includes(model)); | 4773 | return visionSupportedModels.some(model => oai_settings.google_model.includes(model)); |
| 4774 | case chat_completion_sources.CLAUDE: | 4774 | case chat_completion_sources.CLAUDE: |
| @@ -268,6 +268,10 @@ function getTokenizerModel(requestModel) { | |||
| 268 | return 'gpt-4o'; | 268 | return 'gpt-4o'; |
| 269 | } | 269 | } |
| 270 | 270 | ||
| 271 | if (requestModel.includes('chatgpt-4o-latest')) { | ||
| 272 | return 'gpt-4o'; | ||
| 273 | } | ||
| 274 | |||
| 271 | if (requestModel.includes('gpt-4-32k')) { | 275 | if (requestModel.includes('gpt-4-32k')) { |
| 272 | return 'gpt-4-32k'; | 276 | return 'gpt-4-32k'; |
| 273 | } | 277 | } |