Skip to content

Commit

Permalink
Add the Content caching feature (#167)
Browse files Browse the repository at this point in the history
## 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
  • Loading branch information
hsubox76 committed Jun 17, 2024
1 parent 03eb57b commit 5df61d1
Show file tree
Hide file tree
Showing 226 changed files with 5,357 additions and 475 deletions.
5 changes: 5 additions & 0 deletions .changeset/tough-shirts-cheat.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@google/generative-ai": minor
---

Added `GoogleAICacheManager` utility to allow caching large content to be used in inference. This class is exported from the `@google/generative-ai/server` subpath. Breaking change: The `GoogleAIFileManager` class has been moved to be exported from this subpath as well instead of the `/files` subpath.
Loading

0 comments on commit 5df61d1

Please sign in to comment.