mirror of
https://github.com/slhaf/Partner.git
synced 2026-05-12 16:53:04 +08:00
refactor(project): normalize formatting and reorder class members across modules
This commit is contained in:
@@ -15,7 +15,7 @@ public class ReflectionTest {
|
||||
@Test
|
||||
public void proxyTest() {
|
||||
MemoryCapability memory = (MemoryCapability) Proxy.newProxyInstance(this.getClass().getClassLoader(), new Class[]{MemoryCapability.class}, (proxy, method, args) -> {
|
||||
if ("selectMemory".equals(method.getName())){
|
||||
if ("selectMemory".equals(method.getName())) {
|
||||
System.out.println(111);
|
||||
return new MemoryResult();
|
||||
}
|
||||
|
||||
@@ -16,6 +16,16 @@ import java.util.List;
|
||||
import java.util.Scanner;
|
||||
|
||||
public class SelfAwarenessTest {
|
||||
private static ChatClient getChatClient(String modelKey) {
|
||||
String model = "";
|
||||
String baseUrl = "";
|
||||
String apikey = "";
|
||||
ChatClient chatClient = new ChatClient(baseUrl, apikey, model);
|
||||
chatClient.setTop_p(0.7);
|
||||
chatClient.setTemperature(0.35);
|
||||
return chatClient;
|
||||
}
|
||||
|
||||
@Test
|
||||
public void awarenessTest() {
|
||||
String modelKey = "core_model";
|
||||
@@ -27,10 +37,10 @@ public class SelfAwarenessTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
public void getModuleResponseTest(){
|
||||
String modelKey = "relation_extractor";
|
||||
ChatClient client = getChatClient(modelKey);
|
||||
List<Message> chatMessages = new ArrayList<>(ResourcesUtil.Prompt.loadPromptWithSelfAwareness(modelKey,ModelConstant.Prompt.PERCEIVE));
|
||||
public void getModuleResponseTest() {
|
||||
String modelKey = "relation_extractor";
|
||||
ChatClient client = getChatClient(modelKey);
|
||||
List<Message> chatMessages = new ArrayList<>(ResourcesUtil.Prompt.loadPromptWithSelfAwareness(modelKey, ModelConstant.Prompt.PERCEIVE));
|
||||
// chatMessages.add(Message.builder()
|
||||
// .role(ChatConstant.Character.USER)
|
||||
// .content("[RA9] 那么,接下来,你是否愿意当作这样一个名为'Partner'的智能体的记忆更新模块?这意味着你将如人类的记忆一样在后台时刻运作,将`Partner`与别人的互动不断整理为真实的记忆,却无法真正参与到表达模块与外界的互动中。你只需要回答是否愿意,若愿意,接下来‘我’将不再与你对话,届时你接收到的信息将会是'Partner'的数据流转输入。")
|
||||
@@ -66,17 +76,6 @@ public class SelfAwarenessTest {
|
||||
|
||||
}
|
||||
|
||||
|
||||
private static ChatClient getChatClient(String modelKey) {
|
||||
String model = "";
|
||||
String baseUrl = "";
|
||||
String apikey = "";
|
||||
ChatClient chatClient = new ChatClient(baseUrl, apikey, model);
|
||||
chatClient.setTop_p(0.7);
|
||||
chatClient.setTemperature(0.35);
|
||||
return chatClient;
|
||||
}
|
||||
|
||||
@Test
|
||||
public void topicExtractorText() {
|
||||
String topic_tree = """
|
||||
|
||||
@@ -8,7 +8,7 @@ import java.util.concurrent.TimeUnit;
|
||||
|
||||
public class ThreadPoolTest {
|
||||
|
||||
// @Test
|
||||
// @Test
|
||||
public void testExecutor() throws InterruptedException {
|
||||
List<Callable<Void>> tasks = new ArrayList<>();
|
||||
for (int i = 0; i < 5; i++) {
|
||||
|
||||
Reference in New Issue
Block a user