Skip to content

Commit

Permalink
feat: Add Webpage Browser Extension to Vertex AI Extension SDK
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 642015460
  • Loading branch information
vertex-sdk-bot authored and Copybara-Service committed Jun 10, 2024
1 parent 3ffb6cb commit c222f4b
Showing 1 changed file with 21 additions and 1 deletion.
22 changes: 21 additions & 1 deletion vertexai/extensions/_extensions.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,23 @@
},
},
},
"webpage_browser": {
"display_name": "Webpage Browser",
"description": "This extension fetches the content of a webpage",
"manifest": {
"name": "webpage_browser",
"description": "Vertex Webpage Browser Extension",
"api_spec": {
"open_api_gcs_uri": (
"gs://vertex-extension-public/webpage_browser.yaml"
),
},
"auth_config": {
"auth_type": "GOOGLE_SERVICE_ACCOUNT_AUTH",
"google_service_account_config": {},
},
},
},
}


Expand Down Expand Up @@ -243,7 +260,8 @@ def from_hub(
Args:
name (str):
Required. The name of the extension in the hub to be created.
Supported values are "code_interpreter" and "vertex_ai_search".
Supported values are "code_interpreter", "vertex_ai_search" and
"webpage_browser".
runtime_config (Union[dict[str, Any], RuntimeConfig]):
Optional. Runtime config controlling the runtime behavior of
the Extension. Defaults to None.
Expand Down Expand Up @@ -286,6 +304,8 @@ def from_hub(
"vertex_ai_search_runtime_config is required for "
"vertex_ai_search extension"
)
elif name == "webpage_browser":
pass
else:
raise ValueError(f"Unsupported 1P extension name: {name}")
extension_info = _VERTEX_EXTENSION_HUB[name]
Expand Down

0 comments on commit c222f4b

Please sign in to comment.