Skip to content

Commit c294dfb

Browse files
siri-varmaartur-ciocanuArtur Ciocanucicoyledependabot[bot]
committed
Add Tool Calling to Java SDK (dapr#1481)
* Use Java Bean for connection details and add more tests (#1317) * Use Java Bean for connection details and add more tests Signed-off-by: Artur Ciocanu <[email protected]> * Simplify mock setup Signed-off-by: Artur Ciocanu <[email protected]> * Adding even more tests for test coverage Signed-off-by: Artur Ciocanu <[email protected]> --------- Signed-off-by: Artur Ciocanu <[email protected]> Co-authored-by: Artur Ciocanu <[email protected]> Co-authored-by: Cassie Coyle <[email protected]> Signed-off-by: sirivarma <[email protected]> * Update CONTRIBUTING.md Signed-off-by: Siri Varma Vegiraju <[email protected]> Signed-off-by: sirivarma <[email protected]> * Bump codecov/codecov-action from 5.4.0 to 5.4.2 (#1318) Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from 5.4.0 to 5.4.2. - [Release notes](https://github.com/codecov/codecov-action/releases) - [Changelog](https://github.com/codecov/codecov-action/blob/main/CHANGELOG.md) - [Commits](https://github.com/codecov/codecov-action/compare/v5.4.0...v5.4.2) --- updated-dependencies: - dependency-name: codecov/codecov-action dependency-version: 5.4.2 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Cassie Coyle <[email protected]> Co-authored-by: Dapr Bot <[email protected]> Signed-off-by: sirivarma <[email protected]> * Fix URL building logic (#1320) * Fix URL building logic Signed-off-by: Artur Ciocanu <[email protected]> * Add test for query params Signed-off-by: Artur Ciocanu <[email protected]> * Fix the assertion in the test Signed-off-by: Artur Ciocanu <[email protected]> * Adjust the tests Signed-off-by: Artur Ciocanu <[email protected]> * Remove uneeded changes from IT test Signed-off-by: Artur Ciocanu <[email protected]> * Revert some unintended changes Signed-off-by: Artur Ciocanu <[email protected]> * Simplify the testing a little bit Signed-off-by: Artur Ciocanu <[email protected]> * Adjust the test to use ServerRequest Signed-off-by: Artur Ciocanu <[email protected]> * Test removing things from method invoke controller Signed-off-by: Artur Ciocanu <[email protected]> * Add query param encoding test Signed-off-by: Artur Ciocanu <[email protected]> * Revert some unintended changes Signed-off-by: Artur Ciocanu <[email protected]> * Some tiny styles Signed-off-by: Artur Ciocanu <[email protected]> --------- Signed-off-by: Artur Ciocanu <[email protected]> Co-authored-by: Artur Ciocanu <[email protected]> Signed-off-by: sirivarma <[email protected]> * Generate updated javadocs for 1.14.1 Signed-off-by: Dapr Bot <[email protected]> Signed-off-by: sirivarma <[email protected]> * Add Conversation AI to Java SDK (#1235) * Conversation first commit Signed-off-by: Siri Varma Vegiraju <[email protected]> Signed-off-by: sirivarma <[email protected]> Signed-off-by: siri-varma <[email protected]> * Add unit tests Signed-off-by: sirivarma <[email protected]> Signed-off-by: siri-varma <[email protected]> * change ai to conv Signed-off-by: sirivarma <[email protected]> Signed-off-by: siri-varma <[email protected]> * Move to single module Signed-off-by: sirivarma <[email protected]> Signed-off-by: siri-varma <[email protected]> * Remove module Signed-off-by: sirivarma <[email protected]> Signed-off-by: siri-varma <[email protected]> * Add Integration tests Signed-off-by: siri-varma <[email protected]> * Update sdk-tests/src/test/java/io/dapr/it/testcontainers/DaprConversationIT.java Co-authored-by: Cassie Coyle <[email protected]> Signed-off-by: Siri Varma Vegiraju <[email protected]> Signed-off-by: siri-varma <[email protected]> * Fix things Signed-off-by: siri-varma <[email protected]> * Address comments Signed-off-by: siri-varma <[email protected]> * Import tag Signed-off-by: siri-varma <[email protected]> * Address comments Signed-off-by: siri-varma <[email protected]> * Make common config Signed-off-by: siri-varma <[email protected]> * Address comments Signed-off-by: siri-varma <[email protected]> * fix constant Signed-off-by: siri-varma <[email protected]> * fix constant Signed-off-by: siri-varma <[email protected]> * fix constant Signed-off-by: siri-varma <[email protected]> * fix s Signed-off-by: siri-varma <[email protected]> * Fix things Signed-off-by: siri-varma <[email protected]> * Fix things Signed-off-by: siri-varma <[email protected]> * Fix things Signed-off-by: siri-varma <[email protected]> * Make common config Signed-off-by: siri-varma <[email protected]> * Update README.md Signed-off-by: Siri Varma Vegiraju <[email protected]> * Update README.md Signed-off-by: Siri Varma Vegiraju <[email protected]> --------- Signed-off-by: Siri Varma Vegiraju <[email protected]> Signed-off-by: sirivarma <[email protected]> Signed-off-by: siri-varma <[email protected]> Signed-off-by: Siri Varma Vegiraju <[email protected]> Co-authored-by: Cassie Coyle <[email protected]> Co-authored-by: Cassie Coyle <[email protected]> Signed-off-by: sirivarma <[email protected]> * Add docs for usage of Jobs SDK (#1323) * Add doc for jobs Signed-off-by: siri-varma <[email protected]> * Add docs for Jobs Signed-off-by: siri-varma <[email protected]> * Apply suggestions from code review Co-authored-by: Cassie Coyle <[email protected]> Signed-off-by: Siri Varma Vegiraju <[email protected]> --------- Signed-off-by: siri-varma <[email protected]> Signed-off-by: Siri Varma Vegiraju <[email protected]> Co-authored-by: artur-ciocanu <[email protected]> Co-authored-by: Cassie Coyle <[email protected]> Signed-off-by: sirivarma <[email protected]> * Use dapr/durabletask-java (#1336) * microsoft durabletask-java -> dapr durabletask-java Signed-off-by: Cassandra Coyle <[email protected]> * update another ref Signed-off-by: Cassandra Coyle <[email protected]> * 1.5.2 release Signed-off-by: Cassandra Coyle <[email protected]> * fix import order Signed-off-by: Cassandra Coyle <[email protected]> * Sdk new changes Signed-off-by: siri-varma <[email protected]> * Refine workflows Signed-off-by: siri-varma <[email protected]> * add ; Signed-off-by: Cassandra Coyle <[email protected]> * rm try Signed-off-by: Cassandra Coyle <[email protected]> --------- Signed-off-by: Cassandra Coyle <[email protected]> Signed-off-by: siri-varma <[email protected]> Co-authored-by: siri-varma <[email protected]> Signed-off-by: sirivarma <[email protected]> * Update master version to 1.16.0-SNAPSHOT Signed-off-by: Dapr Bot <[email protected]> Signed-off-by: sirivarma <[email protected]> * Renaming and exposing connection details (#1341) Signed-off-by: Artur Ciocanu <[email protected]> Co-authored-by: Artur Ciocanu <[email protected]> Signed-off-by: sirivarma <[email protected]> * [Master] Fix Vulnerabilities (#1354) * update okio Signed-off-by: Cassandra Coyle <[email protected]> * rm unused dep Signed-off-by: Cassandra Coyle <[email protected]> --------- Signed-off-by: Cassandra Coyle <[email protected]> Signed-off-by: sirivarma <[email protected]> * Feat Add TLS & mTLS support for gRPC with root CA and insecure mode (#1361) * feat: Support for GRPC ssl Signed-off-by: Javier Aliaga <[email protected]> * add tests Signed-off-by: Cassandra Coyle <[email protected]> * fix CI Signed-off-by: Cassandra Coyle <[email protected]> * add back else if Signed-off-by: Cassandra Coyle <[email protected]> * channel cleanup Signed-off-by: Cassandra Coyle <[email protected]> * add root ca support Signed-off-by: Cassandra Coyle <[email protected]> * checkstyles Signed-off-by: Cassandra Coyle <[email protected]> * add insecure Signed-off-by: Cassandra Coyle <[email protected]> * fix checkstyles Signed-off-by: Cassandra Coyle <[email protected]> * use InsecureTrustManagerFactory Signed-off-by: Cassandra Coyle <[email protected]> * fix test Signed-off-by: Cassandra Coyle <[email protected]> --------- Signed-off-by: Javier Aliaga <[email protected]> Signed-off-by: Cassandra Coyle <[email protected]> Co-authored-by: Javier Aliaga <[email protected]> Signed-off-by: sirivarma <[email protected]> * Fix the issue with retries not happening correctly for Activities and Workflows (#1343) * Add coverage for some properties (#1297) Signed-off-by: sirivarma <[email protected]> * Make the DAPR version being used consistent across all tests (#1299) Signed-off-by: sirivarma <[email protected]> * Separate Dapr constants from IT container constants (#1315) Signed-off-by: Artur Ciocanu <[email protected]> Co-authored-by: Artur Ciocanu <[email protected]> Signed-off-by: sirivarma <[email protected]> * Use Java Bean for connection details and add more tests (#1317) * Use Java Bean for connection details and add more tests Signed-off-by: Artur Ciocanu <[email protected]> * Simplify mock setup Signed-off-by: Artur Ciocanu <[email protected]> * Adding even more tests for test coverage Signed-off-by: Artur Ciocanu <[email protected]> --------- Signed-off-by: Artur Ciocanu <[email protected]> Co-authored-by: Artur Ciocanu <[email protected]> Co-authored-by: Cassie Coyle <[email protected]> Signed-off-by: sirivarma <[email protected]> * Update CONTRIBUTING.md Signed-off-by: Siri Varma Vegiraju <[email protected]> Signed-off-by: sirivarma <[email protected]> * Bump codecov/codecov-action from 5.4.0 to 5.4.2 (#1318) Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from 5.4.0 to 5.4.2. - [Release notes](https://github.com/codecov/codecov-action/releases) - [Changelog](https://github.com/codecov/codecov-action/blob/main/CHANGELOG.md) - [Commits](https://github.com/codecov/codecov-action/compare/v5.4.0...v5.4.2) --- updated-dependencies: - dependency-name: codecov/codecov-action dependency-version: 5.4.2 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Cassie Coyle <[email protected]> Co-authored-by: Dapr Bot <[email protected]> Signed-off-by: sirivarma <[email protected]> * Fix URL building logic (#1320) * Fix URL building logic Signed-off-by: Artur Ciocanu <[email protected]> * Add test for query params Signed-off-by: Artur Ciocanu <[email protected]> * Fix the assertion in the test Signed-off-by: Artur Ciocanu <[email protected]> * Adjust the tests Signed-off-by: Artur Ciocanu <[email protected]> * Remove uneeded changes from IT test Signed-off-by: Artur Ciocanu <[email protected]> * Revert some unintended changes Signed-off-by: Artur Ciocanu <[email protected]> * Simplify the testing a little bit Signed-off-by: Artur Ciocanu <[email protected]> * Adjust the test to use ServerRequest Signed-off-by: Artur Ciocanu <[email protected]> * Test removing things from method invoke controller Signed-off-by: Artur Ciocanu <[email protected]> * Add query param encoding test Signed-off-by: Artur Ciocanu <[email protected]> * Revert some unintended changes Signed-off-by: Artur Ciocanu <[email protected]> * Some tiny styles Signed-off-by: Artur Ciocanu <[email protected]> --------- Signed-off-by: Artur Ciocanu <[email protected]> Co-authored-by: Artur Ciocanu <[email protected]> Signed-off-by: sirivarma <[email protected]> * Generate updated javadocs for 1.14.1 Signed-off-by: Dapr Bot <[email protected]> Signed-off-by: sirivarma <[email protected]> * Add Conversation AI to Java SDK (#1235) * Conversation first commit Signed-off-by: Siri Varma Vegiraju <[email protected]> Signed-off-by: sirivarma <[email protected]> Signed-off-by: siri-varma <[email protected]> * Add unit tests Signed-off-by: sirivarma <[email protected]> Signed-off-by: siri-varma <[email protected]> * change ai to conv Signed-off-by: sirivarma <[email protected]> Signed-off-by: siri-varma <[email protected]> * Move to single module Signed-off-by: sirivarma <[email protected]> Signed-off-by: siri-varma <[email protected]> * Remove module Signed-off-by: sirivarma <[email protected]> Signed-off-by: siri-varma <[email protected]> * Add Integration tests Signed-off-by: siri-varma <[email protected]> * Update sdk-tests/src/test/java/io/dapr/it/testcontainers/DaprConversationIT.java Co-authored-by: Cassie Coyle <[email protected]> Signed-off-by: Siri Varma Vegiraju <[email protected]> Signed-off-by: siri-varma <[email protected]> * Fix things Signed-off-by: siri-varma <[email protected]> * Address comments Signed-off-by: siri-varma <[email protected]> * Import tag Signed-off-by: siri-varma <[email protected]> * Address comments Signed-off-by: siri-varma <[email protected]> * Make common config Signed-off-by: siri-varma <[email protected]> * Address comments Signed-off-by: siri-varma <[email protected]> * fix constant Signed-off-by: siri-varma <[email protected]> * fix constant Signed-off-by: siri-varma <[email protected]> * fix constant Signed-off-by: siri-varma <[email protected]> * fix s Signed-off-by: siri-varma <[email protected]> * Fix things Signed-off-by: siri-varma <[email protected]> * Fix things Signed-off-by: siri-varma <[email protected]> * Fix things Signed-off-by: siri-varma <[email protected]> * Make common config Signed-off-by: siri-varma <[email protected]> * Update README.md Signed-off-by: Siri Varma Vegiraju <[email protected]> * Update README.md Signed-off-by: Siri Varma Vegiraju <[email protected]> --------- Signed-off-by: Siri Varma Vegiraju <[email protected]> Signed-off-by: sirivarma <[email protected]> Signed-off-by: siri-varma <[email protected]> Signed-off-by: Siri Varma Vegiraju <[email protected]> Co-authored-by: Cassie Coyle <[email protected]> Co-authored-by: Cassie Coyle <[email protected]> Signed-off-by: sirivarma <[email protected]> * Add docs for usage of Jobs SDK (#1323) * Add doc for jobs Signed-off-by: siri-varma <[email protected]> * Add docs for Jobs Signed-off-by: siri-varma <[email protected]> * Apply suggestions from code review Co-authored-by: Cassie Coyle <[email protected]> Signed-off-by: Siri Varma Vegiraju <[email protected]> --------- Signed-off-by: siri-varma <[email protected]> Signed-off-by: Siri Varma Vegiraju <[email protected]> Co-authored-by: artur-ciocanu <[email protected]> Co-authored-by: Cassie Coyle <[email protected]> Signed-off-by: sirivarma <[email protected]> * Use dapr/durabletask-java (#1336) * microsoft durabletask-java -> dapr durabletask-java Signed-off-by: Cassandra Coyle <[email protected]> * update another ref Signed-off-by: Cassandra Coyle <[email protected]> * 1.5.2 release Signed-off-by: Cassandra Coyle <[email protected]> * fix import order Signed-off-by: Cassandra Coyle <[email protected]> * Sdk new changes Signed-off-by: siri-varma <[email protected]> * Refine workflows Signed-off-by: siri-varma <[email protected]> * add ; Signed-off-by: Cassandra Coyle <[email protected]> * rm try Signed-off-by: Cassandra Coyle <[email protected]> --------- Signed-off-by: Cassandra Coyle <[email protected]> Signed-off-by: siri-varma <[email protected]> Co-authored-by: siri-varma <[email protected]> Signed-off-by: sirivarma <[email protected]> * Update master version to 1.16.0-SNAPSHOT Signed-off-by: Dapr Bot <[email protected]> Signed-off-by: sirivarma <[email protected]> * Fix NPE Signed-off-by: siri-varma <[email protected]> Signed-off-by: sirivarma <[email protected]> * Fix NPE Signed-off-by: siri-varma <[email protected]> Signed-off-by: sirivarma <[email protected]> * Fix NPE Signed-off-by: siri-varma <[email protected]> Signed-off-by: sirivarma <[email protected]> * Fix NPE Signed-off-by: siri-varma <[email protected]> Signed-off-by: sirivarma <[email protected]> * Fix NPE Signed-off-by: siri-varma <[email protected]> Signed-off-by: sirivarma <[email protected]> * Fix NPE Signed-off-by: siri-varma <[email protected]> Signed-off-by: sirivarma <[email protected]> * Fix things Signed-off-by: siri-varma <[email protected]> Signed-off-by: sirivarma <[email protected]> * Renaming and exposing connection details (#1341) Signed-off-by: Artur Ciocanu <[email protected]> Co-authored-by: Artur Ciocanu <[email protected]> Signed-off-by: sirivarma <[email protected]> * [Master] Fix Vulnerabilities (#1354) * update okio Signed-off-by: Cassandra Coyle <[email protected]> * rm unused dep Signed-off-by: Cassandra Coyle <[email protected]> --------- Signed-off-by: Cassandra Coyle <[email protected]> Signed-off-by: sirivarma <[email protected]> * Feat Add TLS & mTLS support for gRPC with root CA and insecure mode (#1361) * feat: Support for GRPC ssl Signed-off-by: Javier Aliaga <[email protected]> * add tests Signed-off-by: Cassandra Coyle <[email protected]> * fix CI Signed-off-by: Cassandra Coyle <[email protected]> * add back else if Signed-off-by: Cassandra Coyle <[email protected]> * channel cleanup Signed-off-by: Cassandra Coyle <[email protected]> * add root ca support Signed-off-by: Cassandra Coyle <[email protected]> * checkstyles Signed-off-by: Cassandra Coyle <[email protected]> * add insecure Signed-off-by: Cassandra Coyle <[email protected]> * fix checkstyles Signed-off-by: Cassandra Coyle <[email protected]> * use InsecureTrustManagerFactory Signed-off-by: Cassandra Coyle <[email protected]> * fix test Signed-off-by: Cassandra Coyle <[email protected]> --------- Signed-off-by: Javier Aliaga <[email protected]> Signed-off-by: Cassandra Coyle <[email protected]> Co-authored-by: Javier Aliaga <[email protected]> Signed-off-by: sirivarma <[email protected]> * Address comments Signed-off-by: siri-varma <[email protected]> Signed-off-by: sirivarma <[email protected]> * Fix things Signed-off-by: siri-varma <[email protected]> Signed-off-by: sirivarma <[email protected]> * Fix things Signed-off-by: siri-varma <[email protected]> Signed-off-by: sirivarma <[email protected]> --------- Signed-off-by: sirivarma <[email protected]> Signed-off-by: Artur Ciocanu <[email protected]> Signed-off-by: Siri Varma Vegiraju <[email protected]> Signed-off-by: dependabot[bot] <[email protected]> Signed-off-by: Dapr Bot <[email protected]> Signed-off-by: Siri Varma Vegiraju <[email protected]> Signed-off-by: siri-varma <[email protected]> Signed-off-by: Cassandra Coyle <[email protected]> Signed-off-by: Javier Aliaga <[email protected]> Co-authored-by: Matheus Cruz <[email protected]> Co-authored-by: artur-ciocanu <[email protected]> Co-authored-by: Artur Ciocanu <[email protected]> Co-authored-by: Cassie Coyle <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Dapr Bot <[email protected]> Co-authored-by: Dapr Bot <[email protected]> Co-authored-by: Cassie Coyle <[email protected]> Co-authored-by: Javier Aliaga <[email protected]> Signed-off-by: sirivarma <[email protected]> * 1.5.4 (#1375) Signed-off-by: Cassandra Coyle <[email protected]> Signed-off-by: sirivarma <[email protected]> * Bump codecov/codecov-action from 5.4.2 to 5.4.3 (#1379) Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from 5.4.2 to 5.4.3. - [Release notes](https://github.com/codecov/codecov-action/releases) - [Changelog](https://github.com/codecov/codecov-action/blob/main/CHANGELOG.md) - [Commits](https://github.com/codecov/codecov-action/compare/v5.4.2...v5.4.3) --- updated-dependencies: - dependency-name: codecov/codecov-action dependency-version: 5.4.3 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Signed-off-by: sirivarma <[email protected]> * Bump fossas/fossa-action from 1.6.0 to 1.7.0 (#1380) Bumps [fossas/fossa-action](https://github.com/fossas/fossa-action) from 1.6.0 to 1.7.0. - [Release notes](https://github.com/fossas/fossa-action/releases) - [Commits](https://github.com/fossas/fossa-action/compare/v1.6.0...v1.7.0) --- updated-dependencies: - dependency-name: fossas/fossa-action dependency-version: 1.7.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Cassie Coyle <[email protected]> Signed-off-by: sirivarma <[email protected]> * Fix component spec parsing (#1370) * Fix component spec parsing Signed-off-by: Deepak <[email protected]> * Fix component spec parsing Signed-off-by: Deepak <[email protected]> * Fix component spec metadata parsing Signed-off-by: Deepak <[email protected]> * fix checkstyle-error Signed-off-by: Deepak <[email protected]> --------- Signed-off-by: Deepak <[email protected]> Co-authored-by: Cassie Coyle <[email protected]> Co-authored-by: artur-ciocanu <[email protected]> Signed-off-by: sirivarma <[email protected]> * chore: Add grpc keepalives (#1382) * chore: Add grpc keepalives Signed-off-by: Javier Aliaga <[email protected]> * chore: Make grpc keepalive configurable Signed-off-by: Javier Aliaga <[email protected]> * chore: Fix review comments Signed-off-by: Javier Aliaga <[email protected]> * chore: Missing keepalive config for GRPC TLS INSECURE Signed-off-by: Javier Aliaga <[email protected]> * chore: Add test Signed-off-by: Javier Aliaga <[email protected]> * fix: Comment typo Signed-off-by: Javier Aliaga <[email protected]> --------- Signed-off-by: Javier Aliaga <[email protected]> Signed-off-by: sirivarma <[email protected]> * Fix : Typo in code comments (#1381) * Fix Typo in Comments Signed-off-by: Deepak <[email protected]> * Update review comments Signed-off-by: Deepak <[email protected]> --------- Signed-off-by: Deepak <[email protected]> Co-authored-by: artur-ciocanu <[email protected]> Signed-off-by: sirivarma <[email protected]> * Spring boot workflow patterns examples with mechanical markdown and tests (#1377) * Feat Add TLS & mTLS support for gRPC with root CA and insecure mode (#1361) * feat: Support for GRPC ssl Signed-off-by: Javier Aliaga <[email protected]> * add tests Signed-off-by: Cassandra Coyle <[email protected]> * fix CI Signed-off-by: Cassandra Coyle <[email protected]> * add back else if Signed-off-by: Cassandra Coyle <[email protected]> * channel cleanup Signed-off-by: Cassandra Coyle <[email protected]> * add root ca support Signed-off-by: Cassandra Coyle <[email protected]> * checkstyles Signed-off-by: Cassandra Coyle <[email protected]> * add insecure Signed-off-by: Cassandra Coyle <[email protected]> * fix checkstyles Signed-off-by: Cassandra Coyle <[email protected]> * use InsecureTrustManagerFactory Signed-off-by: Cassandra Coyle <[email protected]> * fix test Signed-off-by: Cassandra Coyle <[email protected]> --------- Signed-off-by: Javier Aliaga <[email protected]> Signed-off-by: Cassandra Coyle <[email protected]> Co-authored-by: Javier Aliaga <[email protected]> Signed-off-by: salaboy <[email protected]> * spring boot workflow patterns initial version Signed-off-by: salaboy <[email protected]> * adding README for workflows Signed-off-by: salaboy <[email protected]> * adding child example Signed-off-by: salaboy <[email protected]> * updating examples to work with markdown tests Signed-off-by: salaboy <[email protected]> * running mechanical markdown for workflow examples Signed-off-by: salaboy <[email protected]> * Fix the issue with retries not happening correctly for Activities and Workflows (#1343) * Add coverage for some properties (#1297) Signed-off-by: sirivarma <[email protected]> * Make the DAPR version being used consistent across all tests (#1299) Signed-off-by: sirivarma <[email protected]> * Separate Dapr constants from IT container constants (#1315) Signed-off-by: Artur Ciocanu <[email protected]> Co-authored-by: Artur Ciocanu <[email protected]> Signed-off-by: sirivarma <[email protected]> * Use Java Bean for connection details and add more tests (#1317) * Use Java Bean for connection details and add more tests Signed-off-by: Artur Ciocanu <[email protected]> * Simplify mock setup Signed-off-by: Artur Ciocanu <[email protected]> * Adding even more tests for test coverage Signed-off-by: Artur Ciocanu <[email protected]> --------- Signed-off-by: Artur Ciocanu <[email protected]> Co-authored-by: Artur Ciocanu <[email protected]> Co-authored-by: Cassie Coyle <[email protected]> Signed-off-by: sirivarma <[email protected]> * Update CONTRIBUTING.md Signed-off-by: Siri Varma Vegiraju <[email protected]> Signed-off-by: sirivarma <[email protected]> * Bump codecov/codecov-action from 5.4.0 to 5.4.2 (#1318) Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from 5.4.0 to 5.4.2. - [Release notes](https://github.com/codecov/codecov-action/releases) - [Changelog](https://github.com/codecov/codecov-action/blob/main/CHANGELOG.md) - [Commits](https://github.com/codecov/codecov-action/compare/v5.4.0...v5.4.2) --- updated-dependencies: - dependency-name: codecov/codecov-action dependency-version: 5.4.2 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Cassie Coyle <[email protected]> Co-authored-by: Dapr Bot <[email protected]> Signed-off-by: sirivarma <[email protected]> * Fix URL building logic (#1320) * Fix URL building logic Signed-off-by: Artur Ciocanu <[email protected]> * Add test for query params Signed-off-by: Artur Ciocanu <[email protected]> * Fix the assertion in the test Signed-off-by: Artur Ciocanu <[email protected]> * Adjust the tests Signed-off-by: Artur Ciocanu <[email protected]> * Remove uneeded changes from IT test Signed-off-by: Artur Ciocanu <[email protected]> * Revert some unintended changes Signed-off-by: Artur Ciocanu <[email protected]> * Simplify the testing a little bit Signed-off-by: Artur Ciocanu <[email protected]> * Adjust the test to use ServerRequest Signed-off-by: Artur Ciocanu <[email protected]> * Test removing things from method invoke controller Signed-off-by: Artur Ciocanu <[email protected]> * Add query param encoding test Signed-off-by: Artur Ciocanu <[email protected]> * Revert some unintended changes Signed-off-by: Artur Ciocanu <[email protected]> * Some tiny styles Signed-off-by: Artur Ciocanu <[email protected]> --------- Signed-off-by: Artur Ciocanu <[email protected]> Co-authored-by: Artur Ciocanu <[email protected]> Signed-off-by: sirivarma <[email protected]> * Generate updated javadocs for 1.14.1 Signed-off-by: Dapr Bot <[email protected]> Signed-off-by: sirivarma <[email protected]> * Add Conversation AI to Java SDK (#1235) * Conversation first commit Signed-off-by: Siri Varma Vegiraju <[email protected]> Signed-off-by: sirivarma <[email protected]> Signed-off-by: siri-varma <[email protected]> * Add unit tests Signed-off-by: sirivarma <[email protected]> Signed-off-by: siri-varma <[email protected]> * change ai to conv Signed-off-by: sirivarma <[email protected]> Signed-off-by: siri-varma <[email protected]> * Move to single module Signed-off-by: sirivarma <[email protected]> Signed-off-by: siri-varma <[email protected]> * Remove module Signed-off-by: sirivarma <[email protected]> Signed-off-by: siri-varma <[email protected]> * Add Integration tests Signed-off-by: siri-varma <[email protected]> * Update sdk-tests/src/test/java/io/dapr/it/testcontainers/DaprConversationIT.java Co-authored-by: Cassie Coyle <[email protected]> Signed-off-by: Siri Varma Vegiraju <[email protected]> Signed-off-by: siri-varma <[email protected]> * Fix things Signed-off-by: siri-varma <[email protected]> * Address comments Signed-off-by: siri-varma <[email protected]> * Import tag Signed-off-by: siri-varma <[email protected]> * Address comments Signed-off-by: siri-varma <[email protected]> * Make common config Signed-off-by: siri-varma <[email protected]> * Address comments Signed-off-by: siri-varma <[email protected]> * fix constant Signed-off-by: siri-varma <[email protected]> * fix constant Signed-off-by: siri-varma <[email protected]> * fix constant Signed-off-by: siri-varma <[email protected]> * fix s Signed-off-by: siri-varma <[email protected]> * Fix things Signed-off-by: siri-varma <[email protected]> * Fix things Signed-off-by: siri-varma <[email protected]> * Fix things Signed-off-by: siri-varma <[email protected]> * Make common config Signed-off-by: siri-varma <[email protected]> * Update README.md Signed-off-by: Siri Varma Vegiraju <[email protected]> * Update README.md Signed-off-by: Siri Varma Vegiraju <[email protected]> --------- Signed-off-by: Siri Varma Vegiraju <[email protected]> Signed-off-by: sirivarma <[email protected]> Signed-off-by: siri-varma <[email protected]> Signed-off-by: Siri Varma Vegiraju <[email protected]> Co-authored-by: Cassie Coyle <[email protected]> Co-authored-by: Cassie Coyle <[email protected]> Signed-off-by: sirivarma <[email protected]> * Add docs for usage of Jobs SDK (#1323) * Add doc for jobs Signed-off-by: siri-varma <[email protected]> * Add docs for Jobs Signed-off-by: siri-varma <[email protected]> * Apply suggestions from code review Co-authored-by: Cassie Coyle <[email protected]> Signed-off-by: Siri Varma Vegiraju <[email protected]> --------- Signed-off-by: siri-varma <[email protected]> Signed-off-by: Siri Varma Vegiraju <[email protected]> Co-authored-by: artur-ciocanu <[email protected]> Co-authored-by: Cassie Coyle <[email protected]> Signed-off-by: sirivarma <[email protected]> * Use dapr/durabletask-java (#1336) * microsoft durabletask-java -> dapr durabletask-java Signed-off-by: Cassandra Coyle <[email protected]> * update another ref Signed-off-by: Cassandra Coyle <[email protected]> * 1.5.2 release Signed-off-by: Cassandra Coyle <[email protected]> * fix import order Signed-off-by: Cassandra Coyle <[email protected]> * Sdk new changes Signed-off-by: siri-varma <[email protected]> * Refine workflows Signed-off-by: siri-varma <[email protected]> * add ; Signed-off-by: Cassandra Coyle <[email protected]> * rm try Signed-off-by: Cassandra Coyle <[email protected]> --------- Signed-off-by: Cassandra Coyle <[email protected]> Signed-off-by: siri-varma <[email protected]> Co-authored-by: siri-varma <[email protected]> Signed-off-by: sirivarma <[email protected]> * Update master version to 1.16.0-SNAPSHOT Signed-off-by: Dapr Bot <[email protected]> Signed-off-by: sirivarma <[email protected]> * Fix NPE Signed-off-by: siri-varma <[email protected]> Signed-off-by: sirivarma <[email protected]> * Fix NPE Signed-off-by: siri-varma <[email protected]> Signed-off-by: sirivarma <[email protected]> * Fix NPE Signed-off-by: siri-varma <[email protected]> Signed-off-by: sirivarma <[email protected]> * Fix NPE Signed-off-by: siri-varma <[email protected]> Signed-off-by: sirivarma <[email protected]> * Fix NPE Signed-off-by: siri-varma <[email protected]> Signed-off-by: sirivarma <[email protected]> * Fix NPE Signed-off-by: siri-varma <[email protected]> Signed-off-by: sirivarma <[email protected]> * Fix things Signed-off-by: siri-varma <[email protected]> Signed-off-by: sirivarma <[email protected]> * Renaming and exposing connection details (#1341) Signed-off-by: Artur Ciocanu <[email protected]> Co-authored-by: Artur Ciocanu <[email protected]> Signed-off-by: sirivarma <[email protected]> * [Master] Fix Vulnerabilities (#1354) * update okio Signed-off-by: Cassandra Coyle <[email protected]> * rm unused dep Signed-off-by: Cassandra Coyle <[email protected]> --------- Signed-off-by: Cassandra Coyle <[email protected]> Signed-off-by: sirivarma <[email protected]> * Feat Add TLS & mTLS support for gRPC with root CA and insecure mode (#1361) * feat: Support for GRPC ssl Signed-off-by: Javier Aliaga <[email protected]> * add tests Signed-off-by: Cassandra Coyle <[email protected]> * fix CI Signed-off-by: Cassandra Coyle <[email protected]> * add back else if Signed-off-by: Cassandra Coyle <[email protected]> * channel cleanup Signed-off-by: Cassandra Coyle <[email protected]> * add root ca support Signed-off-by: Cassandra Coyle <[email protected]> * checkstyles Signed-off-by: Cassandra Coyle <[email protected]> * add insecure Signed-off-by: Cassandra Coyle <[email protected]> * fix checkstyles Signed-off-by: Cassandra Coyle <[email protected]> * use InsecureTrustManagerFactory Signed-off-by: Cassandra Coyle <[email protected]> * fix test Signed-off-by: Cassandra Coyle <[email protected]> --------- Signed-off-by: Javier Aliaga <[email protected]> Signed-off-by: Cassandra Coyle <[email protected]> Co-authored-by: Javier Aliaga <[email protected]> Signed-off-by: sirivarma <[email protected]> * Address comments Signed-off-by: siri-varma <[email protected]> Signed-off-by: sirivarma <[email protected]> * Fix things Signed-off-by: siri-varma <[email protected]> Signed-off-by: sirivarma <[email protected]> * Fix things Signed-off-by: siri-varma <[email protected]> Signed-off-by: sirivarma <[email protected]> --------- Signed-off-by: sirivarma <[email protected]> Signed-off-by: Artur Ciocanu <[email protected]> Signed-off-by: Siri Varma Vegiraju <[email protected]> Signed-off-by: dependabot[bot] <[email protected]> Signed-off-by: Dapr Bot <[email protected]> Signed-off-by: Siri Varma Vegiraju <[email protected]> Signed-off-by: siri-varma <[email protected]> Signed-off-by: Cassandra Coyle <[email protected]> Signed-off-by: Javier Aliaga <[email protected]> Co-authored-by: Matheus Cruz <[email protected]> Co-authored-by: artur-ciocanu <[email protected]> Co-authored-by: Artur Ciocanu <[email protected]> Co-authored-by: Cassie Coyle <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Dapr Bot <[email protected]> Co-authored-by: Dapr Bot <[email protected]> Co-authored-by: Cassie Coyle <[email protected]> Co-authored-by: Javier Aliaga <[email protected]> Signed-off-by: salaboy <[email protected]> * 1.5.4 (#1375) Signed-off-by: Cassandra Coyle <[email protected]> Signed-off-by: salaboy <[email protected]> * fixing order Id correlation Signed-off-by: salaboy <[email protected]> * fixing waiting time for tests to run Signed-off-by: salaboy <[email protected]> * fixing app name Signed-off-by: salaboy <[email protected]> * adding app name and removing log lines Signed-off-by: salaboy <[email protected]> * Bump codecov/codecov-action from 5.4.2 to 5.4.3 (#1379) Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from 5.4.2 to 5.4.3. - [Release notes](https://github.com/codecov/codecov-action/releases) - [Changelog](https://github.com/codecov/codecov-action/blob/main/CHANGELOG.md) - [Commits](https://github.com/codecov/codecov-action/compare/v5.4.2...v5.4.3) --- updated-dependencies: - dependency-name: codecov/codecov-action dependency-version: 5.4.3 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Signed-off-by: salaboy <[email protected]> * Bump fossas/fossa-action from 1.6.0 to 1.7.0 (#1380) Bumps [fossas/fossa-action](https://github.com/fossas/fossa-action) from 1.6.0 to 1.7.0. - [Release notes](https://github.com/fossas/fossa-action/releases) - [Commits](https://github.com/fossas/fossa-action/compare/v1.6.0...v1.7.0) --- updated-dependencies: - dependency-name: fossas/fossa-action dependency-version: 1.7.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Cassie Coyle <[email protected]> Signed-off-by: salaboy <[email protected]> * Fix component spec parsing (#1370) * Fix component spec parsing Signed-off-by: Deepak <[email protected]> * Fix component spec parsing Signed-off-by: Deepak <[email protected]> * Fix component spec metadata parsing Signed-off-by: Deepak <[email protected]> * fix checkstyle-error Signed-off-by: Deepak <[email protected]> --------- Signed-off-by: Deepak <[email protected]> Co-authored-by: Cassie Coyle <[email protected]> Co-authored-by: artur-ciocanu <[email protected]> Signed-off-by: salaboy <[email protected]> * Update spring-boot-examples/workflows/README.md Co-authored-by: Cassie Coyle <[email protected]> Signed-off-by: salaboy <[email protected]> * fixing comments Signed-off-by: salaboy <[email protected]> * Update body.json Signed-off-by: artur-ciocanu <[email protected]> Signed-off-by: salaboy <[email protected]> * Update FanOutInWorkflow.java Signed-off-by: artur-ciocanu <[email protected]> Signed-off-by: salaboy <[email protected]> * clean up logs for multiple executions, for standalone mode Signed-off-by: salaboy <[email protected]> * Update application.properties Signed-off-by: artur-ciocanu <[email protected]> --------- Signed-off-by: Javier Aliaga <[email protected]> Signed-off-by: Cassandra Coyle <[email protected]> Signed-off-by: salaboy <[email protected]> Signed-off-by: sirivarma <[email protected]> Signed-off-by: Artur Ciocanu <[email protected]> Signed-off-by: Siri Varma Vegiraju <[email protected]> Signed-off-by: dependabot[bot] <[email protected]> Signed-off-by: Dapr Bot <[email protected]> Signed-off-by: Siri Varma Vegiraju <[email protected]> Signed-off-by: siri-varma <[email protected]> Signed-off-by: Deepak <[email protected]> Signed-off-by: artur-ciocanu <[email protected]> Co-authored-by: Cassie Coyle <[email protected]> Co-authored-by: Javier Aliaga <[email protected]> Co-authored-by: Siri Varma Vegiraju <[email protected]> Co-authored-by: Matheus Cruz <[email protected]> Co-authored-by: artur-ciocanu <[email protected]> Co-authored-by: Artur Ciocanu <[email protected]> Co-authored-by: Cassie Coyle <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Dapr Bot <[email protected]> Co-authored-by: Dapr Bot <[email protected]> Co-authored-by: iddeepak <[email protected]> Signed-off-by: sirivarma <[email protected]> * System Properties + Env Var Docs (#1384) * add properties file to docs and align system properties to env var name convention with . as _ Signed-off-by: Cassandra Coyle <[email protected]> * reset env var to what it was Signed-off-by: Cassandra Coyle <[email protected]> --------- Signed-off-by: Cassandra Coyle <[email protected]> Co-authored-by: artur-ciocanu <[email protected]> Signed-off-by: sirivarma <[email protected]> * Updating docs to have spring boot 3.x banner and not hardcoded deps (#1366) * updating docs to have spring boot 3.x banner and not hardcoded deps Signed-off-by: salaboy <[email protected]> * Update _index.md Signed-off-by: salaboy <[email protected]> * Update _index.md Adding links to discord and github issues Signed-off-by: salaboy <[email protected]> --------- Signed-off-by: salaboy <[email protected]> Co-authored-by: artur-ciocanu <[email protected]> Signed-off-by: sirivarma <[email protected]> * Cleaup Test Dependencies (#1332) * Update CONTRIBUTING.md Signed-off-by: Siri Varma Vegiraju <[email protected]> * Fix things Signed-off-by: sirivarma <[email protected]> * Fix things? Signed-off-by: sirivarma <[email protected]> * Fix logback version Signed-off-by: siri-varma <[email protected]> * Fix logback version Signed-off-by: siri-varma <[email protected]> * Add pom Signed-off-by: siri-varma <[email protected]> * Add pom Signed-off-by: siri-varma <[email protected]> * Add properties Signed-off-by: siri-varma <[email protected]> * Added test scope Signed-off-by: siri-varma <[email protected]> * MArk as test Signed-off-by: siri-varma <[email protected]> * Update pom.xml Signed-off-by: Siri Varma Vegiraju <[email protected]> * Update pom.xml Signed-off-by: Siri Varma Vegiraju <[email protected]> --------- Signed-off-by: Siri Varma Vegiraju <[email protected]> Signed-off-by: sirivarma <[email protected]> Signed-off-by: siri-varma <[email protected]> Co-authored-by: artur-ciocanu <[email protected]> Signed-off-by: sirivarma <[email protected]> * chore: New task execution task id test (#1352) * chore: New task execution task id test test how taskExecutionTaskId can be used for idempotency Signed-off-by: Javier Aliaga <[email protected]> * chore: Clean up not used files Signed-off-by: Javier Aliaga <[email protected]> * docs: Task execution keys Signed-off-by: Javier Aliaga <[email protected]> * test: Modify unit tests Signed-off-by: Javier Aliaga <[email protected]> * Remove new lines Signed-off-by: artur-ciocanu <[email protected]> --------- Signed-off-by: Javier Aliaga <[email protected]> Signed-off-by: artur-ciocanu <[email protected]> Co-authored-by: Cassie Coyle <[email protected]> Co-authored-by: artur-ciocanu <[email protected]> Signed-off-by: sirivarma <[email protected]> * Revert "chore: New task execution task id test (#1352)" (#1389) This reverts commit 949584f69f4bc78ca59abe6ad000f1f2ace21768. Signed-off-by: Javier Aliaga <[email protected]> Signed-off-by: sirivarma <[email protected]> * 1.5.5 (#1390) Signed-off-by: Cassandra Coyle <[email protected]> Signed-off-by: sirivarma <[email protected]> * Add Documentation for Conversation AI SDK (#1387) Signed-off-by: sirivarma <[email protected]> * Cleanup Spring Dependencies (#1334) * Update CONTRIBUTING.md Signed-off-by: Siri Varma Vegiraju <[email protected]> * Fix spring Signed-off-by: siri-varma <[email protected]> * Add context Signed-off-by: siri-varma <[email protected]> * Phase 1 Signed-off-by: siri-varma <[email protected]> * Fix things Signed-off-by: siri-varma <[email protected]> * Fix things Signed-off-by: siri-varma <[email protected]> * Fix spring Signed-off-by: siri-varma <[email protected]> * Add context Signed-off-by: siri-varma <[email protected]> * Phase 1 Signed-off-by: siri-varma <[email protected]> * Fix things Signed-off-by: siri-varma <[email protected]> * Fix things Signed-off-by: siri-varma <[email protected]> * move version Signed-off-by: sirivarma <[email protected]> * Fix pom Signed-off-by: sirivarma <[email protected]> * change version Signed-off-by: sirivarma <[email protected]> * remove unused Signed-off-by: siri-varma <[email protected]> * Address comments Signed-off-by: siri-varma <[email protected]> * Fix test Signed-off-by: siri-varma <[email protected]> * Fix test Signed-off-by: siri-varma <[email protected]> * Fix things Signed-off-by: sirivarma <[email protected]> --------- Signed-off-by: Siri Varma Vegiraju <[email protected]> Signed-off-by: siri-varma <[email protected]> Signed-off-by: sirivarma <[email protected]> Co-authored-by: artur-ciocanu <[email protected]> Signed-off-by: sirivarma <[email protected]> * Bump org.springframework:spring-context in /dapr-spring (#1394) Bumps [org.springframework:spring-context](https://github.com/spring-projects/spring-framework) from 6.1.8 to 6.1.14. - [Release notes](https://github.com/spring-projects/spring-framework/releases) - [Commits](https://github.com/spring-projects/spring-framework/compare/v6.1.8...v6.1.14) --- updated-dependencies: - dependency-name: org.springframework:spring-context dependency-version: 6.1.14 dependency-type: direct:production ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Signed-off-by: sirivarma <[email protected]> * Compensation example for Workflows (#1333) * add basic compensation example for wf Signed-off-by: Cassandra Coyle <[email protected]> * update commands to run + wf id Signed-off-by: Cassandra Coyle <[email protected]> * update readme + add mechanical markdown Signed-off-by: Cassandra Coyle <[email protected]> * fix import Signed-off-by: Cassandra Coyle <[email protected]> * fix mechanical markdown + add how to test it locally Signed-off-by: Cassandra Coyle <[email protected]> * move compensation example readme to workflows readme Signed-off-by: Cassandra Coyle <[email protected]> * Update BookCarActivity.java Signed-off-by: artur-ciocanu <[email protected]> * Update BookFlightActivity.java Signed-off-by: artur-ciocanu <[email protected]> * Update BookHotelActivity.java Signed-off-by: artur-ciocanu <[email protected]> * Update BookTripClient.java Signed-off-by: artur-ciocanu <[email protected]> * Update BookTripWorker.java Signed-off-by: artur-ciocanu <[email protected]> * Update BookTripWorkflow.java Signed-off-by: artur-ciocanu <[email protected]> * Update CancelCarActivity.java Signed-off-by: artur-ciocanu <[email protected]> * Update CancelFlightActivity.java Signed-off-by: artur-ciocanu <[email protected]> * Update CancelHotelActivity.java Signed-off-by: artur-ciocanu <[email protected]> * add retry IT tests and catch TaskFailedException Signed-off-by: Cassandra Coyle <[email protected]> * add test for no compensation if successful and assert attempts Signed-off-by: Cassandra Coyle <[email protected]> * update mechanical markdown Signed-off-by: Cassandra Coyle <[email protected]> * add back pubsub... but this should be removed long term Signed-off-by: Cassandra Coyle <[email protected]> * try adding waitforsidecar Signed-off-by: Cassandra Coyle <[email protected]> * rm tests from examples pr Signed-off-by: Cassandra Coyle <[email protected]> * reset unintended changes Signed-off-by: Cassandra Coyle <[email protected]> --------- Signed-off-by: Cassandra Coyle <[email protected]> Signed-off-by: artur-ciocanu <[email protected]> Co-authored-by: artur-ciocanu <[email protected]> Signed-off-by: sirivarma <[email protected]> * Adding remote endpoint request from inside activity with retry (#1388) * adding remote endpoint request from inside activity with retry Signed-off-by: salaboy <[email protected]> * adding retry with Microcks payloads Signed-off-by: salaboy <[email protected]> * fixing review comments Signed-off-by: salaboy <[email protected]> * chore: New task execution task id test (#1352) * chore: New task execution task id test test how taskExecutionTaskId can be used for idempotency Signed-off-by: Javier Aliaga <[email protected]> * chore: Clean up not used files Signed-off-by: Javier Aliaga <[email protected]> * docs: Task execution keys Signed-off-by: Javier Aliaga <[email protected]> * test: Modify unit tests Signed-off-by: Javier Aliaga <[email protected]> * Remove new lines Signed-off-by: artur-ciocanu <[email protected]> --------- Signed-off-by: Javier Aliaga <[email protected]> Signed-off-by: artur-ciocanu <[email protected]> Co-authored-by: Cassie Coyle <[email protected]> Co-authored-by: artur-ciocanu <[email protected]> Signed-off-by: salaboy <[email protected]> * Revert "chore: New task execution task id test (#1352)" (#1389) This reverts commit 949584f69f4bc78ca59abe6ad000f1f2ace21768. Signed-off-by: Javier Aliaga <[email protected]> Signed-off-by: salaboy <[email protected]> * 1.5.5 (#1390) Signed-off-by: Cassandra Coyle <[email protected]> Signed-off-by: salaboy <[email protected]> * Add Documentation for Conversation AI SDK (#1387) Signed-off-by: salaboy <[email protected]> * Cleanup Spring Dependencies (#1334) * Update CONTRIBUTING.md Signed-off-by: Siri Varma Vegiraju <[email protected]> * Fix spring Signed-off-by: siri-varma <[email protected]> * Add context Signed-off-by: siri-varma <[email protected]> * Phase 1 Signed-off-by: siri-varma <[email protected]> * Fix things Signed-off-by: siri-varma <[email protected]> * Fix things Signed-off-by: siri-varma <[email protected]> * Fix spring Signed-off-by: siri-varma <[email protected]> * Add context Signed-off-by: siri-varma <[email protected]> * Phase 1 Signed-off-by: siri-varma <[email protected]> * Fix things Signed-off-by: siri-varma <[email protected]> * Fix things Signed-off-by: siri-varma <[email protected]> * move version Signed-off-by: sirivarma <[email protected]> * Fix pom Signed-off-by: sirivarma <[email protected]> * change version Signed-off-by: sirivarma <[email protected]> * remove unused Signed-off-by: siri-varma <[email protected]> * Address comments Signed-off-by: siri-varma <[email protected]> * Fix test Signed-off-by: siri-varma <[email protected]> * Fix test Signed-off-by: siri-varma <[email protected]> * Fix things Signed-off-by: sirivarma <[email protected]> --------- Signed-off-by: Siri Varma Vegiraju <[email protected]> Signed-off-by: siri-varma <[email protected]> Signed-off-by: sirivarma <[email protected]> Co-authored-by: artur-ciocanu <[email protected]> Signed-off-by: salaboy <[email protected]> * network is needed Signed-off-by: salaboy <[email protected]> --------- Signed-off-by: salaboy <[email protected]> Signed-off-by: Javier Aliaga <[email protected]> Signed-off-by: artur-ciocanu <[email protected]> Signed-off-by: Cassandra Coyle <[email protected]> Signed-off-by: Siri Varma Vegiraju <[email protected]> Signed-off-by: siri-varma <[email protected]> Signed-off-by: sirivarma <[email protected]> Co-authored-by: Javier Aliaga <[email protected]> Co-authored-by: Cassie Coyle <[email protected]> Co-authored-by: artur-ciocanu <[email protected]> Co-authored-by: Siri Varma Vegiraju <[email protected]> Signed-off-by: sirivarma <[email protected]> * Bump org.springframework:spring-context in /dapr-spring (#1398) Bumps [org.springframework:spring-context](https://github.com/spring-projects/spring-framework) from 6.1.14 to 6.1.20. - [Release notes](https://github.com/spring-projects/spring-framework/releases) - [Commits](https://github.com/spring-projects/spring-framework/compare/v6.1.14...v6.1.20) --- updated-dependencies: - dependency-name: org.springframework:spring-context dependency-version: 6.1.20 dependency-type: direct:production ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Signed-off-by: sirivarma <[email protected]> * Grouping IT tests per API surface (#1401) * Grouping IT tests per API surface Signed-off-by: Artur Ciocanu <[email protected]> * Fix build Signed-off-by: Artur Ciocanu <[email protected]> --------- Signed-off-by: Artur Ciocanu <[email protected]> Co-authored-by: Artur Ciocanu <[email protected]> Signed-off-by: sirivarma <[email protected]> * Ensure OTEL version from examples aligns with SDK and ITs (#1403) Signed-off-by: sirivarma <[email protected]> * chore: Support configuration for max grpc inbound message (#1411) Signed-off-by: Javier Aliaga <[email protected]> Signed-off-by: sirivarma <[email protected]> * Adding Support for Suspend / Resume Workflows (#1405) * adding IT test Signed-off-by: salaboy <[email protected]> * adding initial version of suspend/resume example Signed-off-by: salaboy <[email protected]> * updating README Signed-off-by: salaboy <[email protected]> * Update README.md Signed-off-by: salaboy <[email protected]> * following Javi's suggestion Signed-off-by: salaboy <[email protected]> * fixing wrong year in headers Signed-off-by: salaboy <[email protected]> * fixing paths in one more README.md file Signed-off-by: salaboy <[email protected]> * adding output validation Signed-off-by: salaboy <[email protected]> * adding missing port Signed-off-by: salaboy <[email protected]> * fixing check conditions Signed-off-by: salaboy <[email protected]> --------- Signed-off-by: salaboy <[email protected]> Co-authored-by: Cassie Coyle <[email protected]> Signed-off-by: sirivarma <[email protected]> * Add retry handler support (#1412) * Add retry handler support Signed-off-by: Mason <[email protected]> * Wrap DurableTask objects Signed-off-by: Mason <[email protected]> * Rename method Signed-off-by: Mason <[email protected]> * Add isNonRetriable field to WorkflowTaskFailureDetails Signed-off-by: Mason <[email protected]> * Add unit test Signed-off-by: Mason <[email protected]> * Removed duplicate WorkflowFailureDetails class Signed-off-by: Mason <[email protected]> * Removed unneeded when statements in retry policy unit test Signed-off-by: Mason <[email protected]> * Add unit test to test both RetryPolicy and RetryHandler Signed-off-by: Mason <[email protected]> * Create toRetryPolicy method Signed-off-by: Mason <[email protected]> --------- Signed-off-by: Mason <[email protected]> Co-authored-by: Siri Varma Vegiraju <[email protected]> Co-authored-by: Cassie Coyle <[email protected]> Signed-off-by: sirivarma <[email protected]> * Pull out createTimer logic (#1419) * pull out logical changes from @salaboy's PR to release it Signed-off-by: Cassandra Coyle <[email protected]> * add missing import Signed-off-by: Cassandra Coyle <[email protected]> --------- Signed-off-by: Cassandra Coyle <[email protected]> Signed-off-by: sirivarma <[email protected]> * Make sure there no multiple empty lines and every file ends with a new line (#1417) Signed-off-by: sirivarma <[email protected]> * Automated Header Checks (#1416) Signed-off-by: sirivarma <[email protected]> * Bump org.springframework:spring-web in /dapr-spring (#1424) Bumps [org.springframework:spring-web](https://github.com/spring-projects/spring-framework) from 6.1.20 to 6.1.21. - [Release notes](https://github.com/spring-projects/spring-framework/releases) - [Commits](https://github.com/spring-projects/spring-framework/compare/v6.1.20...v6.1.21) --- updated-dependencies: - dependency-name: org.springframework:spring-web dependency-version: 6.1.21 dependency-type: direct:production ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Signed-off-by: sirivarma <[email protected]> * Aligning Spring Boot and SpringFramework versions (#1427) * aligning versions Signed-off-by: salaboy <[email protected]> * letting SB to manage the logback version, so it is aligned Signed-off-by: salaboy <[email protected]> * removing dep from sdk-tests Signed-off-by: salaboy <[email protected]> * removing logback Signed-off-by: salaboy <[email protected]> --------- Signed-off-by: salaboy <[email protected]> Signed-off-by: sirivarma <[email protected]> * Update pom.xml to have testcontainers 1.21.3 (#1436) Signed-off-by: salaboy <[email protected]> Signed-off-by: sirivarma <[email protected]> * Adding examples to Spring Boot (duration, zoneddatetime and suspend/resume) (#1413) * implementing createtime with zoneddatetime Signed-off-by: salaboy <[email protected]> * adding duration and zoneddatetime examples Signed-off-by: salaboy <[email protected]> * using external event wf to test suspend resume Signed-off-by: salaboy <[email protected]> --------- Signed-off-by: salaboy <[email protected]> Signed-off-by: sirivarma <[email protected]> * Bump org.apache.commons:commons-lang3 from 3.9 to 3.18.0 (#1446) Bumps org.apache.commons:commons-lang3 from 3.9 to 3.18.0. --- updated-dependencies: - dependency-name: org.apache.commons:commons-lang3 dependency-version: 3.18.0 dependency-type: direct:development ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: artur-ciocanu <[email protected]> Signed-off-by: sirivarma <[email protected]> * Update dapr docs for Hugo upgrade (#1443) Signed-off-by: Marc Duiker <[email protected]> Co-authored-by: Cassie Coyle <[email protected]> Signed-off-by: sirivarma <[email protected]> * Adds note about workflow start time (#1444) Signed-off-by: joshvanl <[email protected]> Co-authored-by: Dapr Bot <[email protected]> Co-authored-by: artur-ciocanu <[email protected]> Signed-off-by: sirivarma <[email protected]> * Migrate PubSub removing flaky test (#1407) * Migrate PubSub removing flaky test Signed-off-by: Matheus Cruz <[email protected]> * Adjust assertion Signed-off-by: Matheus Cruz <[email protected]> * Change assert Signed-off-by: Matheus Cruz <[email protected]> * Apply pull request suggestions Signed-off-by: Matheus Cruz <[email protected]> * Use custom ObjectSerializer Signed-off-by: Matheus Cruz <[email protected]> --------- Signed-off-by: Matheus Cruz <[email protected]> Co-authored-by: artur-ciocanu <[email protected]> Signed-off-by: sirivarma <[email protected]> * supporting spring boot property for API TOKEN on workflow interceptor (#1452) Signed-off-by: salaboy <[email protected]> Signed-off-by: sirivarma <[email protected]> * Supporting placement and scheduler custom images (#1450) * supporting placement and scheduler custom images Signed-off-by: salaboy <[email protected]> * Bump org.apache.commons:commons-lang3 from 3.9 to 3.18.0 (#1446) Bumps org.apache.commons:commons-lang3 from 3.9 to 3.18.0. --- updated-dependencies: - dependency-name: org.apache.commons:commons-lang3 dependency-version: 3.18.0 dependency-type: direct:development ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: artur-ciocanu <[email protected]> Signed-off-by: salaboy <[email protected]> * Update dapr docs for Hugo upgrade (#1443) Signed-off-by: Marc Duiker <[email protected]> Co-authored-by: Cassie Coyle <[email protected]> Signed-off-by: salaboy <[email protected]> * Adds note about workflow start time (#1444) Signed-off-by: joshvanl <[email protected]> Co-authored-by: Dapr Bot <[email protected]> Co-authored-by: artur-ciocanu <[email protected]> Signed-off-by: salaboy <[email protected]> * adding test to validate canonical names with substitutes Signed-off-by: salaboy <[email protected]> * Migrate PubSub removing flaky test (#1407) * Migrate PubSub removing flaky test Signed-off-by: Matheus Cruz <[email protected]> * Adjust assertion Signed-off-by: Matheus Cruz <[email protected]> * Change assert Signed-off-by: Matheus Cruz <[email protected]> * Apply pull request suggestions Signed-off-by: Matheus Cruz <[email protected]> * Use custom ObjectSerializer Signed-off-by: Matheus Cruz <[email protected]> --------- Signed-off-by: Matheus Cruz <[email protected]> Co-authored-by: artur-ciocanu <[email protected]> Signed-off-by: salaboy <[email protected]> * adding tests for coverage Signed-off-by: salaboy <[email protected]> --------- Signed-off-by: salaboy <[email protected]> Signed-off-by: dependabot[bot] <[email protected]> Signed-off-by: Marc Duiker <[email protected]> Signed-off-by: joshvanl <[email protected]> Signed-off-by: Matheus Cruz <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: artur-ciocanu <[email protected]> Co-authored-by: Marc Duiker <[email protected]> Co-authored-by: Cassie Coyle <[email protected]> Co-authored-by: Josh van Leeuwen <[email protected]> Co-authored-by: Dapr Bot <[email protected]> Co-authored-by: Matheus Cruz <[email protected]> Signed-off-by: sirivarma <[email protected]> * chore: Replace ossrh url (#1454) Signed-off-by: Javier Aliaga <[email protected]> Signed-off-by: sirivarma <[email protected]> * Upgrading to 1.15.7 (#1458) * upgrading to 1.15.7 Signed-off-by: salaboy <[email protected]> * using DAPR VERSION Signed-off-by: salaboy <[email protected]> --------- Signed-off-by: salaboy <[email protected]> Signed-off-by: sirivarma <[email protected]> * updating sched api on DaprContainer (#1462) Signed-off-by: salaboy <[email protected]> Signed-off-by: sirivarma <[email protected]> * Adding app health check parameters (#1465) * adding app health check parameters Signed-off-by: salaboy <[email protected]> * fixing style Signed-off-by: salaboy <[email protected]> * testing with configure for coverage Signed-off-by: salaboy <[email protected]> * updating sched api on DaprContainer (#1462) Signed-off-by: salaboy <[email protected]> * fix Artur comments Signed-off-by: salaboy <[email protected]> --------- Signed-off-by: salaboy <[email protected]> Signed-off-by: sirivarma <[email protected]> * Add note about the dapr.client.* properties (#1467) Signed-off-by: Matheus Cruz <[email protected]> Signed-off-by: sirivarma <[email protected]> * conversation ai Signed-off-by: sirivarma <[email protected]> * Fix pom Signed-off-by: sirivarma <[email protected]> * Fix pom Signed-off-by: sirivarma <[email protected]> * fix things Signed-off-by: sirivarma <[email protected]> * Fix things Signed-off-by: sirivarma <[email protected]> * docs: Add gRPC response settings to properties documentation (#1482) * docs: Add gRPC response settings to properties documentation Signed-off-by: MyMirelHub <[email protected]> * Apply suggestion from @javier-aliaga Co-authored-by: Javier Aliaga <[email protected]> Signed-off-by: Mirel Isaj <[email protected]> --------- Signed-off-by: MyMirelHub <[email protected]> Signed-off-by: Mirel Isaj <[email protected]> Co-authored-by: Javier Aliaga <[email protected]> Signed-off-by: sirivarma <[email protected]> * Generate updated javadocs for 1.14.2 Signed-off-by: Dapr Bot <[email protected]> Signed-off-by: sirivarma <[email protected]> * chore: Use 1.16.0 rc 2 (#1463) * chore: Use 1.16.0 rc Signed-off-by: Javier Aliaga <[email protected]> * chore: Use dapr:1.16-rc.2 Signed-off-by: Javier Aliaga <[email protected]> * chore: Add overwrite flag to jobs Signed-off-by: Javier Aliaga <[email protected]> --------- Signed-off-by: Javier Aliaga <[email protected]> Signed-off-by: sirivarma <[email protected]> * Add Failure Policy for Jobs SDK (#1448) * Update CONTRIBUTING.md Signed-off-by: Siri Varma Vegiraju <[email protected]> * Ad…
1 parent deabf9a commit c294dfb

30 files changed

+3212
-59
lines changed
Lines changed: 136 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,136 @@
1+
/*
2+
* Copyright 2021 The Dapr Authors
3+
* Licensed under the Apache License, Version 2.0 (the "License");
4+
* you may not use this file except in compliance with the License.
5+
* You may obtain a copy of the License at
6+
* http://www.apache.org/licenses/LICENSE-2.0
7+
* Unless required by applicable law or agreed to in writing, software
8+
* distributed under the License is distributed on an "AS IS" BASIS,
9+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
10+
* See the License for the specific language governing permissions and
11+
limitations under the License.
12+
*/
13+
14+
package io.dapr.examples.conversation;
15+
16+
import io.dapr.client.DaprClientBuilder;
17+
import io.dapr.client.DaprPreviewClient;
18+
import io.dapr.client.domain.AssistantMessage;
19+
import io.dapr.client.domain.ConversationInputAlpha2;
20+
import io.dapr.client.domain.ConversationMessage;
21+
import io.dapr.client.domain.ConversationMessageContent;
22+
import io.dapr.client.domain.ConversationRequestAlpha2;
23+
import io.dapr.client.domain.ConversationResponseAlpha2;
24+
import io.dapr.client.domain.ConversationResultAlpha2;
25+
import io.dapr.client.domain.ConversationResultChoices;
26+
import io.dapr.client.domain.ConversationToolCalls;
27+
import io.dapr.client.domain.ConversationToolCallsOfFunction;
28+
import io.dapr.client.domain.SystemMessage;
29+
import io.dapr.client.domain.ToolMessage;
30+
import io.dapr.client.domain.UserMessage;
31+
import reactor.core.publisher.Mono;
32+
33+
import java.util.ArrayList;
34+
import java.util.List;
35+
36+
public class AssistantMessageDemo {
37+
/**
38+
* The main method to demonstrate conversation AI with assistant messages and conversation history.
39+
*
40+
* @param args Input arguments (unused).
41+
*/
42+
public static void main(String[] args) {
43+
try (DaprPreviewClient client = new DaprClientBuilder().buildPreviewClient()) {
44+
System.out.println("Demonstrating Conversation AI with Assistant Messages and Conversation History");
45+
46+
// Create a conversation history with multiple message types
47+
List<ConversationMessage> conversationHistory = new ArrayList<>();
48+
49+
// 1. System message to set context
50+
SystemMessage systemMessage = new SystemMessage(List.of(
51+
new ConversationMessageContent("You are a helpful assistant that can help with weather queries.")
52+
));
53+
systemMessage.setName("WeatherBot");
54+
conversationHistory.add(systemMessage);
55+
56+
// 2. Initial user greeting
57+
UserMessage greeting = new UserMessage(List.of(
58+
new ConversationMessageContent("Hello! I need help with weather information.")
59+
));
60+
greeting.setName("User123");
61+
conversationHistory.add(greeting);
62+
63+
// 3. Assistant response with tool call
64+
AssistantMessage assistantResponse = new AssistantMessage(
65+
List.of(new ConversationMessageContent("I'll help you with weather information. Let me check the weather for you.")),
66+
List.of(new ConversationToolCalls(
67+
new ConversationToolCallsOfFunction("get_weather", "{\"location\": \"San Francisco\", \"unit\": \"fahrenheit\"}")
68+
))
69+
);
70+
assistantResponse.setName("WeatherBot");
71+
conversationHistory.add(assistantResponse);
72+
73+
// 4. Tool response (simulating weather API response)
74+
ToolMessage toolResponse = new ToolMessage(List.of(
75+
new ConversationMessageContent("{\"temperature\": \"72F\", \"condition\": \"sunny\", \"humidity\": \"65%\"}")
76+
));
77+
toolResponse.setName("weather_api");
78+
conversationHistory.add(toolResponse);
79+
80+
// 5. Current user question
81+
UserMessage currentQuestion = new UserMessage(List.of(
82+
new ConversationMessageContent("Based on that weather data, should I wear a jacket today?")
83+
));
84+
currentQuestion.setName("User123");
85+
conversationHistory.add(currentQuestion);
86+
87+
// Create conversation input with the full history
88+
ConversationInputAlpha2 conversationInput = new ConversationInputAlpha2(conversationHistory);
89+
conversationInput.setScrubPii(false);
90+
91+
// Create the conversation request
92+
ConversationRequestAlpha2 request = new ConversationRequestAlpha2("echo", List.of(conversationInput))
93+
.setContextId("assistant-demo-context")
94+
.setTemperature(0.8d);
95+
96+
// Send the request
97+
System.out.println("Sending conversation with assistant messages and history...");
98+
System.out.println("Conversation includes:");
99+
System.out.println("- System message (context setting)");
100+
System.out.println("- User greeting");
101+
System.out.println("- Assistant response with tool call");
102+
System.out.println("- Tool response with weather data");
103+
System.out.println("- User follow-up question");
104+
105+
Mono<ConversationResponseAlpha2> responseMono = client.converseAlpha2(request);
106+
ConversationResponseAlpha2 response = responseMono.block();
107+
108+
// Process and display the response
109+
if (response != null && response.getOutputs() != null && !response.getOutputs().isEmpty()) {
110+
ConversationResultAlpha2 result = response.getOutputs().get(0);
111+
if (result.getChoices() != null && !result.getChoices().isEmpty()) {
112+
ConversationResultChoices choice = result.getChoices().get(0);
113+
114+
if (choice.getMessage() != null && choice.getMessage().getContent() != null) {
115+
System.out.printf("Assistant Response: %s%n", choice.getMessage().getContent());
116+
}
117+
118+
// Check for additional tool calls in the response
119+
if (choice.getMessage() != null && choice.getMessage().getToolCalls() != null) {
120+
System.out.println("Assistant requested additional tool calls:");
121+
choice.getMessage().getToolCalls().forEach(toolCall -> {
122+
System.out.printf("Tool: %s, Arguments: %s%n",
123+
toolCall.getFunction().getName(),
124+
toolCall.getFunction().getArguments());
125+
});
126+
}
127+
}
128+
}
129+
130+
System.out.println("Assistant message demonstration completed.");
131+
132+
} catch (Exception e) {
133+
throw new RuntimeException(e);
134+
}
135+
}
136+
}

examples/src/main/java/io/dapr/examples/conversation/DemoConversationAI.java

Lines changed: 0 additions & 49 deletions
This file was deleted.

examples/src/main/java/io/dapr/examples/conversation/README.md

Lines changed: 31 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -45,30 +45,51 @@ Run `dapr init` to initialize Dapr in Self-Hosted Mode if it's not already initi
4545
### Running the example
4646

4747
This example uses the Java SDK Dapr client in order to **Converse** with an LLM.
48-
`DemoConversationAI.java` is the example class demonstrating these features.
48+
`UserMessageDemo.java` is the example class demonstrating these features.
4949
Kindly check [DaprPreviewClient.java](https://github.com/dapr/java-sdk/blob/master/sdk/src/main/java/io/dapr/client/DaprPreviewClient.java) for a detailed description of the supported APIs.
5050

5151
```java
52-
public class DemoConversationAI {
52+
public class UserMessageDemo {
5353
/**
5454
* The main method to start the client.
5555
*
5656
* @param args Input arguments (unused).
5757
*/
5858
public static void main(String[] args) {
59-
try (DaprPreviewClient client = new DaprClientBuilder().buildPreviewClient()) {
59+
Map<Property<?>, String> overrides = Map.of(
60+
Properties.HTTP_PORT, "3500",
61+
Properties.GRPC_PORT, "50001"
62+
);
63+
64+
try (DaprPreviewClient client = new DaprClientBuilder().withPropertyOverrides(overrides).buildPreviewClient()) {
6065
System.out.println("Sending the following input to LLM: Hello How are you? This is the my number 672-123-4567");
6166

62-
ConversationInput daprConversationInput = new ConversationInput("Hello How are you? "
63-
+ "This is the my number 672-123-4567");
67+
// Create user message with content
68+
UserMessage userMessage = new UserMessage(List.of(new ConversationMessageContent("Hello How are you? "
69+
+ "This is the my number 672-123-4567")));
70+
71+
// Create conversation input with the user message
72+
ConversationInputAlpha2 daprConversationInput = new ConversationInputAlpha2(List.of(userMessage));
6473

6574
// Component name is the name provided in the metadata block of the conversation.yaml file.
66-
Mono<ConversationResponse> responseMono = client.converse(new ConversationRequest("echo",
75+
Mono<ConversationResponseAlpha2> responseMono = client.converseAlpha2(new ConversationRequestAlpha2("echo",
6776
List.of(daprConversationInput))
6877
.setContextId("contextId")
69-
.setScrubPii(true).setTemperature(1.1d));
70-
ConversationResponse response = responseMono.block();
71-
System.out.printf("Conversation output: %s", response.getConversationOutpus().get(0).getResult());
78+
.setScrubPii(true)
79+
.setTemperature(1.1d));
80+
81+
ConversationResponseAlpha2 response = responseMono.block();
82+
83+
// Extract and print the conversation result
84+
if (response != null && response.getOutputs() != null && !response.getOutputs().isEmpty()) {
85+
ConversationResultAlpha2 result = response.getOutputs().get(0);
86+
if (result.getChoices() != null && !result.getChoices().isEmpty()) {
87+
ConversationResultChoices choice = result.getChoices().get(0);
88+
if (choice.getMessage() != null && choice.getMessage().getContent() != null) {
89+
System.out.printf("Conversation output: %s", choice.getMessage().getContent());
90+
}
91+
}
92+
}
7293
} catch (Exception e) {
7394
throw new RuntimeException(e);
7495
}
@@ -88,7 +109,7 @@ sleep: 10
88109
-->
89110

90111
```bash
91-
dapr run --resources-path ./components/conversation --app-id myapp --app-port 8080 --dapr-http-port 3500 --dapr-grpc-port 51439 --log-level debug -- java -jar target/dapr-java-sdk-examples-exec.jar io.dapr.examples.conversation.DemoConversationAI
112+
dapr run --resources-path ./components/conversation --app-id myapp --app-port 8080 --dapr-http-port 3500 --dapr-grpc-port 51439 --log-level debug -- java -jar target/dapr-java-sdk-examples-exec.jar io.dapr.examples.conversation.UserMessageDemo
92113
```
93114

94115
<!-- END_STEP -->
Lines changed: 109 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,109 @@
1+
/*
2+
* Copyright 2021 The Dapr Authors
3+
* Licensed under the Apache License, Version 2.0 (the "License");
4+
* you may not use this file except in compliance with the License.
5+
* You may obtain a copy of the License at
6+
* http://www.apache.org/licenses/LICENSE-2.0
7+
* Unless required by applicable law or agreed to in writing, software
8+
* distributed under the License is distributed on an "AS IS" BASIS,
9+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
10+
* See the License for the specific language governing permissions and
11+
limitations under the License.
12+
*/
13+
14+
package io.dapr.examples.conversation;
15+
16+
import io.dapr.client.DaprClientBuilder;
17+
import io.dapr.client.DaprPreviewClient;
18+
import io.dapr.client.domain.ConversationInputAlpha2;
19+
import io.dapr.client.domain.ConversationMessageContent;
20+
import io.dapr.client.domain.ConversationRequestAlpha2;
21+
import io.dapr.client.domain.ConversationResponseAlpha2;
22+
import io.dapr.client.domain.ConversationResultAlpha2;
23+
import io.dapr.client.domain.ConversationResultChoices;
24+
import io.dapr.client.domain.ConversationTools;
25+
import io.dapr.client.domain.ConversationToolsFunction;
26+
import io.dapr.client.domain.SystemMessage;
27+
import io.dapr.client.domain.UserMessage;
28+
import reactor.core.publisher.Mono;
29+
30+
import java.util.HashMap;
31+
import java.util.List;
32+
import java.util.Map;
33+
34+
public class ToolsCallDemo {
35+
/**
36+
* The main method to demonstrate conversation AI with tools/function calling.
37+
*
38+
* @param args Input arguments (unused).
39+
*/
40+
public static void main(String[] args) {
41+
try (DaprPreviewClient client = new DaprClientBuilder().buildPreviewClient()) {
42+
System.out.println("Demonstrating Conversation AI with Tools/Function Calling");
43+
44+
// Create system message to set context
45+
SystemMessage systemMessage = new SystemMessage(List.of(
46+
new ConversationMessageContent("You are a helpful weather assistant. Use the provided tools to get weather information.")
47+
));
48+
49+
// Create user message asking for weather
50+
UserMessage userMessage = new UserMessage(List.of(
51+
new ConversationMessageContent("What's the weather like in San Francisco?")
52+
));
53+
54+
// Create conversation input with messages
55+
ConversationInputAlpha2 conversationInput = new ConversationInputAlpha2(List.of(systemMessage, userMessage));
56+
57+
// Define function parameters for the weather tool
58+
Map<String, Object> functionParams = new HashMap<>();
59+
functionParams.put("location", "string");
60+
functionParams.put("unit", "string");
61+
62+
// Create the weather function definition
63+
ConversationToolsFunction weatherFunction = new ConversationToolsFunction("get_current_weather", functionParams);
64+
weatherFunction.setDescription("Get the current weather for a specified location");
65+
66+
// Create the tool wrapper
67+
ConversationTools weatherTool = new ConversationTools(weatherFunction);
68+
69+
// Create the conversation request with tools
70+
ConversationRequestAlpha2 request = new ConversationRequestAlpha2("echo", List.of(conversationInput))
71+
.setContextId("weather-demo-context")
72+
.setTemperature(0.7d)
73+
.setTools(List.of(weatherTool));
74+
75+
// Send the request
76+
System.out.println("Sending request to AI with weather tool available...");
77+
Mono<ConversationResponseAlpha2> responseMono = client.converseAlpha2(request);
78+
ConversationResponseAlpha2 response = responseMono.block();
79+
80+
// Process and display the response
81+
if (response != null && response.getOutputs() != null && !response.getOutputs().isEmpty()) {
82+
ConversationResultAlpha2 result = response.getOutputs().get(0);
83+
if (result.getChoices() != null && !result.getChoices().isEmpty()) {
84+
ConversationResultChoices choice = result.getChoices().get(0);
85+
86+
// Check if the AI wants to call a tool
87+
if (choice.getMessage() != null && choice.getMessage().getToolCalls() != null) {
88+
System.out.println("AI requested to call tools:");
89+
choice.getMessage().getToolCalls().forEach(toolCall -> {
90+
System.out.printf("Tool: %s, Arguments: %s%n",
91+
toolCall.getFunction().getName(),
92+
toolCall.getFunction().getArguments());
93+
});
94+
}
95+
96+
// Display the message content if available
97+
if (choice.getMessage() != null && choice.getMessage().getContent() != null) {
98+
System.out.printf("AI Response: %s%n", choice.getMessage().getContent());
99+
}
100+
}
101+
}
102+
103+
System.out.println("Tools call demonstration completed.");
104+
105+
} catch (Exception e) {
106+
throw new RuntimeException(e);
107+
}
108+
}
109+
}

0 commit comments

Comments
 (0)