改变了带有预设的聊天的实现逻辑,去除了正常聊天内容中“切换模型”这一指令

This commit is contained in:
slhaf
2024-10-02 22:52:39 +08:00
parent 9f7629eb20
commit 3d0ad90ef7
15 changed files with 476 additions and 299 deletions

View File

@@ -10,8 +10,13 @@ import org.apache.http.impl.client.HttpClients;
import org.apache.http.message.BasicHeader;
import org.apache.http.util.EntityUtils;
import org.junit.Test;
import plugin.App;
import plugin.utils.AIUtil;
import plugin.utils.ConfigUtil;
import java.io.IOException;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
@@ -132,4 +137,15 @@ public class MyTest {
response.close();
client.close();
}
@Test
public void mainTest() throws ClassNotFoundException, IOException {
ConfigUtil.load();
Long id = 2998813882L;
String content = "hello";
String chatCommand = "/c ";
String s = AIUtil.customChat(id, content, null, chatCommand);
System.out.println(s);
}
}