Skip to content

Support pipeline job context in Duo Chat API

What does this MR do and why?

This MR adds support to the Chat REST API for evaluating pipeline jobs.

MR acceptance checklist

Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

How to set up and validate locally

curl --request POST \
  --header "Authorization: Bearer YOUR_LOCAL_TOKEN" \
  --header "Content-Type: application/json" \
  --data '{"content": "what is this build about", "resource_id": 335, "resource_type": "build"}' \
  --url "http://localhost:3000/api/v4/chat/completions"

You should get a response different than:

{"error":"resource_type does not have a valid value"}

It still can result in error since the functionality is not implemented yet.

Related to #468461

Edited by Eva Kadlecová

Merge request reports

Loading