TASK:LLM;
This commit is contained in:
@@ -101,7 +101,7 @@ public class LLMServiceImpl implements LLMService {
|
|||||||
jsonBodyObject.put("message", prompt);
|
jsonBodyObject.put("message", prompt);
|
||||||
jsonBodyObject.put("enable_thinking", enableThinking);
|
jsonBodyObject.put("enable_thinking", enableThinking);
|
||||||
jsonBodyObject.put("process", !StringUtils.isEmpty(process) ? process : "");
|
jsonBodyObject.put("process", !StringUtils.isEmpty(process) ? process : "");
|
||||||
jsonBodyObject.put("is_create_projectr", !StringUtils.isEmpty(process));
|
jsonBodyObject.put("is_create_project", !StringUtils.isEmpty(process));
|
||||||
|
|
||||||
// 1. 存储用户输入
|
// 1. 存储用户输入
|
||||||
ChatMessage userMessage = new ChatMessage();
|
ChatMessage userMessage = new ChatMessage();
|
||||||
@@ -114,6 +114,7 @@ public class LLMServiceImpl implements LLMService {
|
|||||||
chatMessageMapper.insert(userMessage);
|
chatMessageMapper.insert(userMessage);
|
||||||
|
|
||||||
try (OutputStream os = conn.getOutputStream()) {
|
try (OutputStream os = conn.getOutputStream()) {
|
||||||
|
System.out.println(jsonBodyObject.toJSONString());
|
||||||
byte[] input = jsonBodyObject.toJSONString().getBytes(StandardCharsets.UTF_8);
|
byte[] input = jsonBodyObject.toJSONString().getBytes(StandardCharsets.UTF_8);
|
||||||
os.write(input, 0, input.length);
|
os.write(input, 0, input.length);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user