Problems with Discouse AI embeddings configuration

Hi @mwaniki After the update we starting see below error, users are unable to view articles.

Is there something we might have missed during the update?

@NKERIFAC_CLAUD_NBAPNON Could you confirm a few details:

  • which plugins are installed?
  • are all users having the same problem?
  • does this affect just one, multiple or all topics?
  • are there any errors in your rails logs?

I would recommend disabling the plugins one at a time while checking if the issue persists, particularly the discourse-ai plugin if you have that installed. If you’re able to identify a problematic plugin, you can try updating it and see if the issue persists after re-enabling it.

Let us know how that goes.

1 Like

Hi, I disabled discourse-ai and issue is resolved. When i re-enable it issue appears again. And the version of discourse-ai plugin we have seems to be the latest, there is no update available.

1 Like

Hey @NKERIFAC_CLAUD_NBAPNON,

Apologies for the trouble. This looks related to the embeddings config changes I’ve been working on. Things should migrated automatically, but it appears this wasn’t the case.

Could you please tell me which embedding service are you using? Also, could you check if config was copied to the new table in your site by running in a rails console:

EmbeddingDefinition.last&.id

If that returned an ID, you could then set the model by doing:

SiteSetting.ai_embeddings_selected_model = EmbeddingDefinition.last&.id

I moved these posts into a new topic since the other one was related to the PG upgrade

2 Likes

Hi @Roman_Rizzi sorry I am not very good with the whole discourse system. Can you please tell me how to access the rails console? And also what do you mean by embedded service.

Just turn off that setting

AI embeddings semantic related topics enabled

, everything will go back to normal

And the first thing to do is check that embedding is configured. That is quite new setting and not so much informed.

I’m talking about this feature the AI plugins has:

We’ve been reorganizing how they get configured, and it may be the root cause of the issue you saw in your site.

If you are not using this feature, maybe you enabled it in your site but never configured?

To open a console, you can do:

./launcher enter app
rails c

If you no longer have the plugin installed, you will have to do:

DB.query_single("SELECT id FROM embedding_definitions").first

Additionally, it would be helpful to know this value:

SiteSetting.ai_embeddings_model

You could also re-install the plugin and disabled the site setting mentioned above until you re-configure it.