fix: select function calls if 'name' is set in the request

An oversight that caused to not respect functions to be called as
enforced by the caller.

Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
This commit is contained in:
Ettore Di Giacinto 2023-07-28 01:15:26 +02:00
parent 096d98c3d9
commit f50cd471e1

View file

@ -183,7 +183,7 @@ func updateConfig(config *config.Config, input *OpenAIRequest) {
n, exists := fnc["name"]
if exists {
nn, e := n.(string)
if !e {
if e {
name = nn
}
}