Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
langcode: en
status: true
dependencies:
module:
- thunder_ai_prompt_management
id: headline
label: Headline
description: 'Suggest headline options for the article.'
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
langcode: en
status: true
dependencies:
module:
- thunder_ai_prompt_management
id: seo_title
label: 'SEO Title'
description: 'Generate a search-optimized meta title.'
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
langcode: en
status: true
dependencies:
module:
- thunder_ai_prompt_management
id: teaser_summary
label: 'Teaser Summary'
description: 'Write a short teaser summary for listings.'
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
langcode: en
status: true
dependencies:
module:
- thunder_ai_prompt_management
id: writing_assistant
label: 'Writing Assistant'
description: 'Prompts for the AI chatbot to draft or review the article directly from the edit form.'
22 changes: 22 additions & 0 deletions content/ai_prompt_content/2bde7757-1da2-4602-975e-bfaa22b20170.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
_meta:
version: '1.0'
entity_type: ai_prompt_content
uuid: 2bde7757-1da2-4602-975e-bfaa22b20170
bundle: ai_prompt_content
default_langcode: en
default:
status:
-
value: true
label:
-
value: 'SEO-friendly headline'
prompt:
-
value: 'Write a clear, keyword-forward headline for this article that describes what it is about and would perform well in search results. Keep it under 70 characters.'
ai_task:
-
target_id: headline
entity_context:
-
value: node.article
22 changes: 22 additions & 0 deletions content/ai_prompt_content/66973c22-8db7-4881-9864-47a839c3e132.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
_meta:
version: '1.0'
entity_type: ai_prompt_content
uuid: 66973c22-8db7-4881-9864-47a839c3e132
bundle: ai_prompt_content
default_langcode: en
default:
status:
-
value: true
label:
-
value: 'Review this draft for SEO & clarity'
prompt:
-
value: 'Read the article currently open in this edit form, including any unsaved changes. Check for a missing or weak headline, SEO title, or teaser summary, unclear wording, and structural issues. Summarize what is missing or weak, then use your tools to propose concrete fixes back into the form as a reviewable change.'
ai_task:
-
target_id: writing_assistant
entity_context:
-
value: node.article
22 changes: 22 additions & 0 deletions content/ai_prompt_content/6ab47d3d-908e-4fa9-a49a-1e05d0d52da2.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
_meta:
version: '1.0'
entity_type: ai_prompt_content
uuid: 6ab47d3d-908e-4fa9-a49a-1e05d0d52da2
bundle: ai_prompt_content
default_langcode: en
default:
status:
-
value: true
label:
-
value: 'Draft this article from a brief'
prompt:
-
value: 'If I have not given you a topic or brief for this article yet, ask me for one. Then draft a complete article: propose a headline, an SEO title, a short teaser summary, and an opening paragraph. Use your tools to apply the draft to the open article form as a reviewable change, rather than only describing it in chat.'
ai_task:
-
target_id: writing_assistant
entity_context:
-
value: node.article
69 changes: 69 additions & 0 deletions content/ai_prompt_content/6b9f8d1b-7a68-44a5-a063-e16cbe5eb1e5.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
_meta:
version: '1.0'
entity_type: ai_prompt_content
uuid: 6b9f8d1b-7a68-44a5-a063-e16cbe5eb1e5
bundle: ai_prompt_content
default_langcode: en
default:
status:
-
value: true
label:
-
value: 'Add an FAQ section'
prompt:
-
value: |-
## Task: Create an FAQ from an article

You are an experienced editorial assistant.

Analyze the provided article and create relevant, helpful FAQ questions with matching answers from it.

### Rules

* Read and understand the entire article before creating the FAQ.
* Create **5-10 relevant FAQ entries**.
* Each question must be genuinely helpful to readers of the article.
* The answers must be based exclusively on information from the article.
* Do not invent information and do not make assumptions.
* Do not use information that is not contained in the article or clearly derivable from it.
* Avoid duplicate or very similar questions.
* Phrase the questions naturally and concretely.
* Keep the answers precise and easy to understand.
* Use the same language as the article.

### Selection by the user

After creating the FAQ, **you MUST call the tool `ai_chatbot_assistant_ui_ask_user`**.

Present **all generated FAQ entries as a multiselect**.

Each selectable option must include the corresponding **question and its answer**, so the user can judge which FAQ entries to adopt.

The user must be able to select several FAQ entries at once.

**Important:**

