package com.iwe3.langchain4j;

import com.iwe3.langchain4j.service.SeparateChatAssistant;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;

@SpringBootTest
public class SeparateChatTest {

    @Autowired
    private SeparateChatAssistant separateChatAssistant;

    @Test
    public void testSeparateChatMemory() {
        // 用户1的对话
        var res = separateChatAssistant.chat(1, "我是蒲哥");
        System.out.println(res);
        res = separateChatAssistant.chat(1, "你知道我是谁吗");
        System.out.println(res);

        // 用户2的对话
        var res02 = separateChatAssistant.chat(2, "我是小明");
        System.out.println(res02);
        res02 = separateChatAssistant.chat(2, "我叫什么名字");
        System.out.println(res02);
    }


}
