package com.iwe3.langchain4j.service;

import dev.langchain4j.service.MemoryId;
import dev.langchain4j.service.SystemMessage;
import dev.langchain4j.service.UserMessage;
import dev.langchain4j.service.spring.AiService;
import dev.langchain4j.service.spring.AiServiceWiringMode;
import reactor.core.publisher.Flux;

//chatMemoryProvider = "chatMemoryProvider" 指定->MongoDB
//contentRetriever = "contentRetrieverInPinecone" 指定->Pinecone 向量存储版
@AiService(wiringMode = AiServiceWiringMode.EXPLICIT
        ,streamingChatModel = "streamingChatModel",
        chatMemoryProvider = "chatMemoryProvider",
        tools = {"appointmentTools","baiduMcpTools"},
        contentRetriever = "contentRetrieverInPinecone")
public interface XiaoAIChatAssistant {

    @SystemMessage(fromResource = "xiaoai-prompt.txt")
    Flux<String> chat(@MemoryId Long memoryId, @UserMessage String userMessage);
}
