Skip to content

Conversation

@samchon
Copy link
Owner

@samchon samchon commented Aug 5, 2025

This pull request introduces enhancements to the LLM application schema configuration, primarily focusing on improving extensibility and customizability for validation and parameter handling. The most significant changes are the addition of a custom validation hook system and making the parameter separation logic optional and more flexible.

Validation and extensibility improvements

  • Added a validate property to ILlmApplication.IOptions that allows users to specify custom validation functions for specific class methods. This enables business logic validation and more detailed error reporting, replacing the default type validation when provided.
  • Introduced the IValidationHook type to define the structure for these custom validation functions, ensuring type safety and method-level granularity.
  • Updated the options property of ILlmApplication to accept the new generic type signature, supporting the inclusion of class-specific validation hooks. [1] [2]
  • Imported the IValidation type in ILlmApplication.ts to support the new validation feature.

Parameter separation logic

  • Made the separate function in both ILlmApplication.IOptions and IHttpLlmApplication.IOptions optional (previously required), allowing for more flexible parameter composition between human and LLM. Also improved documentation for its intended use. [1] [2]

Other changes

  • Updated the package version in package.json to 4.7.0-dev.20250805-3.
  • Removed an unused import (ILlmApplication) from IHttpLlmApplication.ts.

@samchon samchon requested a review from Copilot August 5, 2025 13:48
@samchon samchon self-assigned this Aug 5, 2025
@samchon samchon added documentation Improvements or additions to documentation enhancement New feature or request labels Aug 5, 2025
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This pull request introduces validation hook functionality to the LLM application schema configuration, enabling custom validation functions for specific class methods. The changes enhance extensibility by allowing business logic validation beyond standard type checking and make parameter separation logic more flexible.

  • Added validate property to ILlmApplication.IOptions for custom validation hooks with method-level granularity
  • Made the separate function optional in both ILlmApplication.IOptions and IHttpLlmApplication.IOptions
  • Updated type signatures to support class-specific validation and improved documentation

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.

File Description
src/structures/ILlmApplication.ts Added validation hook support with new generic type parameter and IValidationHook type definition
src/structures/IHttpLlmApplication.ts Removed unused import and made separate function optional with inline documentation
package.json Updated version to 4.7.0-dev.20250805-3

@samchon samchon merged commit 5b63f56 into master Aug 5, 2025
4 checks passed
@samchon samchon deleted the feat/hook branch August 5, 2025 13:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants