diff --git a/src/adapters/ibm-vllm/llm.ts b/src/adapters/ibm-vllm/llm.ts index adbc2003..df306bef 100644 --- a/src/adapters/ibm-vllm/llm.ts +++ b/src/adapters/ibm-vllm/llm.ts @@ -233,8 +233,8 @@ export class IBMvLLM extends LLM { guided.grammar = guidedOverride.grammar; } else if (guidedOverride?.json) { guided.json_schema = isString(guidedOverride.json) - ? JSON.parse(guidedOverride.json) - : guidedOverride.json; + ? guidedOverride.json + : JSON.stringify(guidedOverride.json); } else if (guidedOverride?.regex) { guided.regex = guidedOverride.regex; } else if (!isEmpty(guidedOverride ?? {})) {