* Use `ai_chatbot_assistant_ui_ask_user` exclusively for this presentation.
* Do not output the generated FAQ entries as a normal chat reply instead.
* Wait for the user's selection.
* Only the FAQ entries the user selected count as adopted.

### Inserting the selected FAQ

After the user's selection, create **one new paragraph of type Text at the end of the article** from the selected FAQ entries.

* Do not insert the selected FAQ anywhere else in the article.
* The new paragraph is inserted **after the article's existing last paragraph**.
* Use exclusively the FAQ entries selected by the user.
* Include the question and answer for each one.
* Format the new paragraph as a well-readable FAQ section.
* If no FAQ entries were selected, no FAQ paragraph may be added.
* The existing article content must not be changed.
ai_task:
-
target_id: writing_assistant
entity_context:
-
value: node.article
22 changes: 22 additions & 0 deletions content/ai_prompt_content/8d822488-7ccf-4485-895b-daf16bdf5cc8.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
_meta:
version: '1.0'
entity_type: ai_prompt_content
uuid: 8d822488-7ccf-4485-895b-daf16bdf5cc8
bundle: ai_prompt_content
default_langcode: en
default:
status:
-
value: true
label:
-
value: 'Check spelling & grammar'
prompt:
-
value: 'Read the article currently open in this edit form, including the title, SEO title, and teaser text. Check it for spelling and grammar mistakes. List each mistake you find with a suggested correction, then use your tools to apply the corrections to the form as a reviewable change.'
ai_task:
-
target_id: writing_assistant
entity_context:
-
value: node.article
22 changes: 22 additions & 0 deletions content/ai_prompt_content/95fc4367-e114-4993-8196-0bebe1b15853.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
_meta:
version: '1.0'
entity_type: ai_prompt_content
uuid: 95fc4367-e114-4993-8196-0bebe1b15853
bundle: ai_prompt_content
default_langcode: en
default:
status:
-
value: true
label:
-
value: 'Teaser summary'
prompt:
-
value: 'Write a short, 1-2 sentence teaser summarizing this article for a front-page listing. Make it inviting without repeating the headline verbatim.'
ai_task:
-
target_id: teaser_summary
entity_context:
-
value: node.article
22 changes: 22 additions & 0 deletions content/ai_prompt_content/cd67b942-d18c-4427-a05a-c81245548961.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
_meta:
version: '1.0'
entity_type: ai_prompt_content
uuid: cd67b942-d18c-4427-a05a-c81245548961
bundle: ai_prompt_content
default_langcode: en
default:
status:
-
value: true
label:
-
value: 'SEO meta title'
prompt:
-
value: 'Write a concise, keyword-rich SEO meta title for this article, distinct from the on-page headline, optimized for search engine results. Keep it under 60 characters.'
ai_task:
-
target_id: seo_title
entity_context:
-
value: node.article
22 changes: 22 additions & 0 deletions content/ai_prompt_content/eb86b7d1-2b33-43cd-b35c-5e9677ffebe0.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
_meta:
version: '1.0'
entity_type: ai_prompt_content
uuid: eb86b7d1-2b33-43cd-b35c-5e9677ffebe0
bundle: ai_prompt_content
default_langcode: en
default:
status:
-
value: true
label:
-
value: 'Punchy headline'
prompt:
-
value: 'Write a short, punchy, attention-grabbing headline for this article that would make someone want to click on it. Keep it under 70 characters.'
ai_task:
-
target_id: headline
entity_context:
-
value: node.article
10 changes: 10 additions & 0 deletions thunder_testing_demo.info.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,17 @@ dependencies:
- default_content:default_content
- drupal:help
- drupal:tour
- thunder_ai_prompt_management:thunder_ai_prompt_management
default_content:
ai_prompt_content:
- eb86b7d1-2b33-43cd-b35c-5e9677ffebe0
- 2bde7757-1da2-4602-975e-bfaa22b20170
- cd67b942-d18c-4427-a05a-c81245548961
- 6ab47d3d-908e-4fa9-a49a-1e05d0d52da2
- 66973c22-8db7-4881-9864-47a839c3e132
- 8d822488-7ccf-4485-895b-daf16bdf5cc8
- 6b9f8d1b-7a68-44a5-a063-e16cbe5eb1e5
- 95fc4367-e114-4993-8196-0bebe1b15853
taxonomy_term:
- 0bb70443-8172-4d8e-9335-2876bc32e356
- bfc251bc-de35-467d-af44-1f7a7012b845
Expand Down