Type Alias IOptions<Model, Class>

IOptions: ModelConfig[Model] & {
    separate?: null | (schema: ModelSchema[Model]) => boolean;
    validate?: null | Partial<IValidationHook<Class>>;
}

Options for application composition.

Type Parameters

  • Model extends Model
  • Class extends object = any

Type declaration

  • Optionalseparate?: null | (schema: ModelSchema[Model]) => boolean

    Separator function for the parameters.

    When composing parameter arguments through LLM function call, there can be a case that some parameters must be composed by human, or LLM cannot understand the parameter.

    For example, if the parameter type has configured IGeminiSchema.IString.contentMediaType which indicates file uploading, it must be composed by human, not by LLM (Large Language Model).

    In that case, if you configure this property with a function that predicating whether the schema value must be composed by human or not, the parameters would be separated into two parts.

    • ILlmFunction.separated.llm
    • ILlmFunction.separated.human

    When writing the function, note that returning value true means to be a human composing the value, and false means to LLM composing the value. Also, when predicating the schema, it would better to utilize the GeminiTypeChecker like features.

    null
    

    Schema to be separated.

    Whether the schema value must be composed by human or not.

  • Optionalvalidate?: null | Partial<IValidationHook<Class>>

    Custom validation functions for specific class methods.

    The validate property allows you to provide custom validation functions that will replace the default validation behavior for specific methods within the application class. When specified, these custom validators take precedence over the standard type validation generated by typia.llm.application().

    This feature is particularly useful when you need to:

    • Implement business logic validation beyond type checking
    • Add custom constraints that cannot be expressed through type annotations
    • Provide more specific error messages for AI agents
    • Validate dynamic conditions based on runtime state

    Each validation function receives the same arguments as its corresponding method and must return an IValidation result. On validation success, it should return { success: true, data }. On failure, it should return { success: false, data, errors } with detailed error information that helps AI agents understand and correct their mistakes.

    null