Skip to content

Commit d1320bc

Browse files
Annhiluccopybara-github
authored andcommitted
fix: Breaking change for Interactions to deprecate and remove fields from FileSearchResult
PiperOrigin-RevId: 882240501
1 parent 861ab18 commit d1320bc

5 files changed

Lines changed: 7 additions & 47 deletions

File tree

google/genai/_interactions/types/content_delta.py

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,6 @@
5858
"DeltaMCPServerToolResultDeltaResultItemsItem",
5959
"DeltaFileSearchCallDelta",
6060
"DeltaFileSearchResultDelta",
61-
"DeltaFileSearchResultDeltaResult",
6261
]
6362

6463

@@ -305,26 +304,13 @@ class DeltaFileSearchCallDelta(BaseModel):
305304
type: Literal["file_search_call"]
306305

307306

308-
class DeltaFileSearchResultDeltaResult(BaseModel):
309-
"""The result of the File Search."""
310-
311-
file_search_store: Optional[str] = None
312-
"""The name of the file search store."""
313-
314-
text: Optional[str] = None
315-
"""The text of the search result."""
316-
317-
title: Optional[str] = None
318-
"""The title of the search result."""
319-
320-
321307
class DeltaFileSearchResultDelta(BaseModel):
322308
call_id: str
323309
"""ID to match the ID from the function call block."""
324310

325311
type: Literal["file_search_result"]
326312

327-
result: Optional[List[DeltaFileSearchResultDeltaResult]] = None
313+
result: Optional[List[object]] = None
328314

329315
signature: Optional[str] = None
330316
"""A signature hash for backend validation."""

google/genai/_interactions/types/file_search_result_content.py

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -20,20 +20,7 @@
2020

2121
from .._models import BaseModel
2222

23-
__all__ = ["FileSearchResultContent", "Result"]
24-
25-
26-
class Result(BaseModel):
27-
"""The result of the File Search."""
28-
29-
file_search_store: Optional[str] = None
30-
"""The name of the file search store."""
31-
32-
text: Optional[str] = None
33-
"""The text of the search result."""
34-
35-
title: Optional[str] = None
36-
"""The title of the search result."""
23+
__all__ = ["FileSearchResultContent"]
3724

3825

3926
class FileSearchResultContent(BaseModel):
@@ -44,7 +31,7 @@ class FileSearchResultContent(BaseModel):
4431

4532
type: Literal["file_search_result"]
4633

47-
result: Optional[List[Result]] = None
34+
result: Optional[List[object]] = None
4835
"""The results of the File Search."""
4936

5037
signature: Optional[str] = None

google/genai/_interactions/types/file_search_result_content_param.py

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -20,20 +20,7 @@
2020
from typing import Iterable
2121
from typing_extensions import Literal, Required, TypedDict
2222

23-
__all__ = ["FileSearchResultContentParam", "Result"]
24-
25-
26-
class Result(TypedDict, total=False):
27-
"""The result of the File Search."""
28-
29-
file_search_store: str
30-
"""The name of the file search store."""
31-
32-
text: str
33-
"""The text of the search result."""
34-
35-
title: str
36-
"""The title of the search result."""
23+
__all__ = ["FileSearchResultContentParam"]
3724

3825

3926
class FileSearchResultContentParam(TypedDict, total=False):
@@ -44,7 +31,7 @@ class FileSearchResultContentParam(TypedDict, total=False):
4431

4532
type: Required[Literal["file_search_result"]]
4633

47-
result: Iterable[Result]
34+
result: Iterable[object]
4835
"""The results of the File Search."""
4936

5037
signature: str

google/genai/_interactions/types/google_search_result.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
class GoogleSearchResult(BaseModel):
2626
"""The result of the Google Search."""
2727

28-
rendered_content: Optional[str] = None
28+
search_suggestions: Optional[str] = None
2929
"""Web content snippet that can be embedded in a web page or an app webview."""
3030

3131
title: Optional[str] = None

google/genai/_interactions/types/google_search_result_param.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
class GoogleSearchResultParam(TypedDict, total=False):
2626
"""The result of the Google Search."""
2727

28-
rendered_content: str
28+
search_suggestions: str
2929
"""Web content snippet that can be embedded in a web page or an app webview."""
3030

3131
title: str

0 commit comments

Comments
 (0)