@@ -68,15 +68,15 @@ The samples below show how a published SDK artifact is used: |
68 | 68 |
|
69 | 69 | Gradle: |
70 | 70 | ```groovy |
71 | | -implementation 'com.glean.api-client:glean-api-client:0.17.15' |
| 71 | +implementation 'com.glean.api-client:glean-api-client:0.17.16' |
72 | 72 | ``` |
73 | 73 |
|
74 | 74 | Maven: |
75 | 75 | ```xml |
76 | 76 | <dependency> |
77 | 77 | <groupId>com.glean.api-client</groupId> |
78 | 78 | <artifactId>glean-api-client</artifactId> |
79 | | - <version>0.17.15</version> |
| 79 | + <version>0.17.16</version> |
80 | 80 | </dependency> |
81 | 81 | ``` |
82 | 82 |
|
@@ -374,6 +374,9 @@ For more information on obtaining the appropriate token type, please contact you |
374 | 374 | * [get](docs/sdks/agents/README.md#get) - Get agent |
375 | 375 | * [getSchemas](docs/sdks/agents/README.md#getschemas) - Get agent schemas |
376 | 376 | * [createRun](docs/sdks/agents/README.md#createrun) - Create agent run |
| 377 | +* [getRun](docs/sdks/agents/README.md#getrun) - Get agent run |
| 378 | +* [cancelRun](docs/sdks/agents/README.md#cancelrun) - Cancel an agent run |
| 379 | +* [respondToRun](docs/sdks/agents/README.md#respondtorun) - Respond to agent run approvals |
377 | 380 |
|
378 | 381 | ### [Chat](docs/sdks/chat/README.md) |
379 | 382 |
|
@@ -658,11 +661,13 @@ underlying connection. |
658 | 661 | package hello.world; |
659 | 662 |
|
660 | 663 | import com.glean.api_client.glean_api_client.Glean; |
661 | | -import com.glean.api_client.glean_api_client.models.components.PlatformChatStreamEventServerSentEvent; |
| 664 | +import com.glean.api_client.glean_api_client.models.components.*; |
662 | 665 | import com.glean.api_client.glean_api_client.models.errors.PlatformProblemDetailException; |
663 | 666 | import com.glean.api_client.glean_api_client.models.operations.*; |
664 | 667 | import com.glean.api_client.glean_api_client.utils.EventStream; |
665 | 668 | import java.lang.Exception; |
| 669 | +import java.util.List; |
| 670 | +import java.util.Map; |
666 | 671 | import java.util.stream.Stream; |
667 | 672 |
|
668 | 673 | public class Application { |
@@ -674,7 +679,23 @@ public class Application { |
674 | 679 | .build(); |
675 | 680 |
|
676 | 681 | PlatformChatCreateStreamRequest req = PlatformChatCreateStreamRequest.builder() |
677 | | - .input(PlatformChatCreateStreamInput.of("What is our parental leave policy?")) |
| 682 | + .input(PlatformChatCreateStreamInput.of("Summarize our parental leave policy as JSON.")) |
| 683 | + .text(PlatformChatCreateStreamText.builder() |
| 684 | + .format(PlatformChatCreateStreamFormat.of(PlatformChatJsonSchemaFormat.builder() |
| 685 | + .type(PlatformChatJsonSchemaFormatType.JSON_SCHEMA) |
| 686 | + .name("policy_summary") |
| 687 | + .schema(Map.ofEntries( |
| 688 | + Map.entry("type", "object"), |
| 689 | + Map.entry("properties", Map.ofEntries( |
| 690 | + Map.entry("eligible_employees", Map.ofEntries( |
| 691 | + Map.entry("type", "string"))), |
| 692 | + Map.entry("duration_weeks", Map.ofEntries( |
| 693 | + Map.entry("type", "integer"))))), |
| 694 | + Map.entry("required", List.of( |
| 695 | + "eligible_employees", |
| 696 | + "duration_weeks")))) |
| 697 | + .build())) |
| 698 | + .build()) |
678 | 699 | .build(); |
679 | 700 |
|
680 | 701 | PlatformChatCreateStreamResponse res = sdk.chat().createStream() |
@@ -703,11 +724,12 @@ package hello.world; |
703 | 724 |
|
704 | 725 | import com.glean.api_client.glean_api_client.AsyncGlean; |
705 | 726 | import com.glean.api_client.glean_api_client.Glean; |
706 | | -import com.glean.api_client.glean_api_client.models.components.PlatformChatStreamEventServerSentEvent; |
707 | | -import com.glean.api_client.glean_api_client.models.operations.PlatformChatCreateStreamInput; |
708 | | -import com.glean.api_client.glean_api_client.models.operations.PlatformChatCreateStreamRequest; |
| 727 | +import com.glean.api_client.glean_api_client.models.components.*; |
| 728 | +import com.glean.api_client.glean_api_client.models.operations.*; |
709 | 729 | import com.glean.api_client.glean_api_client.models.operations.async.PlatformChatCreateStreamResponse; |
710 | 730 | import com.glean.api_client.glean_api_client.utils.reactive.EventStream; |
| 731 | +import java.util.List; |
| 732 | +import java.util.Map; |
711 | 733 | import reactor.core.publisher.Flux; |
712 | 734 |
|
713 | 735 | public class Application { |
@@ -720,7 +742,23 @@ public class Application { |
720 | 742 | .async(); |
721 | 743 |
|
722 | 744 | PlatformChatCreateStreamRequest req = PlatformChatCreateStreamRequest.builder() |
723 | | - .input(PlatformChatCreateStreamInput.of("What is our parental leave policy?")) |
| 745 | + .input(PlatformChatCreateStreamInput.of("Summarize our parental leave policy as JSON.")) |
| 746 | + .text(PlatformChatCreateStreamText.builder() |
| 747 | + .format(PlatformChatCreateStreamFormat.of(PlatformChatJsonSchemaFormat.builder() |
| 748 | + .type(PlatformChatJsonSchemaFormatType.JSON_SCHEMA) |
| 749 | + .name("policy_summary") |
| 750 | + .schema(Map.ofEntries( |
| 751 | + Map.entry("type", "object"), |
| 752 | + Map.entry("properties", Map.ofEntries( |
| 753 | + Map.entry("eligible_employees", Map.ofEntries( |
| 754 | + Map.entry("type", "string"))), |
| 755 | + Map.entry("duration_weeks", Map.ofEntries( |
| 756 | + Map.entry("type", "integer"))))), |
| 757 | + Map.entry("required", List.of( |
| 758 | + "eligible_employees", |
| 759 | + "duration_weeks")))) |
| 760 | + .build())) |
| 761 | + .build()) |
724 | 762 | .build(); |
725 | 763 |
|
726 | 764 | EventStream<PlatformChatCreateStreamResponse, PlatformChatStreamEventServerSentEvent> res = sdk.chat().createStream() |
@@ -847,14 +885,14 @@ public class Application { |
847 | 885 | many more subclasses in the JDK platform). |
848 | 886 |
|
849 | 887 | **Inherit from [`GleanError`](./src/main/java/models/errors/GleanError.java)**: |
850 | | -* [`com.glean.api_client.glean_api_client.models.errors.PlatformProblemDetailException`](./src/main/java/models/errors/com.glean.api_client.glean_api_client.models.errors.PlatformProblemDetailException.java): Error response following RFC 9457, extended with `code` and `documentation_url` for machine-readable classification and self-service remediation. Applicable to 32 of 167 methods.* |
851 | | -* [`com.glean.api_client.glean_api_client.models.errors.ErrorResponse`](./src/main/java/models/errors/com.glean.api_client.glean_api_client.models.errors.ErrorResponse.java): Error response returned for failed requests. Applicable to 10 of 167 methods.* |
852 | | -* [`com.glean.api_client.glean_api_client.models.errors.ErrorInfoResponse`](./src/main/java/models/errors/com.glean.api_client.glean_api_client.models.errors.ErrorInfoResponse.java): Error response for custom metadata operations. Applicable to 6 of 167 methods.* |
853 | | -* [`com.glean.api_client.glean_api_client.models.errors.CollectionError`](./src/main/java/models/errors/com.glean.api_client.glean_api_client.models.errors.CollectionError.java): Semantic error. Status code `422`. Applicable to 3 of 167 methods.* |
854 | | -* [`com.glean.api_client.glean_api_client.models.errors.GleanDataError`](./src/main/java/models/errors/com.glean.api_client.glean_api_client.models.errors.GleanDataError.java): Forbidden. Applicable to 2 of 167 methods.* |
855 | | -* [`com.glean.api_client.glean_api_client.models.errors.UnauthorizedAgentToolsError`](./src/main/java/models/errors/com.glean.api_client.glean_api_client.models.errors.UnauthorizedAgentToolsError.java): Returned when the agent has tools the caller must authorize before the run can start. Each entry in `authenticationSuggestions` names one such tool; POST its `serverId` to `/tool-servers/{serverId}/auth` with `returnUrl` in the request body to obtain an `authorizationUrl` to redirect the end user to, then retry the run once OAuth completes. Status code `422`. Applicable to 2 of 167 methods.* |
856 | | -* [`com.glean.api_client.glean_api_client.models.errors.AccessRequestPermissionDeniedResponseException`](./src/main/java/models/errors/com.glean.api_client.glean_api_client.models.errors.AccessRequestPermissionDeniedResponseException.java): Forbidden. Status code `403`. Applicable to 1 of 167 methods.* |
857 | | -* [`com.glean.api_client.glean_api_client.models.errors.PlatformUnauthorizedAgentToolsProblemException`](./src/main/java/models/errors/com.glean.api_client.glean_api_client.models.errors.PlatformUnauthorizedAgentToolsProblemException.java): Problem detail extended with `authentication_suggestions` naming each tool the caller must authorize. Status code `422`. Applicable to 1 of 167 methods.* |
| 888 | +* [`com.glean.api_client.glean_api_client.models.errors.PlatformProblemDetailException`](./src/main/java/models/errors/com.glean.api_client.glean_api_client.models.errors.PlatformProblemDetailException.java): Error response following RFC 9457, extended with `code` and `documentation_url` for machine-readable classification and self-service remediation. Applicable to 35 of 170 methods.* |
| 889 | +* [`com.glean.api_client.glean_api_client.models.errors.ErrorResponse`](./src/main/java/models/errors/com.glean.api_client.glean_api_client.models.errors.ErrorResponse.java): Error response returned for failed requests. Applicable to 10 of 170 methods.* |
| 890 | +* [`com.glean.api_client.glean_api_client.models.errors.ErrorInfoResponse`](./src/main/java/models/errors/com.glean.api_client.glean_api_client.models.errors.ErrorInfoResponse.java): Error response for custom metadata operations. Applicable to 6 of 170 methods.* |
| 891 | +* [`com.glean.api_client.glean_api_client.models.errors.CollectionError`](./src/main/java/models/errors/com.glean.api_client.glean_api_client.models.errors.CollectionError.java): Semantic error. Status code `422`. Applicable to 3 of 170 methods.* |
| 892 | +* [`com.glean.api_client.glean_api_client.models.errors.GleanDataError`](./src/main/java/models/errors/com.glean.api_client.glean_api_client.models.errors.GleanDataError.java): Forbidden. Applicable to 2 of 170 methods.* |
| 893 | +* [`com.glean.api_client.glean_api_client.models.errors.UnauthorizedAgentToolsError`](./src/main/java/models/errors/com.glean.api_client.glean_api_client.models.errors.UnauthorizedAgentToolsError.java): Returned when the agent has tools the caller must authorize before the run can start. Each entry in `authenticationSuggestions` names one such tool; POST its `serverId` to `/tool-servers/{serverId}/auth` with `returnUrl` in the request body to obtain an `authorizationUrl` to redirect the end user to, then retry the run once OAuth completes. Status code `422`. Applicable to 2 of 170 methods.* |
| 894 | +* [`com.glean.api_client.glean_api_client.models.errors.AccessRequestPermissionDeniedResponseException`](./src/main/java/models/errors/com.glean.api_client.glean_api_client.models.errors.AccessRequestPermissionDeniedResponseException.java): Forbidden. Status code `403`. Applicable to 1 of 170 methods.* |
| 895 | +* [`com.glean.api_client.glean_api_client.models.errors.PlatformUnauthorizedAgentToolsProblemException`](./src/main/java/models/errors/com.glean.api_client.glean_api_client.models.errors.PlatformUnauthorizedAgentToolsProblemException.java): Problem detail extended with `authentication_suggestions` naming each tool the caller must authorize. Status code `422`. Applicable to 1 of 170 methods.* |
858 | 896 |
|
859 | 897 |
|
860 | 898 | </details> |
|