Problem/Motivation

It may be convenient embed chat form anywhere in a simple way.
This may even cover every use-case on the drupal frontend.

Steps to reproduce

Proposed resolution

Create a service which returns ajax form to embed.

$aichat_embed = \Drupal::service('aichat.embed');
$aichat_embed->setChatType('default');

$build = [];
$build['chat_form'] = $aichat_embed->getForm();
return $build;

Remaining tasks

User interface changes

API changes

Data model changes

Comments

mindaugasd created an issue.