Class SpringAISiliconFlowService
java.lang.Object
com.bytedesk.ai.springai.base.BaseSpringAIService
com.bytedesk.ai.springai.siliconflow.SpringAISiliconFlowService
- All Implemented Interfaces:
SpringAIService
@Service
@ConditionalOnProperty(name="spring.ai.siliconflow.chat.enabled",
havingValue="true",
matchIfMissing=false)
public class SpringAISiliconFlowService
extends BaseSpringAIService
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Optional<org.springframework.ai.openai.OpenAiChatModel>
Fields inherited from class com.bytedesk.ai.springai.base.BaseSpringAIService
messagePersistCache, messageSendService, robotRestService, springAIVectorService, threadRestService, uidUtils
-
Constructor Summary
ConstructorsConstructorDescriptionSpringAISiliconFlowService
(Optional<org.springframework.ai.openai.OpenAiChatModel> siliconFlowChatModel, Optional<SpringAIVectorService> springAIVectorService, IMessageSendService messageSendService, UidUtils uidUtils, RobotRestService robotRestService, ThreadRestService threadRestService, MessagePersistCache messagePersistCache) -
Method Summary
Modifier and TypeMethodDescriptionprotected String
generateFaqPairs
(String prompt) Optional<org.springframework.ai.openai.OpenAiChatModel>
protected void
processPrompt
(org.springframework.ai.chat.prompt.Prompt prompt, MessageProtobuf messageProtobuf) protected void
processPromptSSE
(org.springframework.ai.chat.prompt.Prompt prompt, MessageProtobuf messageProtobuf, org.springframework.web.servlet.mvc.method.annotation.SseEmitter emitter) protected String
processPromptSync
(String message) Methods inherited from class com.bytedesk.ai.springai.base.BaseSpringAIService
buildKbPrompt, generateFaqPairsAsync, generateFaqPairsSync, persistMessage, sendSseMessage, sendWebsocketMessage
-
Field Details
-
siliconFlowChatModel
-
-
Constructor Details
-
SpringAISiliconFlowService
public SpringAISiliconFlowService(Optional<org.springframework.ai.openai.OpenAiChatModel> siliconFlowChatModel, Optional<SpringAIVectorService> springAIVectorService, IMessageSendService messageSendService, UidUtils uidUtils, RobotRestService robotRestService, ThreadRestService threadRestService, MessagePersistCache messagePersistCache)
-
-
Method Details
-
processPrompt
protected void processPrompt(org.springframework.ai.chat.prompt.Prompt prompt, MessageProtobuf messageProtobuf) - Specified by:
processPrompt
in classBaseSpringAIService
-
generateFaqPairs
- Specified by:
generateFaqPairs
in classBaseSpringAIService
-
processPromptSync
- Specified by:
processPromptSync
in classBaseSpringAIService
-
processPromptSSE
protected void processPromptSSE(org.springframework.ai.chat.prompt.Prompt prompt, MessageProtobuf messageProtobuf, org.springframework.web.servlet.mvc.method.annotation.SseEmitter emitter) - Specified by:
processPromptSSE
in classBaseSpringAIService
-
getSiliconFlowChatModel
-