Skip to content

Commit

Permalink
fix(adapters): vLLM JSON Schema guided decoding (#207)
Browse files Browse the repository at this point in the history
Signed-off-by: Jan Pokorný <[email protected]>
  • Loading branch information
JanPokorny authored Dec 2, 2024
1 parent 74713a6 commit 7d83d21
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/adapters/ibm-vllm/llm.ts
Original file line number Diff line number Diff line change
Expand Up @@ -233,8 +233,8 @@ export class IBMvLLM extends LLM<IBMvLLMOutput, IBMvLLMGenerateOptions> {
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 ?? {})) {
Expand Down

0 comments on commit 7d83d21

Please sign in to comment.