Add reasoning_effort to Custom. Update inline image quality style
| @@ -1957,6 +1957,7 @@ | |||
| 1957 | <span data-i18n="image_inlining_hint_3">menu to attach an image file to the chat.</span> | 1957 | <span data-i18n="image_inlining_hint_3">menu to attach an image file to the chat.</span> |
| 1958 | </div> | 1958 | </div> |
| 1959 | <div class="flex-container flexFlowColumn wide100p textAlignCenter marginTop10" data-source="openai,custom"> | 1959 | <div class="flex-container flexFlowColumn wide100p textAlignCenter marginTop10" data-source="openai,custom"> |
| 1960 | <div class="flex-container oneline-dropdown"> | ||
| 1960 | <label for="openai_inline_image_quality" data-i18n="Inline Image Quality"> | 1961 | <label for="openai_inline_image_quality" data-i18n="Inline Image Quality"> |
| 1961 | Inline Image Quality | 1962 | Inline Image Quality |
| 1962 | </label> | 1963 | </label> |
| @@ -1967,6 +1968,7 @@ | |||
| 1967 | </select> | 1968 | </select> |
| 1968 | </div> | 1969 | </div> |
| 1969 | </div> | 1970 | </div> |
| 1971 | </div> | ||
| 1970 | <div class="range-block" data-source="makersuite"> | 1972 | <div class="range-block" data-source="makersuite"> |
| 1971 | <label for="use_makersuite_sysprompt" class="checkbox_label widthFreeExpand"> | 1973 | <label for="use_makersuite_sysprompt" class="checkbox_label widthFreeExpand"> |
| 1972 | <input id="use_makersuite_sysprompt" type="checkbox" /> | 1974 | <input id="use_makersuite_sysprompt" type="checkbox" /> |
| @@ -1995,7 +1997,7 @@ | |||
| 1995 | </span> | 1997 | </span> |
| 1996 | </div> | 1998 | </div> |
| 1997 | </div> | 1999 | </div> |
| 1998 | <div class="flex-container flexFlowColumn wide100p textAlignCenter marginTop10" data-source="openai"> | 2000 | <div class="flex-container flexFlowColumn wide100p textAlignCenter marginTop10" data-source="openai,custom"> |
| 1999 | <div class="flex-container oneline-dropdown" title="Constrains effort on reasoning for reasoning models. Currently supported values are low, medium, and high. Reducing reasoning effort can result in faster responses and fewer tokens used on reasoning in a response."> | 2001 | <div class="flex-container oneline-dropdown" title="Constrains effort on reasoning for reasoning models. Currently supported values are low, medium, and high. Reducing reasoning effort can result in faster responses and fewer tokens used on reasoning in a response."> |
| 2000 | <label for="openai_reasoning_effort" data-i18n="Reasoning Effort"> | 2002 | <label for="openai_reasoning_effort" data-i18n="Reasoning Effort"> |
| 2001 | Reasoning Effort | 2003 | Reasoning Effort |
| @@ -1027,6 +1027,11 @@ router.post('/generate', jsonParser, function (request, response) { | |||
| 1027 | bodyParams.logprobs = true; | 1027 | bodyParams.logprobs = true; |
| 1028 | } | 1028 | } |
| 1029 | 1029 | ||
| 1030 | // A few of OpenAIs reasoning models support reasoning effort | ||
| 1031 | if (['o1', 'o3-mini', 'o3-mini-2025-01-31'].includes(request.body.model)) { | ||
| 1032 | bodyParams['reasoning_effort'] = request.body.reasoning_effort; | ||
| 1033 | } | ||
| 1034 | |||
| 1030 | mergeObjectWithYaml(bodyParams, request.body.custom_include_body); | 1035 | mergeObjectWithYaml(bodyParams, request.body.custom_include_body); |
| 1031 | mergeObjectWithYaml(headers, request.body.custom_include_headers); | 1036 | mergeObjectWithYaml(headers, request.body.custom_include_headers); |
| 1032 | 1037 | ||