Skip to content

Draft: Add additional context to Duo Chat REST API

Missy Davies requested to merge md-additional-context-duo-rest-api into master

What does this MR do and why?

Resolves #478528

Add additional context to Duo Chat REST API to align with the GraphQL API.

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.

Screenshots or screen recordings

Screenshot_2024-08-13_at_5.18.24_PM

How to set up and validate locally

Use cURL or PostMan to send a request to the Chat endpoint with additional context and verify it returns status 200:

http://gdk.test:3000/api/v4/chat/completions

{
    "content": "What is the capital of Bolivia?",
    "with_clean_history": true,
    "additional_context": [
        {
        "name": "something 1",
        "type": "snippet",
        "content": "some content from postman 1"
        },
        {
        "name": "something else 2",
        "type": "snippet",
        "content": "some more content from postman 2"
        }
    ]
  }

Merge request reports