|
| 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. |
0 commit comments