Skip to content

Commit 30ecd4b

Browse files
authored
fix: add strict mode check for no action function
When strict mode is enabled, force the LLM to pick always a tool Signed-off-by: Ettore Di Giacinto <[email protected]>
1 parent ddb39c7 commit 30ecd4b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

core/http/endpoints/openai/chat.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,7 @@ func ChatEndpoint(cl *config.ModelConfigLoader, ml *model.ModelLoader, evaluator
272272
}
273273

274274
// Append the no action function
275-
if !config.FunctionsConfig.DisableNoAction {
275+
if !config.FunctionsConfig.DisableNoAction && !strictMode {
276276
funcs = append(funcs, noActionGrammar)
277277
}
278278

0 commit comments

Comments
 (0)