Skip to content

Conversation

@samchon
Copy link
Owner

@samchon samchon commented Dec 19, 2025

This pull request refactors the type system and configuration handling for the HTTP LLM application codebase. The changes remove generic type parameters related to LLM models, unify configuration interfaces, and simplify function signatures and internal logic. The result is a more streamlined and maintainable codebase, with less reliance on generics and improved clarity around configuration options.

Refactoring and Type Simplification:

  • Removed generic type parameters (e.g., <Model extends ILlmSchema.Model>) from interfaces and functions throughout the codebase, including HttpLlm, HttpLlmComposer, and related fetchers, resulting in simpler and more consistent function signatures. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13] [14]

Configuration and Options Unification:

  • Consolidated configuration handling by replacing IOptions<Model> with a unified IConfig interface, and updated all references and documentation comments to use IConfig. This includes changing parameter names and default values for configuration options. [1] [2] [3] [4] [5]

Internal Logic and Documentation Updates:

  • Updated the logic for composing LLM applications and functions to use the new config structure, and removed unnecessary references to model-specific configuration. [1] [2] [3] [4]
  • Revised and clarified documentation comments throughout the code to match the new configuration and type system, removing outdated references to keyword arguments and model generics. [1] [2] [3] [4] [5]

These changes modernize the codebase, reduce complexity, and make the configuration system more robust and easier to use.

@samchon samchon self-assigned this Dec 19, 2025
Copilot AI review requested due to automatic review settings December 19, 2025 04:37
@samchon samchon added the enhancement New feature or request label Dec 19, 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 refactors the HTTP LLM application codebase by removing generic type parameters and consolidating configuration handling. The changes simplify function signatures throughout the codebase and unify configuration interfaces from IOptions<Model> to IConfig.

Key Changes:

  • Removed generic type parameters (<Model extends ILlmSchema.Model>) from all interfaces and functions, including HttpLlm, HttpLlmComposer, HttpLlmFunctionFetcher, and LlmDataMerger
  • Consolidated configuration by replacing IHttpLlmApplication.IOptions with IHttpLlmApplication.IConfig and changed properties from optional to required with explicit defaults
  • Updated documentation comments throughout the codebase to reflect the new configuration structure and remove references to deprecated keyword arguments and model generics

Reviewed changes

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

Show a summary per file
File Description
src/HttpLlm.ts Removed generic type parameters from all function signatures, updated configuration handling to use unified IConfig, and revised documentation to reflect the new structure
src/structures/IHttpLlmApplication.ts Renamed IOptions interface to IConfig, changed properties from optional to required with default values documented, and updated property name from options to config
src/composers/HttpLlmApplicationComposer.ts Removed generic type parameters from composer functions, implemented explicit config initialization with default values, and simplified function signatures throughout
src/http/HttpLlmFunctionFetcher.ts Removed generic type parameters from execute and propagate functions, simplifying the fetcher interface
src/utils/LlmDataMerger.ts Removed generic type parameters from IProps interface and parameters function, updated error message to reference correct namespace

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@samchon samchon merged commit a30c708 into v6.0 Dec 19, 2025
3 of 4 checks passed
@samchon samchon deleted the feat/migrate branch December 19, 2025 04:51
samchon added a commit that referenced this pull request Dec 23, 2025
* Unified to `ILlmSchema`, no more separation. (#213)

* Unified to `ILlmSchema`

* Complete the new `ILlmSchema` type

* detailed description comments

* Update src/structures/ILlmSchema.ts

Co-authored-by: Copilot <[email protected]>

* Update src/structures/ILlmSchema.ts

Co-authored-by: Copilot <[email protected]>

* Update src/structures/ILlmSchema.ts

Co-authored-by: Copilot <[email protected]>

* prettier

---------

Co-authored-by: Copilot <[email protected]>

* Unify `ILlmApplication` and `ILlmFunction` too. (#214)

* Universal `LlmSchemaComposer` (#215)

* Universal LlmSchemaComposer

* complete `LlmSchemaComposer.schema()` function

* fix logics

* Universal `LlmTypeChecker` (#216)

* Universal `LlmTypeChecker`

* Fix `LlmSchemaComposer` to utilize `LlmTypeCheckeer`

* JSDoc comments on universal LLM types. (#217)

* Universal `HttpLlm` (#218)

* Universal `HttpLlm`

* Update src/HttpLlm.ts

Co-authored-by: Copilot <[email protected]>

* Update src/HttpLlm.ts

Co-authored-by: Copilot <[email protected]>

* fix configuration comments

* fix more thing

---------

Co-authored-by: Copilot <[email protected]>

* Remove individual LLM schemas (#219)

* Remove individual LLM schemas

* fix

* Unify test functions about LLM schemas (#220)

* Unify test functions about LLM schemas

* Update test/src/utils/LlmApplicationFactory.ts

Co-authored-by: Copilot <[email protected]>

* fixed most of test functions

* fixed most of test functions

* completed everything

---------

Co-authored-by: Copilot <[email protected]>

* Publish v6

* Re-write README for universal LLM schemas (#221)

---------

Co-authored-by: Copilot <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants