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(*): use genkit where possible #547

Merged
merged 2 commits into from
Nov 26, 2024
Merged
Show file tree
Hide file tree
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
4 changes: 4 additions & 0 deletions firestore-genai-chatbot/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## Version 0.0.11

fix - update default Gemini models

## Version 0.0.10

- Add docs on regional support for Gemini APIs
Expand Down
2 changes: 1 addition & 1 deletion firestore-genai-chatbot/POSTINSTALL.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ The extension gives you a choice of what provider to use for the available model
## About the models

For Google AI the list of supported models is [here](https://ai.google.dev/models/gemini), and this parameter should be set to the model name, the second segment of the model code (for
example models/gemini-pro should be chosen as gemini-pro).
example `models/gemini-1.0-pro` should be chosen as `gemini-1.0-pro`).

For Vertex AI, the list of models is [here](https://cloud.google.com/vertex-ai/docs/generative-ai/learn/models).

Expand Down
4 changes: 2 additions & 2 deletions firestore-genai-chatbot/extension.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: firestore-genai-chatbot
version: 0.0.10
version: 0.0.11
specVersion: v1beta

icon: icon.png
Expand Down Expand Up @@ -108,7 +108,7 @@ params:
[Google AI Gemini models](https://ai.google.dev/models/gemini)
type: string
required: true
default: gemini-pro
default: gemini-1.0-pro
immutable: false

- param: COLLECTION_NAME
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ jest.mock('../../src/config', () => ({
provider: 'google-ai',
model: 'gemini-pro',
apiKey: 'test-api-key',
candidateCount: 2,
candidateField: 'candidates',
},
}));

Expand Down
1 change: 1 addition & 0 deletions firestore-genai-chatbot/functions/__tests__/util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ export const expectToProcessCorrectly = (
expect(firestoreCallData[2]).toEqual({
...message,
response: mockResponse,
candidates: expect.any(Array),
createTime: expect.any(Timestamp),
status: {
state: 'COMPLETED',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ process.env.FIRESTORE_EMULATOR_HOST = '127.0.0.1:8080';
jest.mock('../../src/config', () => ({
default: {
googleAi: {
model: 'gemini-pro',
model: 'gemini-1.0-pro',
apiKey: 'test-api-key',
},
vertex: {
model: 'gemini-pro',
model: 'gemini-1.0-pro',
},
collectionName: 'discussionsTestGenerative/{discussionId}/messages',
location: 'us-central1',
Expand All @@ -30,8 +30,10 @@ jest.mock('../../src/config', () => ({
enableDiscussionOptionOverrides: true,
candidatesField: 'candidates',
provider: 'vertex-ai',
model: 'gemini-pro',
model: 'gemini-1.0-pro',
apiKey: 'test-api-key',
candidateCount: 2,
candidateField: 'candidates',
},
}));

Expand Down
Loading
Loading