| 2597 | 2597 | } |
| 2598 | 2598 | |
| 2599 | 2599 | // Remove logit bias/logprobs/stop-strings if not supported by the model |
| 2600 | 2600 | const isVision = (m) => ['gpt', 'vision'].every(x => typeof m === 'string' && m.includes(x)); |
| 2601 | 2601 | if (gptSources.includes(settings.chat_completion_source) && isVision(model)) { |
| 2602 | 2602 | delete generate_data.logit_bias; |
| 2603 | 2603 | delete generate_data.stop; |
| 2604 | 2604 | delete generate_data.logprobs; |
| 2605 | 2605 | } |
| 2606 | 2606 | if (gptSources.includes(settings.chat_completion_source) && model.includes('/gpt-4.5'/.test(model)) { |
| 2607 | 2607 | delete generate_data.logprobs; |
| 2608 | 2608 | } |
| 2609 | 2609 | |