xintongsong commented on code in PR #428:
URL: https://github.com/apache/flink-agents/pull/428#discussion_r2681783609


##########
api/src/main/java/org/apache/flink/agents/api/chat/model/BaseChatModelSetup.java:
##########
@@ -105,6 +105,9 @@ public ResourceType getResourceType() {
         return ResourceType.CHAT_MODEL;
     }
 
+    @Override
+    public void close() throws Exception {}

Review Comment:
   We can add an empty default implementation in the root abstract class. In 
this way, we won't need to add this for all the resources. We only need to 
override it in resources that actually need to close something.



##########
api/src/main/java/org/apache/flink/agents/api/chat/model/python/PythonChatModelConnection.java:
##########
@@ -40,7 +41,7 @@
  */
 public class PythonChatModelConnection extends BaseChatModelConnection
         implements PythonResourceWrapper {
-    private final PyObject chatModel;
+    private PyObject chatModel;

Review Comment:
   I don't see a strong reason making this non-final. Better keep it final if 
possible.



##########
api/src/main/java/org/apache/flink/agents/api/embedding/model/python/PythonEmbeddingModelConnection.java:
##########
@@ -43,7 +44,7 @@
 public class PythonEmbeddingModelConnection extends 
BaseEmbeddingModelConnection
         implements PythonResourceWrapper {
 
-    private final PyObject embeddingModel;
+    private PyObject embeddingModel;

Review Comment:
   ditto



-- 
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]

Reply via email to