Add a way to disable default action

This commit is contained in:
mudler 2023-07-09 10:02:21 +02:00
parent bbc4468908
commit b3f43ab938
2 changed files with 5 additions and 2 deletions

View file

@ -425,7 +425,9 @@ func chatEndpoint(cm *ConfigMerger, o *Option) func(c *fiber.Ctx) error {
// Append the no action function
funcs = append(funcs, input.Functions...)
funcs = append(funcs, noActionGrammar)
if !config.DisableDefaultAnswer {
funcs = append(funcs, noActionGrammar)
}
// Force picking one of the functions by the request
if config.functionCallNameString != "" {