OpenAI's text-embedding-ada-002 error "Embedding dimensions"

Now, in the work I have done, the test does not work while installing, but it can be saved. After saving, when I selected this module "“text-embedding-ada-002"” from the settings, I saw that it works on the site. However, I am not sure if it adds new topics. This code gives an error “rake ai:embeddings:backfill”:

rake aborted!
NameError: uninitialized constant DiscourseAi::Embeddings::VectorRepresentations (NameError)

    vector_rep = DiscourseAi::Embeddings::VectorRepresentations::Base.current_representation
                                        ^^^^^^^^^^^^^^^^^^^^^^^
/var/www/discourse/plugins/discourse-ai/lib/tasks/modules/embeddings/database.rake:14:in `block in <main>'

While editing topics, AI gives an error while finding categories and tags. But the title generator works.


Hello, thanks for the update and correction work. I am trying to configure the embed module. Please note that after the update, some of the topics could not be accessed (new topics), I think it was because the embed feature was not installed. I am trying to install “text-embedding-ada-002”, which I used in the previous settings, but the “Embedding dimensions” setting is causing problems. If I leave it blank, the test passes, but it does not save because it is blank. If I enter a number, it gives the error message below. For now, I installed “OpenAI’s text-embedding-3-large”, the test passed, I think it may take some time to work on the topics, but I do not know what the difference is from the “text-embedding-ada-002” structure.

If I delete that part (Embedding dimensions), the test runs but does not save because it warns me that that area should not be empty.

If we want to save it, it gives this error: An error occurred: Dimensions cannot be empty

1 Like

This is fixed by:

You should be able to set dimensions for text-embedding-3-*. For the large one, use the preset value of 2000.

There’s a backfill job that runs every five minutes and with eventually generate embeddings for all topics.

I’ll post here once this is fixed.

2 Likes
  • Fixed “Embedding dimensions” issue.
  • Fixed this error: “OpenAI Embeddings failed with status: 400 body: { “error”: { “message”: “This model does not support specifying dimensions.”, “type”: “invalid_request_error”, “param”: null, “code”:”
  • “Run test” and “save” work.
  • Fixed category and tag specification with ai.
  • Topic summaries creation started to be seen.

Thank you boss :clap: :clap: :clap: :clap: :clap: :clap: :clap:

3 Likes