Skip to content

Commit 5b30fbe

Browse files
committed
[DOC-13702]: Write documentation for the Release Note Generator
Adding a page on the AI summaries. Made a few corrections to `docker-compose.yaml` to make sure it picks up the latest version, and restarts Kroki if the service is stopped.
1 parent ba4fa50 commit 5b30fbe

File tree

4 files changed

+87
-6
lines changed

4 files changed

+87
-6
lines changed

home/modules/contribute/nav.adoc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@
4040
* Release Note Generator
4141
** xref:release-note-generator/design-guide.adoc[Release Note Generator Design Guide]
4242
** xref:release-note-generator/adding-a-new-product.adoc[Adding a New Product]
43+
** xref:release-note-generator/generate_ai_summaries.adoc[Generate AI Summaries]
4344
4445
4546
//* Additional Resources (Pending)

home/modules/contribute/pages/release-note-generator/adding-a-new-product.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
= Adding a New Product
22
:description: Demonstrates how to add a new product to the Release Note Generator.
3-
:page-pagination: prev
3+
:page-pagination: full
44
:page-topic-type: howto
55

66
[abstract]
Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
= Generate AI Summaries
2+
:page-topic-type: howto
3+
:page-pagination: prev
4+
:description: The release note generator can use ChatGPT to generate release note summaries
5+
6+
[abstract]
7+
{description}
8+
9+
== Overview
10+
11+
The release note generator has the facility to create summaries of the Jira tickets,
12+
if the `release notes description` field hasn't been populated on any ticket flagged for inclusion in the release note.
13+
14+
The summaries are generated using the ChatGPT using the ticket's summary and comments as the input to a supplied prompt.
15+
16+
To make use of this facility, you must supply parameters in both the `.passwords.yaml` and `cb_release_notes_config.yaml`.
17+
18+
=== AI setup in `.passwords.yaml`
19+
The `.passwords.yaml` file is used to store sensitive information such as API keys and passwords. To use the AI feature, you must add the following parameters to the `.passwords.yaml` file:
20+
21+
[source, yaml]
22+
.Adding the AI token to `.passwords.yaml`
23+
----
24+
jira:
25+
https://jira.issues.couchbase.com:
26+
27+
token: # Jira token goes here
28+
ai:
29+
chatgpt:
30+
api_key: # ChatGPT API token goes here.
31+
----
32+
33+
=== AI Setup in `.cb_release_notes_config.yaml`
34+
35+
Each release set has its own AI setup. If we use the example from xref:./adding-a-new-product.adoc[]:
36+
[source, yaml]
37+
.Adding the AI Service to `.cb_release_notes_config.yaml`
38+
----
39+
- name: "Sync Gateway"
40+
fields:
41+
- name: release_number
42+
type: text
43+
message: 'Enter the release number:'
44+
- name: release_date
45+
type: text
46+
message: 'Enter the release date (Month Year):'
47+
- name: file_path
48+
type: file
49+
message: 'Enter the file path for the release notes:'
50+
url: https://jira.issues.couchbase.com
51+
jql: project = CBG AND issuetype in (Bug, "New Feature", Improvement)
52+
AND (fixVersion = {{release_number}} OR labels IN (known_issue))
53+
ORDER BY key ASC
54+
template: sync-gateway.jinja2
55+
ai_service:
56+
name: chatgpt
57+
model: 'gpt-4o'
58+
prompt: 'Summarise the following as a short release note
59+
with no version numbers, no headings, no links,
60+
no identifying names or email addresses, and no more than 8 sentences'
61+
62+
----
63+
64+
We have added the `ai_service` section which contains three new elements:
65+
66+
[horizontal]
67+
68+
name::
69+
The name of the AI service. This must match the `ai` service defined in `.passwords.yaml`,
70+
where it also must have a corresponding token.
71+
72+
model::
73+
The model name of the AI service.
74+
It's a good idea to check the names of the available models for the ChatGPT service.
75+
+
76+
CAUTION: Model names are case-sensitive.
77+
78+
prompt::
79+
The prompt used to generate the text.
80+
The prompt can impact the quality of the summary, so it's worth experimenting with it.

kroki/docker-compose.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
services:
22
kroki:
3-
image: yuzutech/kroki
3+
image: yuzutech/kroki:latest
44
depends_on:
55
- blockdiag
66
- mermaid
@@ -15,22 +15,22 @@ services:
1515
- "9500:8000"
1616
restart: always
1717
blockdiag:
18-
image: yuzutech/kroki-blockdiag
18+
image: yuzutech/kroki-blockdiag:latest
1919
expose:
2020
- "8001"
2121
restart: always
2222
mermaid:
23-
image: yuzutech/kroki-mermaid
23+
image: yuzutech/kroki-mermaid:latest
2424
expose:
2525
- "8002"
2626
restart: always
2727
bpmn:
28-
image: yuzutech/kroki-bpmn
28+
image: yuzutech/kroki-bpmn:latest
2929
expose:
3030
- "8003"
3131
restart: always
3232
excalidraw:
33-
image: yuzutech/kroki-excalidraw
33+
image: yuzutech/kroki-excalidraw:latest
3434
expose:
3535
- "8004"
3636
restart: always

0 commit comments

Comments
 (0)