Firstly, thank you for this library. The concept is really great and useful.
I'm trying to implement the sample code given in the NPM page but it is not returning any scores. Just NaN.
I had to change the embeddings call for the latest OpenAI library. The new code is:
const embedding = await openai.embeddings.create({
'model': 'text-embedding-ada-002',
'input': encoded_line,
})
Is this the issue? Do you know what could be causing the NaN issue?
Firstly, thank you for this library. The concept is really great and useful.
I'm trying to implement the sample code given in the NPM page but it is not returning any scores. Just NaN.
I had to change the embeddings call for the latest OpenAI library. The new code is: const embedding = await openai.embeddings.create({ 'model': 'text-embedding-ada-002', 'input': encoded_line, })
Is this the issue? Do you know what could be causing the NaN issue?