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


##########
api/src/main/java/org/apache/flink/agents/api/resource/Resource.java:
##########
@@ -18,12 +18,23 @@
 
 package org.apache.flink.agents.api.resource;
 
+import java.util.function.BiFunction;
+
 /**
  * Base interface for all kinds of resources, including chat models, tools, 
prompts and so on.
  *
  * <p>Resources are components that can be used by agents during action 
execution.
  */
 public abstract class Resource {
+    protected BiFunction<String, ResourceType, Resource> getResource;
+
+    protected Resource(
+            BiFunction<String, ResourceType, Resource> getResource, 
ResourceDescriptor descriptor) {
+        this.getResource = getResource;
+    }

Review Comment:
   Minor:
   ```suggestion
       protected Resource(
               ResourceDescriptor descriptor, BiFunction<String, ResourceType, 
Resource> getResource) {
           this.getResource = getResource;
       }
   ```



##########
api/src/main/java/org/apache/flink/agents/api/resource/Resource.java:
##########
@@ -18,12 +18,23 @@
 
 package org.apache.flink.agents.api.resource;
 
+import java.util.function.BiFunction;
+
 /**
  * Base interface for all kinds of resources, including chat models, tools, 
prompts and so on.
  *
  * <p>Resources are components that can be used by agents during action 
execution.
  */
 public abstract class Resource {
+    protected BiFunction<String, ResourceType, Resource> getResource;
+
+    protected Resource(
+            BiFunction<String, ResourceType, Resource> getResource, 
ResourceDescriptor descriptor) {
+        this.getResource = getResource;
+    }

Review Comment:
   And same for the model connection and setup.



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