BERTopic OpenAIBackend没有属性"encode",

5jdjgkvh  于 3个月前  发布在  其他
关注(0)|答案(1)|浏览(47)

Hi,
I am trying to use 'text-embedding-ada-002' as my embedding model. But i keep getting the error below when i try to run pre-calculated embeddings (it seems like 'encode' does not work with the openai>1.0 library):
AttributeError Traceback (most recent call last)
in <cell line: 6>()
4 client = openai.OpenAI()
5 embedding_model = OpenAIBackend(client, "text-embedding-ada-002")
----> 6 embeddings = embedding_model.encode(reviews, show_progress_bar=True)
AttributeError: 'OpenAIBackend' object has no attribute 'encode'

8aqjt8rx

8aqjt8rx1#

你应该使用主分支上的最新提交,因为我相信那里已经修复了这个问题。

相关问题