package com.iwe3.langchain4j.service;

import dev.langchain4j.service.MemoryId;
import dev.langchain4j.service.UserMessage;
import dev.langchain4j.service.V;
import dev.langchain4j.service.spring.AiService;
import dev.langchain4j.service.spring.AiServiceWiringMode;

/**
 * 知识出处:
 * https://docs.langchain4j.dev/tutorials/spring-boot-integration/#spring-boot-starter-for-declarative-ai-services
 */
@AiService(wiringMode = AiServiceWiringMode.EXPLICIT
    ,chatModel = "qwen",
     tools = {"weatherTools"},
     chatMemoryProvider = "chatMemoryProvider")
public interface ChatAssistant {
    /**
     * 聊天
     * @param memoryId
     * @param userMessage
     * @return
     */
    @UserMessage("请用粤语回答问题，并且添加一些表情符号。 {{msg}}")
    String chat(@MemoryId int memoryId, @V("msg") String userMessage);
    /**
     * 普通聊天
     * @param prompt
     * @return
     */
    String chat(String prompt);
}
