fix(provider): remove hard-coded for MaxTokenField and set default is "max_tokens" when ModelConfig.MaxTokensField is null
This commit is contained in:
parent
27c2d50455
commit
de2df4c341
1 changed files with 1 additions and 0 deletions
|
|
@ -130,6 +130,7 @@ func NewProvider(apiKey, apiBase, proxy string, opts ...Option) *Provider {
|
|||
}
|
||||
}
|
||||
|
||||
// Default to "max_tokens" if no custom field is set, since most APIs use that.
|
||||
if p.maxTokensField == "" {
|
||||
p.maxTokensField = "max_tokens"
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue