fix:【ai 大模型】科大讯飞星火 thinking 返回
This commit is contained in:
@@ -6,7 +6,6 @@ import org.springframework.ai.chat.model.ChatModel;
|
||||
import org.springframework.ai.chat.model.ChatResponse;
|
||||
import org.springframework.ai.chat.prompt.ChatOptions;
|
||||
import org.springframework.ai.chat.prompt.Prompt;
|
||||
import org.springframework.ai.openai.OpenAiChatModel;
|
||||
import reactor.core.publisher.Flux;
|
||||
|
||||
/**
|
||||
@@ -31,7 +30,7 @@ public class XingHuoChatModel implements ChatModel {
|
||||
/**
|
||||
* v1 兼容 OpenAI 接口,进行复用
|
||||
*/
|
||||
private final OpenAiChatModel openAiChatModelV1;
|
||||
private final ChatModel openAiChatModelV1;
|
||||
|
||||
@Override
|
||||
public ChatResponse call(Prompt prompt) {
|
||||
|
||||
@@ -51,7 +51,8 @@ public class AiUtils {
|
||||
case DEEP_SEEK:
|
||||
case DOU_BAO: // 复用 DeepSeek 客户端
|
||||
case HUN_YUAN: // 复用 DeepSeek 客户端
|
||||
case SILICON_FLOW: // 复用 OpenAI 客户端
|
||||
case SILICON_FLOW: // 复用 DeepSeek 客户端
|
||||
case XING_HUO: // 复用 DeepSeek 客户端
|
||||
return DeepSeekChatOptions.builder().model(model).temperature(temperature).maxTokens(maxTokens)
|
||||
.toolNames(toolNames).toolContext(toolContext).build();
|
||||
case ZHI_PU:
|
||||
@@ -65,7 +66,6 @@ public class AiUtils {
|
||||
.toolNames(toolNames).toolContext(toolContext).build();
|
||||
case OPENAI:
|
||||
case GEMINI: // 复用 OpenAI 客户端
|
||||
case XING_HUO: // 复用 OpenAI 客户端
|
||||
case BAI_CHUAN: // 复用 OpenAI 客户端
|
||||
return OpenAiChatOptions.builder().model(model).temperature(temperature).maxTokens(maxTokens)
|
||||
.toolNames(toolNames).toolContext(toolContext).build();
|
||||
|
||||
Reference in New Issue
Block a user