yuluo-yx commented on code in PR #3503:
URL: https://github.com/apache/hertzbeat/pull/3503#discussion_r2180306051


##########
hertzbeat-ai-agent/src/main/java/org/apache/hertzbeat/ai/agent/controller/ChatController.java:
##########
@@ -0,0 +1,52 @@
+package org.apache.hertzbeat.ai.agent.controller;
+
+import org.springframework.ai.chat.client.ChatClient;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Qualifier;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.http.MediaType;
+import org.springframework.web.servlet.mvc.method.annotation.SseEmitter;
+import org.apache.hertzbeat.ai.agent.pojo.dto.ChatRequestContext;
+import org.apache.hertzbeat.ai.agent.service.ChatClientProviderService;
+
+
+/**
+ * Controller class for handling chat-related HTTP requests.
+ */
+@RestController
+@RequestMapping("/api/chat")
+public class ChatController {
+
+    private final ChatClientProviderService chatClientProviderService;
+
+    @Autowired
+    public ChatController(@Qualifier("openAiChatClient") ChatClient 
openAiChatClient,

Review Comment:
   I saw that only openai starter was referenced in the project. So I don't 
think it is necessary to use it here `@Qualifier("openAiChatClient"`. Unless we 
have plans to introduce other models



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to