MaartenGr / MaartenGr/BERTopic
Issue Using OpenAI embeddings model
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 7.8k
- Forks
- 920
- Avg merge
- 22h 24m
- Merged PRs (30d)
- 5
Description
I'm attempting to use the OpenAI text embedding "text-embedding-ada-002" for use in my BERTopic script. When using a valid OpenAI API key, and following the instructions here for OpenAI embedding use https://maartengr.github.io/BERTopic/getting_started/embeddings/embeddings.html, I get the following error:
> InvalidRequestError: '$.input' is invalid. Please check the API reference: https://platform.openai.com/docs/api-reference.
When trying to use other embedding examples listed on the page, such as the HuggingFace transformers, I'm running into no issues.
I was wondering if anyone else was running into this issue, and what I might do to get this working. Thanks!
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the BERTopic OpenAI embedding example from the linked embeddings documentation with text-embedding-ada-002 and a valid API key, then compare it with the working HuggingFace example. Trace the embedding integration to identify why the OpenAI request produces an invalid $.input error; done means the documented OpenAI example runs successfully.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- machine-learning
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100