Skip to content

Commit 6a3e35c

Browse files
Annhiluccopybara-github
authored andcommitted
No public description
PiperOrigin-RevId: 754711049
1 parent 9065970 commit 6a3e35c

File tree

3 files changed

+63
-0
lines changed

3 files changed

+63
-0
lines changed

src/main/java/com/google/genai/LiveConverters.java

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,13 @@ ObjectNode partToMldev(ApiClient apiClient, JsonNode fromObject, ObjectNode pare
4444
Common.getValueByPath(fromObject, new String[] {"thought"}));
4545
}
4646

47+
if (Common.getValueByPath(fromObject, new String[] {"thoughtSignature"}) != null) {
48+
Common.setValueByPath(
49+
toObject,
50+
new String[] {"thoughtSignature"},
51+
Common.getValueByPath(fromObject, new String[] {"thoughtSignature"}));
52+
}
53+
4754
if (Common.getValueByPath(fromObject, new String[] {"codeExecutionResult"}) != null) {
4855
Common.setValueByPath(
4956
toObject,
@@ -113,6 +120,13 @@ ObjectNode partToVertex(ApiClient apiClient, JsonNode fromObject, ObjectNode par
113120
Common.getValueByPath(fromObject, new String[] {"thought"}));
114121
}
115122

123+
if (Common.getValueByPath(fromObject, new String[] {"thoughtSignature"}) != null) {
124+
Common.setValueByPath(
125+
toObject,
126+
new String[] {"thoughtSignature"},
127+
Common.getValueByPath(fromObject, new String[] {"thoughtSignature"}));
128+
}
129+
116130
if (Common.getValueByPath(fromObject, new String[] {"codeExecutionResult"}) != null) {
117131
Common.setValueByPath(
118132
toObject,
@@ -1682,6 +1696,13 @@ ObjectNode partFromMldev(ApiClient apiClient, JsonNode fromObject, ObjectNode pa
16821696
Common.getValueByPath(fromObject, new String[] {"thought"}));
16831697
}
16841698

1699+
if (Common.getValueByPath(fromObject, new String[] {"thoughtSignature"}) != null) {
1700+
Common.setValueByPath(
1701+
toObject,
1702+
new String[] {"thoughtSignature"},
1703+
Common.getValueByPath(fromObject, new String[] {"thoughtSignature"}));
1704+
}
1705+
16851706
if (Common.getValueByPath(fromObject, new String[] {"codeExecutionResult"}) != null) {
16861707
Common.setValueByPath(
16871708
toObject,
@@ -1751,6 +1772,13 @@ ObjectNode partFromVertex(ApiClient apiClient, JsonNode fromObject, ObjectNode p
17511772
Common.getValueByPath(fromObject, new String[] {"thought"}));
17521773
}
17531774

1775+
if (Common.getValueByPath(fromObject, new String[] {"thoughtSignature"}) != null) {
1776+
Common.setValueByPath(
1777+
toObject,
1778+
new String[] {"thoughtSignature"},
1779+
Common.getValueByPath(fromObject, new String[] {"thoughtSignature"}));
1780+
}
1781+
17541782
if (Common.getValueByPath(fromObject, new String[] {"codeExecutionResult"}) != null) {
17551783
Common.setValueByPath(
17561784
toObject,

src/main/java/com/google/genai/Models.java

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,13 @@ ObjectNode partToMldev(ApiClient apiClient, JsonNode fromObject, ObjectNode pare
8888
Common.getValueByPath(fromObject, new String[] {"thought"}));
8989
}
9090

91+
if (Common.getValueByPath(fromObject, new String[] {"thoughtSignature"}) != null) {
92+
Common.setValueByPath(
93+
toObject,
94+
new String[] {"thoughtSignature"},
95+
Common.getValueByPath(fromObject, new String[] {"thoughtSignature"}));
96+
}
97+
9198
if (Common.getValueByPath(fromObject, new String[] {"codeExecutionResult"}) != null) {
9299
Common.setValueByPath(
93100
toObject,
@@ -1101,6 +1108,13 @@ ObjectNode partToVertex(ApiClient apiClient, JsonNode fromObject, ObjectNode par
11011108
Common.getValueByPath(fromObject, new String[] {"thought"}));
11021109
}
11031110

1111+
if (Common.getValueByPath(fromObject, new String[] {"thoughtSignature"}) != null) {
1112+
Common.setValueByPath(
1113+
toObject,
1114+
new String[] {"thoughtSignature"},
1115+
Common.getValueByPath(fromObject, new String[] {"thoughtSignature"}));
1116+
}
1117+
11041118
if (Common.getValueByPath(fromObject, new String[] {"codeExecutionResult"}) != null) {
11051119
Common.setValueByPath(
11061120
toObject,
@@ -2631,6 +2645,13 @@ ObjectNode partFromMldev(ApiClient apiClient, JsonNode fromObject, ObjectNode pa
26312645
Common.getValueByPath(fromObject, new String[] {"thought"}));
26322646
}
26332647

2648+
if (Common.getValueByPath(fromObject, new String[] {"thoughtSignature"}) != null) {
2649+
Common.setValueByPath(
2650+
toObject,
2651+
new String[] {"thoughtSignature"},
2652+
Common.getValueByPath(fromObject, new String[] {"thoughtSignature"}));
2653+
}
2654+
26342655
if (Common.getValueByPath(fromObject, new String[] {"codeExecutionResult"}) != null) {
26352656
Common.setValueByPath(
26362657
toObject,
@@ -3192,6 +3213,13 @@ ObjectNode partFromVertex(ApiClient apiClient, JsonNode fromObject, ObjectNode p
31923213
Common.getValueByPath(fromObject, new String[] {"thought"}));
31933214
}
31943215

3216+
if (Common.getValueByPath(fromObject, new String[] {"thoughtSignature"}) != null) {
3217+
Common.setValueByPath(
3218+
toObject,
3219+
new String[] {"thoughtSignature"},
3220+
Common.getValueByPath(fromObject, new String[] {"thoughtSignature"}));
3221+
}
3222+
31953223
if (Common.getValueByPath(fromObject, new String[] {"codeExecutionResult"}) != null) {
31963224
Common.setValueByPath(
31973225
toObject,

src/main/java/com/google/genai/types/Part.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,10 @@ public abstract class Part extends JsonSerializable {
4343
@JsonProperty("thought")
4444
public abstract Optional<Boolean> thought();
4545

46+
/** An opaque signature for the thought so it can be reused in subsequent requests. */
47+
@JsonProperty("thoughtSignature")
48+
public abstract Optional<byte[]> thoughtSignature();
49+
4650
/** Optional. Result of executing the [ExecutableCode]. */
4751
@JsonProperty("codeExecutionResult")
4852
public abstract Optional<CodeExecutionResult> codeExecutionResult();
@@ -101,6 +105,9 @@ private static Builder create() {
101105
@JsonProperty("thought")
102106
public abstract Builder thought(boolean thought);
103107

108+
@JsonProperty("thoughtSignature")
109+
public abstract Builder thoughtSignature(byte[] thoughtSignature);
110+
104111
@JsonProperty("codeExecutionResult")
105112
public abstract Builder codeExecutionResult(CodeExecutionResult codeExecutionResult);
106113

0 commit comments

Comments
 (0)