Configuration for ChatGPT schema composition.

interface IConfig {
    reference: boolean;
    strict?: boolean;
}

Properties

Properties

reference: boolean

Whether to allow reference type in everywhere.

If you configure this property to false, most of reference types represented by IChatGptSchema.IReference would be escaped to a plain type unless recursive type case.

This is because the lower version of ChatGPT does not understand the reference type well, and even the modern version of ChatGPT sometimes occur the hallucination.

However, the reference type makes the schema size smaller, so that reduces the LLM token cost. Therefore, if you're using the modern version of ChatGPT, and want to reduce the LLM token cost, you can configure this property to true.

false
strict?: boolean

Whether to apply the strict mode.

If you configure this property to true, the ChatGPT function calling does not allow optional properties and dynamic key typed properties in the IChatGptSchema.IObject type. Instead, it increases the success rate of the function calling.

By the way, if you utilize the typia.validate function and give its validation feedback to the ChatGPT, its performance is much better than the strict mode. Therefore, I recommend you to just turn off the strict mode and utilize the typia.validate function instead.

Would be required in the future

false