|
|
@@ -4,10 +4,7 @@ import com.yango.javaailangchain4j.assistant.SeparateChatAssistant;
|
|
|
import com.yango.javaailangchain4j.dto.ManuallyCreatePsren;
|
|
|
import com.yango.javaailangchain4j.utils.Result;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
-import org.springframework.web.bind.annotation.CrossOrigin;
|
|
|
-import org.springframework.web.bind.annotation.RequestBody;
|
|
|
-import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
-import org.springframework.web.bind.annotation.RestController;
|
|
|
+import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
@RestController
|
|
|
@RequestMapping("/api/teracherGpsren")
|
|
|
@@ -22,7 +19,7 @@ public class TeacherGpsrenController {
|
|
|
* @return 包含AI助手回复结果的Result对象
|
|
|
*/
|
|
|
@CrossOrigin(origins = "*")
|
|
|
- @RequestMapping("/ManuallyCreatedPsreByG")
|
|
|
+ @PostMapping("/ManuallyCreatedPsreByG")
|
|
|
public Result getGpsren(@RequestBody ManuallyCreatePsren manuallyCreatePsren){
|
|
|
String temp = ",根据这个G,生成PSRE以及这个G会涉及到的知识点";
|
|
|
return Result.success(separateChatAssistant.chat4(manuallyCreatePsren.getMemoryId(), manuallyCreatePsren.getCourseName(), manuallyCreatePsren.getUserMessage()+temp));
|