Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
74 changes: 73 additions & 1 deletion gemini_docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ The Gen AI Modules in the Vertex SDK help developers use Google's generative AI
[Gemini models](http://cloud.google.com/vertex-ai/docs/generative-ai/multimodal/overview)
to build AI-powered features and applications in Vertex.

The modules currently available are: Evaluation, Agent Engines, Prompt Management, and Prompt Optimization. See below for instructions on getting started with each module. For other Gemini features on Vertex, use the [Gen AI SDK](https://github.com/googleapis/python-genai).
The modules currently available are: Evaluation, Agent Engines, Prompt Management, Prompt Optimization, and Skill Registry. See below for instructions on getting started with each module. For other Gemini features on Vertex, use the [Gen AI SDK](https://github.com/googleapis/python-genai).

## Installation

Expand Down Expand Up @@ -258,6 +258,78 @@ response = genai_client.models.generate_content(
)
```

#### Skill Registry

Create and manage skills in Skill Registry. You can optionally specify a custom string identifier using the `skill_id` configuration parameter.

```python
# Create a skill
skill = client.skills.create(
display_name="weather_skill",
description="Retrieves the weather for a given location",
config={
"local_path": "./weather_skill_dir",
"skill_id": "my-custom-weather-skill",
},
)
```

Get an existing skill by its resource name.

```python
fetched_skill = client.skills.get(name=skill.name)
```

Update an existing skill's metadata or underlying implementation.

```python
# Update skill metadata
updated_skill = client.skills.update(
name=skill.name,
config={
"display_name": "Updated Weather Skill",
"description": "Provides localized current weather conditions and multi-day forecasts.",
},
)
```

List all registered skills.

```python
# List skills with custom page size
pager = client.skills.list(config={"page_size": 10})
for item in pager:
print(item.name, item.display_name)
```

Search for skills semantically matched to a query.

```python
# Retrieve skills matched to a semantic query
matched_skills = client.skills.retrieve(query="weather forecast")
```

List and view revisions for a skill using the `ListSkillRevisions` and `GetSkillRevision` API methods.

```python
# List skill revisions
revisions_response = client.skills.revisions.list(name=skill.name)
for rev in revisions_response.skill_revisions:
print(rev.name, rev.create_time)

# Get a specific skill revision by its resource name
if revisions_response.skill_revisions:
target_revision_name = revisions_response.skill_revisions[0].name
revision = client.skills.revisions.get(name=target_revision_name)
```

Delete a skill when it is no longer required.

```python
# Delete a skill
client.skills.delete(name=skill.name)
```

## Warning

The following Generative AI modules in the Vertex AI SDK are deprecated as of
Expand Down
Loading