File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -1615,9 +1615,14 @@ static common_chat_params common_chat_params_init_gpt_oss(const common_chat_temp
16151615 )
16161616 );
16171617 });
1618+
1619+ auto not_end = builder.add_rule (" not-end" ,
1620+ " [^<] | \" <\" [^|] | \" <|\" [^e] | \" <|e\" [^n] | \" <|en\" [^d] | \" <|end\" [^|] | \" <|end|\" [^>]" );
1621+ auto analysis = builder.add_rule (" analysis" ,
1622+ " \" <|channel|>analysis<|message|>\" ( " + not_end + " )* \" <|end|>\" " );
16181623
16191624 auto recipient_in_role = builder.add_rule (" recipient_in_role" ,
1620- " \" <|start|>assistant\" ? \" to=functions.\" ( " +
1625+ " ( " + analysis + " )? " + " \" <|start|>assistant\" ? \" to=functions.\" ( " +
16211626 string_join (tool_rules_recipient_in_role, " | " ) + " )"
16221627 );
16231628
You can’t perform that action at this time.
0 commit comments