Skip to content

Commit 861ab18

Browse files
Annhiluccopybara-github
authored andcommitted
chore: Remove signature from tool call content/delta types and add call_id and signature to file search result types.
PiperOrigin-RevId: 882220425
1 parent 2349f42 commit 861ab18

13 files changed

Lines changed: 8 additions & 59 deletions

google/genai/_interactions/types/code_execution_call_content.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515

1616
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
1717

18-
from typing import Optional
1918
from typing_extensions import Literal
2019

2120
from .._models import BaseModel
@@ -34,6 +33,3 @@ class CodeExecutionCallContent(BaseModel):
3433
"""The arguments to pass to the code execution."""
3534

3635
type: Literal["code_execution_call"]
37-
38-
signature: Optional[str] = None
39-
"""A signature hash for backend validation."""

google/genai/_interactions/types/code_execution_call_content_param.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,3 @@ class CodeExecutionCallContentParam(TypedDict, total=False):
3434
"""The arguments to pass to the code execution."""
3535

3636
type: Required[Literal["code_execution_call"]]
37-
38-
signature: str
39-
"""A signature hash for backend validation."""

google/genai/_interactions/types/content_delta.py

Lines changed: 6 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -158,9 +158,6 @@ class DeltaFunctionCallDelta(BaseModel):
158158

159159
type: Literal["function_call"]
160160

161-
signature: Optional[str] = None
162-
"""A signature hash for backend validation."""
163-
164161

165162
DeltaFunctionResultDeltaResultItemsItem: TypeAlias = Union[TextContent, ImageContent]
166163

@@ -198,9 +195,6 @@ class DeltaCodeExecutionCallDelta(BaseModel):
198195

199196
type: Literal["code_execution_call"]
200197

201-
signature: Optional[str] = None
202-
"""A signature hash for backend validation."""
203-
204198

205199
class DeltaCodeExecutionResultDelta(BaseModel):
206200
call_id: str
@@ -225,9 +219,6 @@ class DeltaURLContextCallDelta(BaseModel):
225219

226220
type: Literal["url_context_call"]
227221

228-
signature: Optional[str] = None
229-
"""A signature hash for backend validation."""
230-
231222

232223
class DeltaURLContextResultDelta(BaseModel):
233224
call_id: str
@@ -252,9 +243,6 @@ class DeltaGoogleSearchCallDelta(BaseModel):
252243

253244
type: Literal["google_search_call"]
254245

255-
signature: Optional[str] = None
256-
"""A signature hash for backend validation."""
257-
258246

259247
class DeltaGoogleSearchResultDelta(BaseModel):
260248
call_id: str
@@ -282,9 +270,6 @@ class DeltaMCPServerToolCallDelta(BaseModel):
282270

283271
type: Literal["mcp_server_tool_call"]
284272

285-
signature: Optional[str] = None
286-
"""A signature hash for backend validation."""
287-
288273

289274
DeltaMCPServerToolResultDeltaResultItemsItem: TypeAlias = Union[TextContent, ImageContent]
290275

@@ -319,9 +304,6 @@ class DeltaFileSearchCallDelta(BaseModel):
319304

320305
type: Literal["file_search_call"]
321306

322-
signature: Optional[str] = None
323-
"""A signature hash for backend validation."""
324-
325307

326308
class DeltaFileSearchResultDeltaResult(BaseModel):
327309
"""The result of the File Search."""
@@ -337,10 +319,16 @@ class DeltaFileSearchResultDeltaResult(BaseModel):
337319

338320

339321
class DeltaFileSearchResultDelta(BaseModel):
322+
call_id: str
323+
"""ID to match the ID from the function call block."""
324+
340325
type: Literal["file_search_result"]
341326

342327
result: Optional[List[DeltaFileSearchResultDeltaResult]] = None
343328

329+
signature: Optional[str] = None
330+
"""A signature hash for backend validation."""
331+
344332

345333
Delta: TypeAlias = Annotated[
346334
Union[

google/genai/_interactions/types/file_search_call_content.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515

1616
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
1717

18-
from typing import Optional
1918
from typing_extensions import Literal
2019

2120
from .._models import BaseModel
@@ -30,6 +29,3 @@ class FileSearchCallContent(BaseModel):
3029
"""A unique ID for this specific tool call."""
3130

3231
type: Literal["file_search_call"]
33-
34-
signature: Optional[str] = None
35-
"""A signature hash for backend validation."""

google/genai/_interactions/types/file_search_call_content_param.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,3 @@ class FileSearchCallContentParam(TypedDict, total=False):
2929
"""A unique ID for this specific tool call."""
3030

3131
type: Required[Literal["file_search_call"]]
32-
33-
signature: str
34-
"""A signature hash for backend validation."""

google/genai/_interactions/types/function_call_content.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515

1616
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
1717

18-
from typing import Dict, Optional
18+
from typing import Dict
1919
from typing_extensions import Literal
2020

2121
from .._models import BaseModel
@@ -36,6 +36,3 @@ class FunctionCallContent(BaseModel):
3636
"""The name of the tool to call."""
3737

3838
type: Literal["function_call"]
39-
40-
signature: Optional[str] = None
41-
"""A signature hash for backend validation."""

google/genai/_interactions/types/function_call_content_param.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,3 @@ class FunctionCallContentParam(TypedDict, total=False):
3636
"""The name of the tool to call."""
3737

3838
type: Required[Literal["function_call"]]
39-
40-
signature: str
41-
"""A signature hash for backend validation."""

google/genai/_interactions/types/google_search_call_content.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,3 @@ class GoogleSearchCallContent(BaseModel):
3737

3838
search_type: Optional[Literal["web_search", "image_search"]] = None
3939
"""The type of search grounding enabled."""
40-
41-
signature: Optional[str] = None
42-
"""A signature hash for backend validation."""

google/genai/_interactions/types/google_search_call_content_param.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,3 @@ class GoogleSearchCallContentParam(TypedDict, total=False):
3737

3838
search_type: Literal["web_search", "image_search"]
3939
"""The type of search grounding enabled."""
40-
41-
signature: str
42-
"""A signature hash for backend validation."""

google/genai/_interactions/types/mcp_server_tool_call_content.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515

1616
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
1717

18-
from typing import Dict, Optional
18+
from typing import Dict
1919
from typing_extensions import Literal
2020

2121
from .._models import BaseModel
@@ -39,6 +39,3 @@ class MCPServerToolCallContent(BaseModel):
3939
"""The name of the used MCP server."""
4040

4141
type: Literal["mcp_server_tool_call"]
42-
43-
signature: Optional[str] = None
44-
"""A signature hash for backend validation."""

0 commit comments

Comments
 (0)