Skip to content

Commit

Permalink
fix numeric grammar refs
Browse files Browse the repository at this point in the history
  • Loading branch information
mmoskal committed Mar 7, 2025
1 parent 5286760 commit dfb3bd7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions llgtrt/src/routes/completions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -613,9 +613,9 @@ pub async fn route_chat_completions(

let lark_grm_templ = match &request.tool_choice {
ToolChoice::Simple(ToolChoiceOption::None) => r"start: /(.|\n)*/",
ToolChoice::Simple(ToolChoiceOption::Auto) => r"start: /[^{](.|\n)*/ | {json_start} @1",
ToolChoice::Simple(ToolChoiceOption::Auto) => r"start: /[^{](.|\n)*/ | {json_start} @json_schema",
ToolChoice::Simple(ToolChoiceOption::Required) | ToolChoice::Advanced(_) => {
r"start: {json_start} @1"
r"start: {json_start} @json_schema"
}
};

Expand Down
2 changes: 1 addition & 1 deletion llguidance

0 comments on commit dfb3bd7

Please sign in to comment.