Open
Description
Describe the bug
I'm unable to integrate Gemini into a custom extension. I'm following the example and it seems to fail with the following error:
Error calling LLM TypeError: Cannot read properties of undefined (reading 'getStreamTools')
Here is the code I'm using:
const google = createGoogleGenerativeAI({
apiKey: API_KEY
});
const model = google('gemini-2.0-flash');
export default function App() {
const editor = useCreateBlockNote({
dictionary: {
...en,
ai: aiEn, // add default translations for the AI extension
},
extensions: [
createAIExtension({
model,
dataFormat: llmFormats.markdown,
promptBuilder: async (prompt, context) => {
return `${PREAMBLE} ${prompt}\n\nContext: ${context}`;
},
})
]
});
Any thoughts on what's up here? FWIW, I've used Gemini in a different component that was working fine.