You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "wenjin272 (via GitHub)" <gi...@apache.org> on 2025/09/12 14:34:06 UTC
[PR] [api][java] Separate the abstraction of ChatModel to connection and setup in Java. [flink-agents]
wenjin272 opened a new pull request, #164:
URL: https://github.com/apache/flink-agents/pull/164
<!--
* Thank you very much for contributing to Flink Agents.
* Please add the relevant components in the PR title. E.g., [api], [runtime], [java], [python], [hotfix], etc.
-->
<!-- Please link the PR to the relevant issue(s). Hotfix doesn't need this. -->
Linked issue: #163
### Purpose of change
Separate the abstraction of ChatModel to connection and setup in Java.
### Tests
ut
### API
Yes, remove `BaseChatModel`, and add `BaseChatModelConnection`, `BaseChatModelSetup`
### Documentation
No
--
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: issues-unsubscribe@flink.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [api][java] Separate the abstraction of ChatModel to connection and setup in Java. [flink-agents]
Posted by "xintongsong (via GitHub)" <gi...@apache.org>.
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: issues-unsubscribe@flink.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [api][java] Separate the abstraction of ChatModel to connection and setup in Java. [flink-agents]
Posted by "xintongsong (via GitHub)" <gi...@apache.org>.
xintongsong merged PR #164:
URL: https://github.com/apache/flink-agents/pull/164
--
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: issues-unsubscribe@flink.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org