Fix json schema use for openAI compat CUSTOM endpoints in several use paths (#5561)

* pass jsonSchema options through sendStreamingRequest in Generate

* translate json_schema to response_format for CUSTOM chat completion source

* pass jsonSchema through generateGroupWrapper params in group chat generation
This commit is contained in:
Reithan
2026-04-30 13:38:01 -07:00
committed by GitHub
parent 5512473b29
commit 338e35fc8a
2 changed files with 12 additions and 2 deletions
+2 -2
View File
@@ -4290,7 +4290,7 @@ export async function Generate(type, { automatic_trigger, force_name2, quiet_pro
if (selected_group && !is_group_generating) {
if (!dryRun) {
// Returns the promise that generateGroupWrapper returns; resolves when generation is done
return generateGroupWrapper(false, type, { quiet_prompt, force_chid, signal: abortController.signal, quietImage });
return generateGroupWrapper(false, type, { quiet_prompt, force_chid, signal: abortController.signal, quietImage, jsonSchema });
}
const characterIndexMap = new Map(characters.map((char, index) => [char.avatar, index]));
@@ -5330,7 +5330,7 @@ export async function Generate(type, { automatic_trigger, force_name2, quiet_pro
streamingProcessor.firstMessageText = '';
}
streamingProcessor.generator = await sendStreamingRequest(type, generate_data);
streamingProcessor.generator = await sendStreamingRequest(type, generate_data, { jsonSchema });
hideSwipeButtons();
let getMessage = await streamingProcessor.generate();