GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — feat(aiplatform): Add support for setting User agent header (#364) · googleapis/python-aiplatform@d50d26d

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • google/cloud/aiplatform
    • constants.py
    • initializer.py
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎google/cloud/aiplatform/constants.py‎

Copy file name to clipboardExpand all lines: google/cloud/aiplatform/constants.py
+3Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,3 +75,6 @@
7575
"MOBILE_JETSON_LOW_LATENCY_1",
7676
},
7777
}
78+
79+
# Used in constructing the requests user_agent header for metrics reporting.
80+
USER_AGENT_PRODUCT = "model-builder"
Collapse file

‎google/cloud/aiplatform/initializer.py‎

Copy file name to clipboardExpand all lines: google/cloud/aiplatform/initializer.py
+2-1Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,8 @@ def create_client(
259259
"google-cloud-aiplatform",
260260
).version
261261
client_info = gapic_v1.client_info.ClientInfo(
262-
gapic_version=gapic_version, user_agent=f"model-builder/{gapic_version}"
262+
gapic_version=gapic_version,
263+
user_agent=f"{constants.USER_AGENT_PRODUCT}/{gapic_version}",
263264
)
264265

265266
kwargs = {

0 commit comments

Comments
0 (0)
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.