diff --git a/plugin/aichat/main.go b/plugin/aichat/main.go index 18901e8f..09851701 100644 --- a/plugin/aichat/main.go +++ b/plugin/aichat/main.go @@ -103,7 +103,7 @@ func init() { temperature := stor.temp() topp, maxn := cfg.mparams() - if !stor.noagent() { + if !stor.noagent() && cfg.AgentAPI != "" && cfg.AgentModelName != "" { x := deepinfra.NewAPI(cfg.AgentAPI, string(cfg.AgentKey)) mod, err := cfg.Type.protocol(cfg.AgentModelName, temperature, topp, maxn) if err != nil {