mirror of
https://github.com/mudler/LocalAI.git
synced 2026-01-01 19:09:15 -05:00
fix: add strict mode check for no action function (#6294)
When strict mode is enabled, force the LLM to pick always a tool Signed-off-by: Ettore Di Giacinto <mudler@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
60b6472fa0
commit
fc8d5c9198
@@ -272,7 +272,7 @@ func ChatEndpoint(cl *config.ModelConfigLoader, ml *model.ModelLoader, evaluator
|
||||
}
|
||||
|
||||
// Append the no action function
|
||||
if !config.FunctionsConfig.DisableNoAction {
|
||||
if !config.FunctionsConfig.DisableNoAction && !strictMode {
|
||||
funcs = append(funcs, noActionGrammar)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user