Configuration for OpenAPI v3.0 based LLM schema composition.

interface IConfig {
    constraint: boolean;
    recursive: number | false;
}

Properties

constraint: boolean

Whether to allow constraint properties or not.

If you configure this property to false, the schemas do not contain the constraint properties of below. Instead, below properties would be written to the ILlmSchemaV3.__IAttribute.description property as a comment string like "@format uuid".

This is because some LLM schema model like IGeminiSchema has banned such constraint, because their LLM cannot understand the constraint properties and occur the hallucination.

Therefore, considering your LLM model's performance, capability, and the complexity of your parameter types, determine which is better, to allow the constraint properties or not.

true
recursive: number | false

Whether to allow recursive types or not.

If allow, then how many times to repeat the recursive types.

By the way, if the model is "chatgpt", the recursive types are always allowed without any limitation, due to it supports the reference type.

3