Skip to content

Fix content-categoriser output JSON structure#1144

Merged
gvzdv merged 1 commit intomainfrom
json-fix
Aug 28, 2025
Merged

Fix content-categoriser output JSON structure#1144
gvzdv merged 1 commit intomainfrom
json-fix

Conversation

@gvzdv
Copy link
Contributor

@gvzdv gvzdv commented Aug 27, 2025

This PR ensures that the output of the content-categoriser preprocessor is in accordance with the schema.
After refactoring LLM-based components, LLM produces the output formatted as {'category': '_category_name_'}.

I mistakenly left in the code the additional structure that was assigning this key-value pair again, making the output look like '{category: '{'category': '_category_name_'}} causing the preprocessor to fail the validation.

Tested on Unicorn: now the output is validated successfully.


Required Information

  • I referenced the issue addressed in this PR.
  • I described the changes made and how these address the issue.
  • I described how I tested these changes.

Coding/Commit Requirements

  • I followed applicable coding standards where appropriate (e.g., PEP8)
  • I have not committed any models or other large files.

New Component Checklist (mandatory for new microservices)

  • I added an entry to docker-compose.yml and build.yml.
  • I created A CI workflow under .github/workflows.
  • I have created a README.md file that describes what the component does and what it depends on (other microservices, ML models, etc.).

OR

  • I have not added a new component in this PR.

@jeffbl jeffbl assigned gvzdv and unassigned jeffbl Aug 27, 2025
@gvzdv gvzdv merged commit 761b30b into main Aug 28, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants