Go: remove part of max_tokens (#17908)

Signed-off-by: Jin Hai <haijin.chn@gmail.com>
This commit is contained in:
Jin Hai
2026-08-06 10:48:28 +08:00
committed by GitHub
parent 6be7dc6e66
commit 4c6f575913
3 changed files with 1 additions and 10 deletions

View File

@@ -94,9 +94,6 @@ func (a *AzureOpenAIModel) ChatWithMessages(ctx context.Context, modelName strin
}
if chatModelConfig != nil {
if chatModelConfig.MaxTokens != nil {
reqBody["max_tokens"] = *chatModelConfig.MaxTokens
}
if chatModelConfig.Temperature != nil {
reqBody["temperature"] = *chatModelConfig.Temperature
}
@@ -151,9 +148,6 @@ func (a *AzureOpenAIModel) ChatStreamlyWithSender(ctx context.Context, modelName
if chatModelConfig.Stream != nil && !*chatModelConfig.Stream {
return fmt.Errorf("stream must be true in ChatStreamlyWithSender")
}
if chatModelConfig.MaxTokens != nil {
reqBody["max_tokens"] = *chatModelConfig.MaxTokens
}
if chatModelConfig.Temperature != nil {
reqBody["temperature"] = *chatModelConfig.Temperature
}

View File

@@ -123,9 +123,6 @@ func huaweiCloudApplyChatConfig(req map[string]any, modelName string, chatModelC
if chatModelConfig == nil {
return
}
if chatModelConfig.MaxTokens != nil {
req["max_tokens"] = *chatModelConfig.MaxTokens
}
if chatModelConfig.Temperature != nil {
req["temperature"] = *chatModelConfig.Temperature
}

View File

@@ -555,7 +555,7 @@ func (pm *ProviderManager) GetModelUrl(providerName, modelName, modelType string
}
}
// 4. Search specific model information with filtering by max_tokens or type
// SearchModelInfo search specific model information with filtering by type or other conditions
func (pm *ProviderManager) SearchModelInfo(providerName, modelName string, filterBy string, filterValue interface{}) ModelResponse {
resp := ModelResponse{
Code: 0,