Repository navigation
[example][java] Add ReAct agent example - #242
Conversation
10ffbff to
43b5e39
Compare
|
One thing that I'm not sure is whether the notifyShipping tools was called or not. At least, i'm not able to see it from the short period that I ran it. |
|
@wenjin272 @xintongsong @Sxnan please take a look when you gets time. |
43b5e39 to
288f9f0
Compare
| "Notify the shipping manager when product received a negative review due to shipping damage.") | ||
| public static void notifyShippingManager( | ||
| @ToolParam(name = "id") String id, @ToolParam(name = "review") String review) { | ||
| notifyShippingManager(id, review); |
There was a problem hiding this comment.
Should use org.apache.flink.agents.examples.agents.CustomTypesAndResources.notifyShippingManager( id, review); here.
There was a problem hiding this comment.
Thanks for catching this. This is not an obvious bug. Is that possible to write this code in a different way so that I do not need to have this sort of redundent call in the ReAct agent?
There was a problem hiding this comment.
Maybe you can add @tool and @ToolParam directly on the notifyShippingManager method in CustomTypesAndResources, and register it in agents execution envrionment.
288f9f0 to
8766f98
Compare
|
LGTM |
| DataStream<Row> productReviewStream = | ||
| env.fromSource( | ||
| FileSource.forRecordStreamFormat( | ||
| new TextLineFormat(), |
There was a problem hiding this comment.
TextLineFormat has been deprecated and removed in Flink 2.x. I think we should use TextLineInputFormat instead.
Linked issue: #229
Purpose of change
This change added a example for the ReAct agent quickstart guide in Java similar to what python did. In this change, we are made a couple improvement to the existing single and multiple agent example to remove unused connection setup.
Tests
API
Documentation