mirror of
https://github.com/infiniflow/ragflow.git
synced 2026-08-08 08:28:02 +08:00
Go: remove part of max_tokens (#17908)
Signed-off-by: Jin Hai <haijin.chn@gmail.com>
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user