[Improvement][headless] Only expose OPEN_AI/OLLAMA/DIFY chat model providers. (#2237)

This commit is contained in:
beat4ocean
2025-05-05 15:51:26 +08:00
committed by GitHub
parent acffc03c79
commit c4992501bd
26 changed files with 25 additions and 980 deletions

View File

@@ -66,7 +66,6 @@ import static java.util.Collections.singletonList;
@Slf4j
public class OpenAiChatModel implements ChatLanguageModel, TokenCountEstimator {
public static final String ZHIPU = "bigmodel";
private final OpenAiClient client;
private final String baseUrl;
private final String modelName;
@@ -192,9 +191,7 @@ public class OpenAiChatModel implements ChatLanguageModel, TokenCountEstimator {
.responseFormat(responseFormat).seed(seed).user(user)
.parallelToolCalls(parallelToolCalls);
if (!(baseUrl.contains(ZHIPU))) {
requestBuilder.temperature(temperature);
}
requestBuilder.temperature(temperature);
if (toolSpecifications != null && !toolSpecifications.isEmpty()) {
requestBuilder.tools(toTools(toolSpecifications, strictTools));