fix: resolve OpenRouter migration error and reduce bot rambling by tuning temperature and tool iterations
This commit is contained in:
parent
b89f6445d1
commit
985289a3b7
3 changed files with 5 additions and 5 deletions
|
|
@ -125,7 +125,7 @@ func NewAgentInstance(
|
|||
maxTokens = 8192
|
||||
}
|
||||
|
||||
temperature := 0.7
|
||||
temperature := 0.1
|
||||
if defaults.Temperature != nil {
|
||||
temperature = *defaults.Temperature
|
||||
}
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ func DefaultConfig() *Config {
|
|||
Model: "",
|
||||
MaxTokens: 32768,
|
||||
Temperature: nil, // nil means use provider default
|
||||
MaxToolIterations: 50,
|
||||
MaxToolIterations: 10,
|
||||
SummarizeMessageThreshold: 20,
|
||||
SummarizeTokenPercent: 75,
|
||||
},
|
||||
|
|
|
|||
|
|
@ -14,11 +14,11 @@ import (
|
|||
// If the model already contains a "/" (indicating it has a protocol prefix), it is returned as-is.
|
||||
// Otherwise, the protocol prefix is added.
|
||||
func buildModelWithProtocol(protocol, model string) string {
|
||||
if strings.Contains(model, "/") {
|
||||
// Model already has a protocol prefix, return as-is
|
||||
prefix := protocol + "/"
|
||||
if strings.HasPrefix(model, prefix) {
|
||||
return model
|
||||
}
|
||||
return protocol + "/" + model
|
||||
return prefix + model
|
||||
}
|
||||
|
||||
// providerMigrationConfig defines how to migrate a provider from old config to new format.
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue