ChatGenerator AiApiExplorer plugin calls setChatStructuredJsonSchema on provider instead of input

Created on 12 May 2025, 1 day ago

Problem/Motivation

In \Drupal\ai_api_explorer\Plugin\AiApiExplorer\ChatGenerator::getResponse
The form value for the structured data is checked.
if ($form_state->getValue('json_schema')) But then it tries to set the schema on the provider instead of the $input which leads to an exception the frontend then complains about.

Steps to reproduce

Go to the chat api explorer and under advanced set the JSON Schema/Structured Output

Proposed resolution

change the variable to set the schema on.

Remaining tasks

patch

User interface changes

none

API changes

none

Data model changes

none

🐛 Bug report
Status

Active

Version

1.1

Component

Other Submodules

Created by

🇨🇭Switzerland bircher 🇨🇿

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

Merge Requests

Comments & Activities

Production build 0.71.5 2024