-
Notifications
You must be signed in to change notification settings - Fork 938
feat(vertexai): Migrate to AI
and add GoogleAI support
#8931
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
Merged
Changes from 1 commit
Commits
Show all changes
27 commits
Select commit
Hold shift + click to select a range
c3ec037
feat(vertexai): Migrate to `GenAI` and add GoogleAI support
dlarocque 4e831d1
Convert `GenAI` to new Firebase AI naming
dlarocque 5a78b76
Convert backend types to classes
dlarocque 02600d0
Cleanup
dlarocque ff62500
Move GoogleAI types to single file
dlarocque 48fc75c
Format
dlarocque cee1fae
Encode/decode instance identifiers directly to/from backends
dlarocque 475c81a
Update changeset
dlarocque 730f460
Cleanup
dlarocque 0e94110
fix(vertexai): pass `GenerativeModel`'s `BaseParams` to `ChatSession`
dlarocque 15d9699
Fix generative model tests to use fakeAI
dlarocque 6a1e02d
Add `packages/firebase/ai` directory for legacy resolvers
dlarocque dbdb762
Cleanup docs
dlarocque 41b0385
[vertexai] Use json of unary-success-citations (#8981)
rlazo 1d3b922
Use default location if location is empty string
dlarocque ee3e2a1
Merge branch 'main' into dl/genai
dlarocque 44870ba
Merge branch 'dl/genai' of https://github.com/firebase/firebase-js-sd…
dlarocque 4b6ab32
Replace 'vertexAI' error prefix with 'AI'
dlarocque 1a41a92
Use Gemini Developer API and Gemini API in Vertex AI naming in docs
dlarocque cc1726d
update changeset
dlarocque 6d8b119
Merge branch 'main' into dl/genai
dlarocque a516771
Update to Vertex AI Gemini API
dlarocque ea28656
Revert eslint change to fix firestore docs????
dlarocque c9f7113
Merge branch 'main' into dl/genai
dlarocque 9529e08
docs fixes
dlarocque c4878c1
update toc
dlarocque 07f68ad
docs review fixes
dlarocque File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- | ||
'firebase': minor | ||
'@firebase/vertexai': minor | ||
--- | ||
|
||
Add support for the Google AI API, enabling usage in a free tier, and migrate from `VertexAI` naming to `GenAI`. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
Project: /docs/reference/js/_project.yaml | ||
Book: /docs/reference/_book.yaml | ||
page_type: reference | ||
|
||
{% comment %} | ||
DO NOT EDIT THIS FILE! | ||
This is generated by the JS SDK team, and any local changes will be | ||
overwritten. Changes should be made in the source code at | ||
https://github.com/firebase/firebase-js-sdk | ||
{% endcomment %} | ||
|
||
# GenAI interface | ||
An instance of the Firebase GenAI SDK. | ||
|
||
Do not create this instance directly. Instead, use [getGenAI()](./vertexai.md#getgenai_65c48ee)<!-- -->. | ||
|
||
<b>Signature:</b> | ||
|
||
```typescript | ||
export interface GenAI | ||
``` | ||
|
||
## Properties | ||
|
||
| Property | Type | Description | | ||
| --- | --- | --- | | ||
| [app](./vertexai.genai.md#genaiapp) | [FirebaseApp](./app.firebaseapp.md#firebaseapp_interface) | The [FirebaseApp](./app.firebaseapp.md#firebaseapp_interface) this [GenAI](./vertexai.genai.md#genai_interface) instance is associated with. | | ||
| [backend](./vertexai.genai.md#genaibackend) | [Backend](./vertexai.md#backend) | A [Backend](./vertexai.md#backend) instance that specifies the backend configuration. | | ||
| [location](./vertexai.genai.md#genailocation) | string | The location configured for this GenAI service instance, relevant for Vertex AI backends. | | ||
|
||
## GenAI.app | ||
|
||
The [FirebaseApp](./app.firebaseapp.md#firebaseapp_interface) this [GenAI](./vertexai.genai.md#genai_interface) instance is associated with. | ||
|
||
<b>Signature:</b> | ||
|
||
```typescript | ||
app: FirebaseApp; | ||
``` | ||
|
||
## GenAI.backend | ||
|
||
A [Backend](./vertexai.md#backend) instance that specifies the backend configuration. | ||
|
||
<b>Signature:</b> | ||
|
||
```typescript | ||
backend: Backend; | ||
``` | ||
|
||
## GenAI.location | ||
|
||
> Warning: This API is now obsolete. | ||
> | ||
> use `GenAI.backend.location` instead. | ||
> | ||
|
||
The location configured for this GenAI service instance, relevant for Vertex AI backends. | ||
|
||
<b>Signature:</b> | ||
|
||
```typescript | ||
location: string; | ||
``` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These types still exist (can't remove them until a breaking change), but our doc generation tool doesn't pick them up since they're just aliases to the new types (e.g.
VertexAIError
is just an alias toAIError
.