mirror of
https://github.com/mudler/LocalAI.git
synced 2025-05-28 14:35:00 +00:00
fix(functions): respect when selected from string (#1940)
* fix(functions): respect when selected from string * fix(toolschoice): decode both string and objects
This commit is contained in:
parent
ebb1fcedea
commit
e8f02c083f
2 changed files with 14 additions and 2 deletions
|
@ -185,7 +185,12 @@ func (c *BackendConfig) ShouldCallSpecificFunction() bool {
|
|||
}
|
||||
|
||||
func (c *BackendConfig) FunctionToCall() string {
|
||||
return c.functionCallNameString
|
||||
if c.functionCallNameString != "" &&
|
||||
c.functionCallNameString != "none" && c.functionCallNameString != "auto" {
|
||||
return c.functionCallNameString
|
||||
}
|
||||
|
||||
return c.functionCallString
|
||||
}
|
||||
|
||||
func (cfg *BackendConfig) SetDefaults(opts ...ConfigLoaderOption) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue