When a piece of content is tagged with #generate, the content should be replaced with the result of a call to the backend API.
Show some kind of 'waiting' animation while the request processes.
If the request succeeds (200 response code), display the resulting content (one or more paragraphs).
If the request fails (4XX response code), crash the story with an error. (This might happen when LLM feature is disabled on the server, or when there's an error connecting to the LLM.
When a piece of content is tagged with
#generate
, the content should be replaced with the result of a call to the backend API.200
response code), display the resulting content (one or more paragraphs).4XX
response code), crash the story with an error. (This might happen when LLM feature is disabled on the server, or when there's an error connecting to the LLM.For reference, here's where the
text-me
tag is handled.