Skip to content

Commit

Permalink
feat: [google-ai-generativelanguage] Adds search grounding (#13288)
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
3 people authored Nov 20, 2024
1 parent d64e75a commit 3535963
Show file tree
Hide file tree
Showing 94 changed files with 9,632 additions and 114 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
__version__ = "0.6.12" # {x-release-please-version}
__version__ = "0.0.0" # {x-release-please-version}
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,13 @@
GenerateContentRequest,
GenerateContentResponse,
GenerationConfig,
GroundingChunk,
GroundingMetadata,
GroundingSupport,
LogprobsResult,
RetrievalMetadata,
SearchEntryPoint,
Segment,
TaskType,
)
from .types.model import Model
Expand All @@ -64,14 +70,20 @@
"GenerationConfig",
"GenerativeServiceClient",
"GetModelRequest",
"GroundingChunk",
"GroundingMetadata",
"GroundingSupport",
"HarmCategory",
"ListModelsRequest",
"ListModelsResponse",
"LogprobsResult",
"Model",
"ModelServiceClient",
"Part",
"RetrievalMetadata",
"SafetyRating",
"SafetySetting",
"SearchEntryPoint",
"Segment",
"TaskType",
)
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
__version__ = "0.6.12" # {x-release-please-version}
__version__ = "0.0.0" # {x-release-please-version}
Original file line number Diff line number Diff line change
Expand Up @@ -343,6 +343,11 @@ def _get_http_options():
"uri": "/v1/{model=models/*}:streamGenerateContent",
"body": "*",
},
{
"method": "post",
"uri": "/v1/{model=tunedModels/*}:streamGenerateContent",
"body": "*",
},
]
return http_options

Expand Down Expand Up @@ -422,7 +427,11 @@ def _get_http_options():
},
{
"method": "get",
"uri": "/v1/{name=generatedFiles/*}/operations/*",
"uri": "/v1/{name=generatedFiles/*/operations/*}",
},
{
"method": "get",
"uri": "/v1/{name=models/*/operations/*}",
},
]
return http_options
Expand Down Expand Up @@ -453,6 +462,10 @@ def _get_http_options():
"method": "get",
"uri": "/v1/{name=tunedModels/*}/operations",
},
{
"method": "get",
"uri": "/v1/{name=models/*}/operations",
},
]
return http_options

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,11 @@ def _get_http_options():
},
{
"method": "get",
"uri": "/v1/{name=generatedFiles/*}/operations/*",
"uri": "/v1/{name=generatedFiles/*/operations/*}",
},
{
"method": "get",
"uri": "/v1/{name=models/*/operations/*}",
},
]
return http_options
Expand Down Expand Up @@ -242,6 +246,10 @@ def _get_http_options():
"method": "get",
"uri": "/v1/{name=tunedModels/*}/operations",
},
{
"method": "get",
"uri": "/v1/{name=models/*}/operations",
},
]
return http_options

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,13 @@
GenerateContentRequest,
GenerateContentResponse,
GenerationConfig,
GroundingChunk,
GroundingMetadata,
GroundingSupport,
LogprobsResult,
RetrievalMetadata,
SearchEntryPoint,
Segment,
TaskType,
)
from .model import Model
Expand All @@ -51,7 +57,13 @@
"GenerateContentRequest",
"GenerateContentResponse",
"GenerationConfig",
"GroundingChunk",
"GroundingMetadata",
"GroundingSupport",
"LogprobsResult",
"RetrievalMetadata",
"SearchEntryPoint",
"Segment",
"TaskType",
"Model",
"GetModelRequest",
Expand Down
Loading

0 comments on commit 3535963

Please sign in to comment.