Skip to content

Commit 3535963

Browse files
feat: [google-ai-generativelanguage] Adds search grounding (#13288)
BEGIN_COMMIT_OVERRIDE feat: Adds search grounding feat: Adds `GenerateContentResponse.model_version` output docs: Some small updates. feat: Add GroundingMetadata.web_search_queries END_COMMIT_OVERRIDE - [ ] Regenerate this pull request now. feat: Adds `GenerateContentResponse.model_version` output docs: Some small updates. PiperOrigin-RevId: 698047851 Source-Link: googleapis/googleapis@7466a5b Source-Link: googleapis/googleapis-gen@edb373c Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWFpLWdlbmVyYXRpdmVsYW5ndWFnZS8uT3dsQm90LnlhbWwiLCJoIjoiZWRiMzczYzQ2ZTc4NTQ4ZDNjMzJjNWE3YjU5NDlkZDhiNzI3ZmVlOCJ9 BEGIN_NESTED_COMMIT feat: [google-ai-generativelanguage] Add GenerateContentRespoinse.model_version feat: Add GroundingMetadata.web_search_queries docs: Small updates PiperOrigin-RevId: 698047489 Source-Link: googleapis/googleapis@c70bd1e Source-Link: googleapis/googleapis-gen@a7fd007 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWFpLWdlbmVyYXRpdmVsYW5ndWFnZS8uT3dsQm90LnlhbWwiLCJoIjoiYTdmZDAwN2M1NDdmYTA3N2M5Nzg0NmU2MDg3YjdiNTdkM2EzN2YzZiJ9 END_NESTED_COMMIT --------- Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com> Co-authored-by: ohmayr <omairnaveed@ymail.com>
1 parent d64e75a commit 3535963

94 files changed

Lines changed: 9632 additions & 114 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

packages/google-ai-generativelanguage/google/ai/generativelanguage/gapic_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@
1313
# See the License for the specific language governing permissions and
1414
# limitations under the License.
1515
#
16-
__version__ = "0.6.12" # {x-release-please-version}
16+
__version__ = "0.0.0" # {x-release-please-version}

packages/google-ai-generativelanguage/google/ai/generativelanguage_v1/__init__.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,13 @@
3737
GenerateContentRequest,
3838
GenerateContentResponse,
3939
GenerationConfig,
40+
GroundingChunk,
41+
GroundingMetadata,
42+
GroundingSupport,
4043
LogprobsResult,
44+
RetrievalMetadata,
45+
SearchEntryPoint,
46+
Segment,
4147
TaskType,
4248
)
4349
from .types.model import Model
@@ -64,14 +70,20 @@
6470
"GenerationConfig",
6571
"GenerativeServiceClient",
6672
"GetModelRequest",
73+
"GroundingChunk",
74+
"GroundingMetadata",
75+
"GroundingSupport",
6776
"HarmCategory",
6877
"ListModelsRequest",
6978
"ListModelsResponse",
7079
"LogprobsResult",
7180
"Model",
7281
"ModelServiceClient",
7382
"Part",
83+
"RetrievalMetadata",
7484
"SafetyRating",
7585
"SafetySetting",
86+
"SearchEntryPoint",
87+
"Segment",
7688
"TaskType",
7789
)

packages/google-ai-generativelanguage/google/ai/generativelanguage_v1/gapic_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@
1313
# See the License for the specific language governing permissions and
1414
# limitations under the License.
1515
#
16-
__version__ = "0.6.12" # {x-release-please-version}
16+
__version__ = "0.0.0" # {x-release-please-version}

packages/google-ai-generativelanguage/google/ai/generativelanguage_v1/services/generative_service/transports/rest_base.py

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -343,6 +343,11 @@ def _get_http_options():
343343
"uri": "/v1/{model=models/*}:streamGenerateContent",
344344
"body": "*",
345345
},
346+
{
347+
"method": "post",
348+
"uri": "/v1/{model=tunedModels/*}:streamGenerateContent",
349+
"body": "*",
350+
},
346351
]
347352
return http_options
348353

@@ -422,7 +427,11 @@ def _get_http_options():
422427
},
423428
{
424429
"method": "get",
425-
"uri": "/v1/{name=generatedFiles/*}/operations/*",
430+
"uri": "/v1/{name=generatedFiles/*/operations/*}",
431+
},
432+
{
433+
"method": "get",
434+
"uri": "/v1/{name=models/*/operations/*}",
426435
},
427436
]
428437
return http_options
@@ -453,6 +462,10 @@ def _get_http_options():
453462
"method": "get",
454463
"uri": "/v1/{name=tunedModels/*}/operations",
455464
},
465+
{
466+
"method": "get",
467+
"uri": "/v1/{name=models/*}/operations",
468+
},
456469
]
457470
return http_options
458471

packages/google-ai-generativelanguage/google/ai/generativelanguage_v1/services/model_service/transports/rest_base.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,11 @@ def _get_http_options():
211211
},
212212
{
213213
"method": "get",
214-
"uri": "/v1/{name=generatedFiles/*}/operations/*",
214+
"uri": "/v1/{name=generatedFiles/*/operations/*}",
215+
},
216+
{
217+
"method": "get",
218+
"uri": "/v1/{name=models/*/operations/*}",
215219
},
216220
]
217221
return http_options
@@ -242,6 +246,10 @@ def _get_http_options():
242246
"method": "get",
243247
"uri": "/v1/{name=tunedModels/*}/operations",
244248
},
249+
{
250+
"method": "get",
251+
"uri": "/v1/{name=models/*}/operations",
252+
},
245253
]
246254
return http_options
247255

packages/google-ai-generativelanguage/google/ai/generativelanguage_v1/types/__init__.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,13 @@
2727
GenerateContentRequest,
2828
GenerateContentResponse,
2929
GenerationConfig,
30+
GroundingChunk,
31+
GroundingMetadata,
32+
GroundingSupport,
3033
LogprobsResult,
34+
RetrievalMetadata,
35+
SearchEntryPoint,
36+
Segment,
3137
TaskType,
3238
)
3339
from .model import Model
@@ -51,7 +57,13 @@
5157
"GenerateContentRequest",
5258
"GenerateContentResponse",
5359
"GenerationConfig",
60+
"GroundingChunk",
61+
"GroundingMetadata",
62+
"GroundingSupport",
5463
"LogprobsResult",
64+
"RetrievalMetadata",
65+
"SearchEntryPoint",
66+
"Segment",
5567
"TaskType",
5668
"Model",
5769
"GetModelRequest",

0 commit comments

Comments
 (0)