liyong
5 小时以前 1ca5584d7e3200a9af65a099bd26d3593e2ba702
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
package com.ruoyi.ai.assistant;
 
import dev.langchain4j.service.MemoryId;
import dev.langchain4j.service.SystemMessage;
import dev.langchain4j.service.UserMessage;
import dev.langchain4j.service.spring.AiService;
import reactor.core.publisher.Flux;
 
import static dev.langchain4j.service.spring.AiServiceWiringMode.EXPLICIT;
 
@AiService(
        wiringMode = EXPLICIT,
        streamingChatModel = "qwenStreamingChatModel",
        chatMemoryProvider = "chatMemoryProviderApproveTodo",
        tools = "approveTodoTools")
public interface ApproveTodoAgent {
 
    @SystemMessage(fromResource = "approve-todo-agent-prompt.txt")
    Flux<String> chat(@MemoryId String memoryId, @UserMessage String userMessage);
}