Support mapped enums for tool property input

Created on 1 May 2025, 8 days ago

Problem/Motivation

In some cases, you want to use an enum, but the values don't have any explicit description, e.g. if constants are backed by integers. For the LLM to chose, it needs a description.

Proposed resolution

Expand the enum to support oneOf/anyOf with const/title so values can be described.

API changes

ToolsPropertyInputInterface::setEnum becomes slightly more permissive in the data types it takes.

Data model changes

The tool output sent to LLM will swap out oneOf/anyOf for mapped types.

Feature request
Status

Active

Version

1.1

Component

Code

Created by

🇬🇧United Kingdom andrewbelcher

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024