Preset plugin

Preset plugin description for aura-configuration-api

Introduction

The preset plugin defines services associated with the management of presets in aura-configuration-api server.

All these services are defined in the presets namespace (/presets).

Servers definition

By default, the servers defined in the swagger include the base path (for v1): /aura-services/v2/configuration.

Therefore, in order to access the services, the base path and service path must be used.

Examples:

  • aura-services/v2/configuration/presets
  • aura-services/v2/configuration/presets/{presetId}

Endpoints

Path Method Description
/presets/ GET Get all presets information
/presets/ POST Add a new preset
/presets/{presetId} GET Get preset information using preset id
/presets/{presetId} PUT Replace preset information associated to preset id
/presets/{presetId} PATCH Update some fields of preset information using preset id
/presets/{presetId} DELETE Delete preset information using preset id

You can read the complete documentation of each service in the aura-configuration-api swagger file.

Retrieving information from presets

Retrieving specific fields from preset information

It is possible to get only a specific list of fields for preset information, reducing the amount of data transmitted when necessary, using the includeFields query parameter.

curl --location --request GET 'http://aura-configuration-api:8999/aura-services/v2/configuration/presets?includeFields=id,name,generative' \
--header 'correlator: urn:uuid:c8a604ee-29f8-7cda-2979-d2ae6189c360' \
--header 'Accept: application/json' \
--header 'Authorization: XXX'

Response example:

[
    {
        "id": "ab744582-c5a6-48e1-95bb-f509bdb55512",
        "name": "preset_2",
        "generative": {
            "model": {
                "id": "gpt-4o-mini",
                "parameters": {
                    "top_p": 1,
                    "max_tokens": 250,
                    "temperature": 1
                }
            },
            "prompts": {
                "template": "string",
                "preamble": {
                    "text": "Hola.",
                    "args": {
                        "brand": "Movistar",
                        "country": "Spain",
                        "year": "2024"
                    }
                },
                "promptMaxLength": 1500
            }
        }
    }
]

Excluding fields in presets information

It is also possible to exclude presets information fields using the excludeFields query parameter.

curl --location --request GET 'http://aura-configuration-api:8999/aura-services/v2/configuration/presets?excludeFields=generative,metadata' \
--header 'correlator: urn:uuid:c8a604ee-29f8-7cda-2979-d2ae6189c360' \
--header 'Accept: application/json' \
--header 'Authorization: APIKEY XXX'

Response example:

[
    {
        "id": "ab744582-c5a6-48e1-95bb-f509bdb55512",
        "name": "preset_2",
        "session": {
            "window": 8
        }
    }
]

Database

The complete definition of the data model can be found in presets collection section within the administration module.