Content moderation, AI Provider dropdown selection not saved

Created on 21 October 2024, 2 months ago

Problem/Motivation

When trying to do content moderation, and when selecting the "Ai provider" in the "Edit Moderation state base field"
in the "advanced settings" the dropdown state is not saved, but after save it is back in the default "Default Advanced JSON model". (The actual selection looks to be saved in the database but its not fetched back to UI once saved)

That is a problem, because every time you edit that form you need to actually select the AI Provider cos otherwise it will save to default state.

So what I did is I followed this tutorial https://www.youtube.com/watch?v=WsgKVJw3Dvc
And did exactly same as in the tutorial BUT I used my local Ollama llama. So I had to select that Ai Provider
at the page "Edit Moderation state base field"
/admin/structure/types/manage/user_post/fields/base-field-override/node.user_post.moderation_state

So if the form is edited but the the Ai Provider is not again selected as "ollama" it will give this error:
The "" plugin does not exist. Valid plugin IDs for Drupal\ai\AiProviderPluginManager are: huggingface, lmstudio, mistral, ollama, openai

Steps to reproduce

Follow the youtube tutorial but use your local model like ollama and select it in the step "Edit Moderation state base field"

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

🐛 Bug report
Status

Active

Version

1.0

Component

AI Automators

Created by

🇫🇮Finland anaconda777

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024