Cody embedding failing with Error- null response for embedding

Scenario

A Cody user has configured their VsCode extension, they have run their target repository through the embeddings process but embedding failed with error message like

Error embedding repository:

batch failed on file “abc/abc/lm.strings.json”: null response for embedding after 3 retries

 

Explanation

This error is caused by OpenAI, the OpenAI API fails on some file contents and just returns null with no errors. Sometimes this works with retrying but sometimes it doesn’t. 

Fix

This is being fixed by engineering in release 5.1.6 where the files with null response will be automatically excluded and embedding with continue to completion.

For versions without this fix , a workaround is to exclude those selected files using exclude file option as documented here, this would allow embedding to complete.

See more on this here.

Was this article helpful?
0 out of 0 found this helpful

Articles in this section