-
Notifications
You must be signed in to change notification settings - Fork 422
Open
Labels
docsImprovements or additions to documentationImprovements or additions to documentation
Description
Is your report related to a problem? Please describe.
I believe the readme contains incorrect or incomplete initialization code:
import dotenv from 'dotenv';
import { genkit } from 'genkit';
import openAI, { gpt35Turbo } from '@genkit-ai/compat-oai';
dotenv.config();
const ai = genkit({
plugins: [openAI({ apiKey: process.env.OPENAI_API_KEY })],
// specify a default model if not provided in generate params:
model: gpt35Turbo,
});
As it throws the error:
TypeError: Cannot read properties of undefined (reading 'name')
at openAICompatible (file:///{project}/node_modules/@genkit-ai/compat-oai/lib/index.mjs:7:13)
Is your report related to a suggestion/improvement? Please describe.
To use the OpenAI models, the import
line should look like this:
import openAI from '@genkit-ai/compat-oai/openai';
Additional context
None.
Metadata
Metadata
Assignees
Labels
docsImprovements or additions to documentationImprovements or additions to documentation
Type
Projects
Status
No status