Skip to content

Commit 9a4325c

Browse files
committed
fix(js/samples/js-coffee-shop): update model so that the sample works
ERROR: ``` [GoogleGenerativeAI Error]: Error fetching from https://generativelanguage.googleapis.com/v1beta/models/gemini-1.5-flash:generateContent: [404 Not Found] models/gemini-1.5-flash is not found for API version v1beta, or is not supported for generateContent. Call ListModels to see the list of available models and their supported methods. Error: [GoogleGenerativeAI Error]: Error fetching from https://generativelanguage.googleapis.com/v1beta/models/gemini-1.5-flash:generateContent: [404 Not Found] models/gemini-1.5-flash is not found for API version v1beta, or is not supported for generateContent. Call ListModels to see the list of available models and their supported methods. ... ``` CHANGELOG: - [ ] Fixes the use of the model so the sample works.
1 parent 1b0c865 commit 9a4325c

File tree

2 files changed

+15
-15
lines changed

2 files changed

+15
-15
lines changed

samples/js-coffee-shop/package.json

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -17,20 +17,20 @@
1717
"author": "",
1818
"license": "ISC",
1919
"dependencies": {
20-
"genkit": "^1.0.4",
21-
"genkitx-chromadb": "^1.0.4",
22-
"@genkit-ai/dev-local-vectorstore": "^1.0.4",
23-
"@genkit-ai/firebase": "^1.0.4",
24-
"@genkit-ai/googleai": "^1.0.4",
25-
"genkitx-ollama": "^1.0.4",
26-
"genkitx-pinecone": "^1.0.4",
27-
"@genkit-ai/evaluator": "^1.0.4",
28-
"@genkit-ai/vertexai": "^1.0.4",
29-
"zod": "^3.22.4"
20+
"@genkit-ai/dev-local-vectorstore": "1.21.0",
21+
"@genkit-ai/evaluator": "1.21.0",
22+
"@genkit-ai/firebase": "1.21.0",
23+
"@genkit-ai/google-genai": "1.21.0",
24+
"@genkit-ai/vertexai": "^1.21.0",
25+
"genkit": "1.21.0",
26+
"genkitx-chromadb": "1.21.0",
27+
"genkitx-ollama": "1.21.0",
28+
"genkitx-pinecone": "^1.21.0",
29+
"zod": "^4.1.12"
3030
},
3131
"devDependencies": {
32-
"genkit-cli": "^1.0.4",
32+
"genkit-cli": "^1.21.0",
3333
"rimraf": "^6.0.1",
34-
"typescript": "^5.3.3"
34+
"typescript": "^5.9.3"
3535
}
3636
}

samples/js-coffee-shop/src/index.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
* limitations under the License.
1515
*/
1616

17-
import { gemini15Flash, googleAI } from '@genkit-ai/googleai';
17+
import { googleAI } from '@genkit-ai/google-genai';
1818
import { genkit, z } from 'genkit';
1919

2020
const ai = genkit({
@@ -33,7 +33,7 @@ const CustomerNameSchema = z.object({
3333
const simpleGreetingPrompt = ai.definePrompt(
3434
{
3535
name: 'simpleGreeting',
36-
model: gemini15Flash,
36+
model: googleAI.model('gemini-2.5-flash'),
3737
input: { schema: CustomerNameSchema },
3838
output: {
3939
format: 'text',
@@ -68,7 +68,7 @@ const CustomerTimeAndHistorySchema = z.object({
6868
const greetingWithHistoryPrompt = ai.definePrompt(
6969
{
7070
name: 'greetingWithHistory',
71-
model: gemini15Flash,
71+
model: googleAI.model('gemini-2.5-flash'),
7272
input: { schema: CustomerTimeAndHistorySchema },
7373
output: {
7474
format: 'text',

0 commit comments

Comments
 (0)