openai.Configuration is not a constructor
DomEscobar opened this issue · 1 comments
DomEscobar commented
Heyo your implementation of the OpenAIEmbeddingFunction
seems to fail when i try to run it like this
`import { OpenAIEmbeddingFunction, connect } from 'vectordb';
import dotenv from 'dotenv';
dotenv.config();
const dbPath = 'assets/db/lancedb'
const apiKey = process.env.OPENAI_API_KEY
let embedFunction = new OpenAIEmbeddingFunction('info', apiKey)`
i get this error
const configuration = new openai.Configuration({
^
TypeError: openai.Configuration is not a constructor
at new OpenAIEmbeddingFunction (...node_modules\vectordb\dist\embedding\openai.js:37:31)
DomEscobar commented
ah o nvm its cause im importing the newest openai dep.