Skip to content

Conversation

@samchon
Copy link
Owner

@samchon samchon commented Jul 6, 2025

This pull request refactors the DEFAULT_CONFIGS structure in src/composers/LlmSchemaComposer.ts to use centralized default configurations from individual schema composers and updates the default values for the reference property across multiple schema structures. Additionally, it modifies test cases to explicitly override the reference property when validating schemas.

Refactoring and Centralization of Default Configurations:

  • src/composers/LlmSchemaComposer.ts: Replaced hardcoded DEFAULT_CONFIGS values with references to DEFAULT_CONFIG constants defined in individual schema composers. This improves maintainability by centralizing configuration definitions.
  • Individual schema composer files (ChatGptSchemaComposer, ClaudeSchemaComposer, DeepSeekSchemaComposer, GeminiSchemaComposer, LlamaSchemaComposer, LlmSchemaV3Composer, LlmSchemaV3_1Composer): Added DEFAULT_CONFIG constants for each schema composer to define default configurations. [1] [2] [3] [4] [5] [6] [7]

Updates to Default Values for reference Property:

  • Schema structure files (IChatGptSchema, IClaudeSchema, IDeepSeekSchema, ILlamaSchema, ILlmSchemaV3_1): Changed the default value of the reference property from false to true in the documentation comments, aligning with the new default configurations. [1] [2] [3] [4] [5]

Test Case Adjustments:

  • Test files (validate_llm_schema_enum.ts, validate_llm_schema_enum_reference.ts): Updated test configurations to explicitly set reference: false when validating schemas, ensuring tests reflect scenarios where the reference property is overridden. [1] [2]

@samchon samchon requested a review from Copilot July 6, 2025 20:24
@samchon samchon self-assigned this Jul 6, 2025
@samchon samchon added documentation Improvements or additions to documentation enhancement New feature or request labels Jul 6, 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 PR refactors the way default configurations are defined and applied across LLM schema composers, and changes the default value of the reference property from false to true in several schema definitions, with tests updated to explicitly override reference: false when needed.

  • Introduce DEFAULT_CONFIG constants in each individual schema composer and switch LlmSchemaComposer to use them
  • Update @default annotations for reference in multiple I*Schema files from false to true
  • Modify two test cases to explicitly set reference: false in the config

Reviewed Changes

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

File Description
src/composers/LlmSchemaComposer.ts Replaced hardcoded defaults with references to each composer’s DEFAULT_CONFIG
src/composers/llm/*Composer.ts Added DEFAULT_CONFIG constant in each schema composer
src/structures/IChatGptSchema.ts, IClaudeSchema.ts, IDeepSeekSchema.ts, ILlamaSchema.ts, ILlmSchemaV3_1.ts Updated @default JSDoc for reference to true in each schema
test/src/features/llm/schema/validate_llm_schema_enum.ts, validate_llm_schema_enum_reference.ts Updated tests to override reference: false in the config
Comments suppressed due to low confidence (5)

src/structures/ILlmSchemaV3_1.ts:131

  • [nitpick] The descriptive text still implies the default is false and that you must set it to true to reduce token cost. Consider updating the wording to reflect that reference is now enabled by default or clarify how to disable it.
     * @default true

src/structures/ILlamaSchema.ts:85

  • [nitpick] The comment suggests enabling this option to reduce token cost, but since the default is now true, the text should be updated to explain how to disable it or note that it's on by default.
     * @default true

src/structures/IDeepSeekSchema.ts:79

  • [nitpick] Now that reference defaults to true, the description above should be revised to reflect the new default behavior or clarify how to turn it off.
     * @default true

src/structures/IClaudeSchema.ts:81

  • [nitpick] The explanatory text assumes the default is false. Update it to indicate that reference is now true by default or describe how to disable it instead.
     * @default true

src/structures/IChatGptSchema.ts:318

  • [nitpick] Since reference now defaults to true, the wording above should be adjusted to reflect the new default or explain how consumers can set it to false if desired.
     * @default true

@samchon samchon merged commit 8821642 into master Jul 6, 2025
4 checks passed
@samchon samchon deleted the feat/reference branch July 6, 2025 20:27
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