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

Add the Content caching feature #167

Merged
merged 15 commits into from
Jun 17, 2024
Merged

Add the Content caching feature #167

merged 15 commits into from
Jun 17, 2024

Conversation

hsubox76
Copy link
Collaborator

@hsubox76 hsubox76 commented Jun 6, 2024

Feature: Content Caching

Design doc (API) (internal): https://docs.google.com/document/d/1kJTdoz-RO7mkzsjE1QDfJfD1YvSxJXuzmqTAtsS1hJ0/edit?resourcekey=0-cv2C2J8SLDn__yoetTPvBw&tab=t.0
Design doc (Python SDK) (internal): https://docs.google.com/document/d/11en7rPCuXIu-hfF71jUDWkfQctWeFEoq_5KgkinnxWg/edit?resourcekey=0-ntvB0-Y_GBQXOfkO-KDaXg&tab=t.0

APIs added

  • GoogleAICacheManager class (exported from new /server path) with create, update, get, list, delete methods.
  • GoogleGenerativeAI.getGenerativeModelFromContextCache() added

Infrastructure changed

  • /files subpath changed to /server. GoogleAIFileManager and GoogleAICacheManager will be exported from here as they are only meant to be used in a server environment.
  • All types moved to a single folder.
  • Generate common/api-review md files for easier review of API mistakes/gaps
  • Refactor makeRequest-related functions to reduce code duplication

packages/main/server/package.json Outdated Show resolved Hide resolved
packages/main/src/requests/request.ts Outdated Show resolved Hide resolved
packages/main/src/requests/request.ts Outdated Show resolved Hide resolved
packages/main/src/server/cache-manager.ts Outdated Show resolved Hide resolved
packages/main/src/server/cache-manager.ts Show resolved Hide resolved
packages/main/src/server/cache-manager.ts Show resolved Hide resolved
packages/main/src/server/request.ts Show resolved Hide resolved
packages/main/types/function-calling.ts Show resolved Hide resolved
packages/main/types/server/caching.ts Show resolved Hide resolved
packages/main/types/server/caching.ts Outdated Show resolved Hide resolved
@DellaBitta DellaBitta changed the title DO NOT MERGE: Add context caching - draft DO NOT MERGE: Add context caching Jun 13, 2024
Updates to the Content Caching feature in development.

 - adds integration tests
 - adds display name to the creation of content caching.
 - fixes the use of a context cache in the sample implementation.

Documentation PR is separate: #172
An isolated pull request with the Cached Content documentation.
@DellaBitta
Copy link
Collaborator

Fixes merged.
Documentation merged.

@hsubox76 hsubox76 marked this pull request as ready for review June 17, 2024 19:50
@hsubox76 hsubox76 changed the title DO NOT MERGE: Add context caching DO NOT MERGE: Add content caching Jun 17, 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