Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(vertexai): explicit caching #10363

Merged
merged 12 commits into from
Jun 11, 2024

Conversation

eliben
Copy link
Contributor

@eliben eliben commented Jun 11, 2024

This PR takes over from #10310 and adds the dependency bump for cloud.google.com/go/aiplatform v1.68.0 following the landing of #9772

jba and others added 11 commits June 11, 2024 08:25
Implement explicit caching.

- The CachedContent type.

- Client methods to create, update, list and delete CachedContents.
  The update method follows the same pattern in some other cloud clients,
  where a separate type carries the fields to be updated.

- Two ways to set the CachedContent in a model:
  1. The GenerativeModel.CachedContentName field, which corresponds
     to the actual proto.
  2. The GenerativeModelFromCachedContent method, which requires
     a properly initialized CachedContent but guarantees that
     the model names of the CachedContent and GenerativeModel are
     the same.
@eliben eliben requested review from a team as code owners June 11, 2024 15:30
@eliben eliben added the automerge Merge the pull request once unit tests and other checks pass. label Jun 11, 2024
Copy link
Contributor

@jba jba left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved, assuming it's a copy.
Let me know of any code changes.

@eliben
Copy link
Contributor Author

eliben commented Jun 11, 2024

Approved, assuming it's a copy. Let me know of any code changes.

It's a copy, see https://github.com/googleapis/google-cloud-go/pull/10363/commits
all your commits + one mine which bumps aiplatform in go.mod

@gcf-merge-on-green gcf-merge-on-green bot merged commit d9754c7 into googleapis:main Jun 11, 2024
10 checks passed
@gcf-merge-on-green gcf-merge-on-green bot removed the automerge Merge the pull request once unit tests and other checks pass. label Jun 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants