Skip to content

feat: add generate_issue_description agents

Alejandro Rodríguez requested to merge generate-description-agent into main

What does this merge request do and why?

Add Agents to generate_description

How to set up and validate locally

  • `With missing inputs:
curl -X 'POST' \
  'http://0.0.0.0:5052/v1/agent' \
  -H 'accept: application/json' \
  -H 'Content-Type: application/json' \
  -H 'X-Gitlab-Unit-Primitive: generate_issue_description' \
  -d '{"name": "without_template", "inputs": {}}'
{"detail":"\"Input to ChatPromptTemplate is missing variables {'content'}.  Expected: ['content'] Received: []\""}
  • With correct inputs:
curl -X 'POST' \
  'http://0.0.0.0:5052/v1/agent' \
  -H 'accept: application/json' \
  -H 'Content-Type: application/json' \
  -H 'X-Gitlab-Unit-Primitive: generate_issue_description' \
  -d '{"name": "without_template", "inputs": {"content": "system is charging twice when you have two items in the shopping cart"}}'
"Here is the issue description:\n\n**Issue:** Double Charging for Shopping Cart with Multiple Items\n\n**Description:**\nWhen there are two or more items in the shopping cart, the system incorrectly charges the customer twice for the total amount. This issue leads to overcharging the customer, resulting in a poor user experience and potential loss of customer trust.\n\n**Steps to Reproduce:**\n1. Add two or more items to the shopping cart.\n2. Proceed to the checkout process.\n3. Observe that the total amount displayed is double the expected amount.\n\n**Expected Behavior:**\nThe system should calculate and display the correct total amount based on the individual prices of the items in the shopping cart, regardless of the number of items.\n\n**Severity:** High\n**Priority:** High"%
curl -X 'POST' \
  'http://0.0.0.0:5052/v1/agent' \
  -H 'accept: application/json' \
  -H 'Content-Type: application/json' \
  -H 'X-Gitlab-Unit-Primitive: generate_issue_description' \
  -d '{"name": "with_template", "inputs": {"content": "system is charging twice when you have two items in the shopping cart", "template": "Issue name:\nSteps to reproduce:\nTeam responsible:"}}'
"Issue name: Double charging for two items in shopping cart\nSteps to reproduce:\n1. Add two items to the shopping cart\n2. Proceed to checkout\n3. Observe that the system charges twice the total amount\nTeam responsible: Ecommerce Team"

Merge request checklist

  • Tests added for new functionality. If not, please raise an issue to follow up.
  • Documentation added/updated, if needed.

Merge request reports

Loading