Skip to content
Merged
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,9 @@ public static RoleEnum fromValue(@Nonnull final String value) {
@JsonProperty("tool_calls")
private List<MessageToolCall> toolCalls = new ArrayList<>();

@JsonProperty("reasoning_content")
private List<ReasoningBlock> reasoningContent = new ArrayList<>();

@JsonAnySetter @JsonAnyGetter
private final Map<String, Object> cloudSdkCustomFields = new LinkedHashMap<>();

Expand Down Expand Up @@ -243,6 +246,55 @@ public void setToolCalls(@Nullable final List<MessageToolCall> toolCalls) {
this.toolCalls = toolCalls;
}

/**
* Set the reasoningContent of this {@link AssistantChatMessage} instance and return the same
* instance.
*
* @param reasoningContent Reasoning or thinking content from the model&#39;s previous turn.
* @return The same instance of this {@link AssistantChatMessage} class
*/
@Nonnull
public AssistantChatMessage reasoningContent(
@Nullable final List<ReasoningBlock> reasoningContent) {
this.reasoningContent = reasoningContent;
return this;
}

/**
* Add one reasoningContent instance to this {@link AssistantChatMessage}.
*
* @param reasoningContentItem The reasoningContent that should be added
* @return The same instance of type {@link AssistantChatMessage}
*/
@Nonnull
public AssistantChatMessage addReasoningContentItem(
@Nonnull final ReasoningBlock reasoningContentItem) {
if (this.reasoningContent == null) {
this.reasoningContent = new ArrayList<>();
}
this.reasoningContent.add(reasoningContentItem);
return this;
}

/**
* Reasoning or thinking content from the model&#39;s previous turn.
*
* @return reasoningContent The reasoningContent of this {@link AssistantChatMessage} instance.
*/
@Nonnull
public List<ReasoningBlock> getReasoningContent() {
return reasoningContent;
}

/**
* Set the reasoningContent of this {@link AssistantChatMessage} instance.
*
* @param reasoningContent Reasoning or thinking content from the model&#39;s previous turn.
*/
public void setReasoningContent(@Nullable final List<ReasoningBlock> reasoningContent) {
this.reasoningContent = reasoningContent;
}

/**
* Get the names of the unrecognizable properties of the {@link AssistantChatMessage}.
*
Expand Down Expand Up @@ -286,6 +338,7 @@ public Map<String, Object> toMap() {
if (content != null) declaredFields.put("content", content);
if (refusal != null) declaredFields.put("refusal", refusal);
if (toolCalls != null) declaredFields.put("toolCalls", toolCalls);
if (reasoningContent != null) declaredFields.put("reasoningContent", reasoningContent);
return declaredFields;
}

Expand Down Expand Up @@ -314,12 +367,13 @@ public boolean equals(@Nullable final java.lang.Object o) {
&& Objects.equals(this.role, assistantChatMessage.role)
&& Objects.equals(this.content, assistantChatMessage.content)
&& Objects.equals(this.refusal, assistantChatMessage.refusal)
&& Objects.equals(this.toolCalls, assistantChatMessage.toolCalls);
&& Objects.equals(this.toolCalls, assistantChatMessage.toolCalls)
&& Objects.equals(this.reasoningContent, assistantChatMessage.reasoningContent);
}

@Override
public int hashCode() {
return Objects.hash(role, content, refusal, toolCalls, cloudSdkCustomFields);
return Objects.hash(role, content, refusal, toolCalls, reasoningContent, cloudSdkCustomFields);
}

@Override
Expand All @@ -331,6 +385,7 @@ public String toString() {
sb.append(" content: ").append(toIndentedString(content)).append("\n");
sb.append(" refusal: ").append(toIndentedString(refusal)).append("\n");
sb.append(" toolCalls: ").append(toIndentedString(toolCalls)).append("\n");
sb.append(" reasoningContent: ").append(toIndentedString(reasoningContent)).append("\n");
cloudSdkCustomFields.forEach(
(k, v) ->
sb.append(" ").append(k).append(": ").append(toIndentedString(v)).append("\n"));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public class OrchestrationConfigGetResponse
private String resourceGroupId;

@JsonProperty("spec")
private OrchestrationConfig spec;
private PromptRegistryOrchestrationConfig spec;

@JsonAnySetter @JsonAnyGetter
private final Map<String, Object> cloudSdkCustomFields = new LinkedHashMap<>();
Expand Down Expand Up @@ -330,7 +330,8 @@ public void setResourceGroupId(@Nullable final String resourceGroupId) {
* @return The same instance of this {@link OrchestrationConfigGetResponse} class
*/
@Nonnull
public OrchestrationConfigGetResponse spec(@Nullable final OrchestrationConfig spec) {
public OrchestrationConfigGetResponse spec(
@Nullable final PromptRegistryOrchestrationConfig spec) {
this.spec = spec;
return this;
}
Expand All @@ -341,7 +342,7 @@ public OrchestrationConfigGetResponse spec(@Nullable final OrchestrationConfig s
* @return spec The spec of this {@link OrchestrationConfigGetResponse} instance.
*/
@Nonnull
public OrchestrationConfig getSpec() {
public PromptRegistryOrchestrationConfig getSpec() {
return spec;
}

Expand All @@ -350,7 +351,7 @@ public OrchestrationConfig getSpec() {
*
* @param spec The spec of this {@link OrchestrationConfigGetResponse}
*/
public void setSpec(@Nullable final OrchestrationConfig spec) {
public void setSpec(@Nullable final PromptRegistryOrchestrationConfig spec) {
this.spec = spec;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public class OrchestrationConfigPostRequest
private String scenario;

@JsonProperty("spec")
private OrchestrationConfig spec;
private PromptRegistryOrchestrationConfig spec;

@JsonAnySetter @JsonAnyGetter
private final Map<String, Object> cloudSdkCustomFields = new LinkedHashMap<>();
Expand Down Expand Up @@ -150,7 +150,8 @@ public void setScenario(@Nonnull final String scenario) {
* @return The same instance of this {@link OrchestrationConfigPostRequest} class
*/
@Nonnull
public OrchestrationConfigPostRequest spec(@Nonnull final OrchestrationConfig spec) {
public OrchestrationConfigPostRequest spec(
@Nonnull final PromptRegistryOrchestrationConfig spec) {
this.spec = spec;
return this;
}
Expand All @@ -161,7 +162,7 @@ public OrchestrationConfigPostRequest spec(@Nonnull final OrchestrationConfig sp
* @return spec The spec of this {@link OrchestrationConfigPostRequest} instance.
*/
@Nonnull
public OrchestrationConfig getSpec() {
public PromptRegistryOrchestrationConfig getSpec() {
return spec;
}

Expand All @@ -170,7 +171,7 @@ public OrchestrationConfig getSpec() {
*
* @param spec The spec of this {@link OrchestrationConfigPostRequest}
*/
public void setSpec(@Nonnull final OrchestrationConfig spec) {
public void setSpec(@Nonnull final PromptRegistryOrchestrationConfig spec) {
this.spec = spec;
}

Expand Down Expand Up @@ -340,6 +341,6 @@ public interface Builder3 {
* @param spec The spec of this {@link OrchestrationConfigPostRequest}
* @return The OrchestrationConfigPostRequest instance.
*/
OrchestrationConfigPostRequest spec(@Nonnull final OrchestrationConfig spec);
OrchestrationConfigPostRequest spec(@Nonnull final PromptRegistryOrchestrationConfig spec);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public class OrchestrationConfigResource
private String resourceGroupId;

@JsonProperty("spec")
private OrchestrationConfig spec;
private PromptRegistryOrchestrationConfig spec;

@JsonAnySetter @JsonAnyGetter
private final Map<String, Object> cloudSdkCustomFields = new LinkedHashMap<>();
Expand Down Expand Up @@ -325,7 +325,7 @@ public void setResourceGroupId(@Nullable final String resourceGroupId) {
* @return The same instance of this {@link OrchestrationConfigResource} class
*/
@Nonnull
public OrchestrationConfigResource spec(@Nullable final OrchestrationConfig spec) {
public OrchestrationConfigResource spec(@Nullable final PromptRegistryOrchestrationConfig spec) {
this.spec = spec;
return this;
}
Expand All @@ -336,7 +336,7 @@ public OrchestrationConfigResource spec(@Nullable final OrchestrationConfig spec
* @return spec The spec of this {@link OrchestrationConfigResource} instance.
*/
@Nonnull
public OrchestrationConfig getSpec() {
public PromptRegistryOrchestrationConfig getSpec() {
return spec;
}

Expand All @@ -345,7 +345,7 @@ public OrchestrationConfig getSpec() {
*
* @param spec The spec of this {@link OrchestrationConfigResource}
*/
public void setSpec(@Nullable final OrchestrationConfig spec) {
public void setSpec(@Nullable final PromptRegistryOrchestrationConfig spec) {
this.spec = spec;
}

Expand Down
Loading