The OpenAI API can be applied to virtually any task that involves understanding or generating natural language, also can be used in the automation of Jira ticketsĀ
we can use GPT-3 to automate the following text as a Jira ticketĀ
Please genrate a jira create screen fields with all fields included from the following text\n\n"Hi Cody Please prepare a report of the marketing activities for february 2023 please i need it as soon as possible"
GPT-3 will generate the response as following
- Summary: Prepare marketing report for February 2023
- Description: As soon as possible, please prepare a report of the marketing activities for February 2023.
- Priority: High
- Assignee: Cody
To use the api of GPT-3 we can run the following code in javascript
// Install the OpenAI SDK using npm: npm install openai
const openai = require('openai');
// Authenticate with the API using your API key
openai.api_key = 'your_api_key_here';
// Set the GPT-3 model and parameters
const model = 'text-davinci-002';
const prompt = `Please genrate a jira create screen fields with all fields included from the following text\n\n"Hi Cody Please prepare a report of the marketing activities for february 2023 please i need it as soon as possible"`;
// Call the GPT-3 API to generate the report
openai.complete({
engine: model,
prompt: prompt,
max_tokens: 2048,
n: 1,
stop: '\n\n'
}).then(response => {
const report = response.choices0.text.trim();
console.log(report);
}).catch(error => {
console.error(error);
});