Skip to content

Conversation

samchon
Copy link
Owner

@samchon samchon commented May 11, 2025

This pull request introduces several updates and enhancements, primarily focusing on dependency upgrades, new functionality for LLM (Large Language Model) controllers, and improvements to the transformer logic. Below is a summary of the most significant changes grouped by theme.

Dependency Updates

  • Updated the @samchon/openapi dependency to version 4.3.0-dev.20250511 in package.json and pnpm-lock.yaml. This includes updates to the dependency specification, resolution integrity, and associated snapshots. [1] [2] [3] [4]

LLM Controller Enhancements

  • Added a new controller function in src/llm.ts to define LLM controllers with support for execution logic and optional configuration. [1] [2] [3] [4]
  • Introduced a new LlmControllerTransformer in src/transformers/features/llm/LlmControllerTransformer.ts for handling LLM controller transformations, including validation and property assignments.
  • Integrated the LlmControllerTransformer into the transformation pipeline by updating CallExpressionTransformer.ts to include the controller functor. [1] [2]

Transformer Logic Improvements

  • Refactored the LlmApplicationTransformer to modularize and improve the decomposition logic for LLM applications, enabling better reuse and error handling. [1] [2]
  • Enhanced the ExpressionFactory to support optional type parameters in the selfCall method, improving its flexibility. [1] [2]

Test Suite Updates

  • Updated test inputs and outputs to validate the new LLM controller functionality, replacing ILlmApplication usage with ILlmController in test-esm/generate/input/index.ts and test-esm/generate/output/index.ts. [1] [2] [3] [4] [5] [6] [7]

Versioning

  • Incremented the package version to 9.3.0-dev.20250511 in package.json.

@samchon samchon requested a review from Copilot May 11, 2025 17:03
@samchon samchon self-assigned this May 11, 2025
@samchon samchon added the enhancement New feature or request label May 11, 2025
Copy link
Contributor

@Copilot 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 a new LLM controller function (typia.llm.controller), upgrades the @samchon/openapi dependency, and improves the transformer logic for both LLM applications and controllers.

  • Added new test cases and inputs for controller functionality.
  • Integrated and refactored LLM controller and application transformers.
  • Updated source and factory functions supporting the new controller API.

Reviewed Changes

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

Show a summary per file
File Description
test/src/features/llm.controller/test_llm_controller.ts New test validating the LLM controller API.
test/generate/input/generate_llm.ts Added sample usage of the controller along with async executor functions.
test-esm/src/index.ts Updated tests to include the new controller configuration.
test-esm/generate/output/index.ts Modified output generation to use ILlmController and improved formatting.
test-esm/generate/input/index.ts Transitioned from ILlmApplication to ILlmController usage.
src/transformers/features/llm/LlmControllerTransformer.ts Introduced transformer for LLM controller with error checks.
src/transformers/features/llm/LlmApplicationTransformer.ts Refactored decompose logic and transformation for LLM applications.
src/transformers/CallExpressionTransformer.ts Integrated LLM controller transformer in the functors map.
src/llm.ts Added controller overloads and documentation updates.
src/factories/ExpressionFactory.ts Enhanced selfCall with an optional type parameter.
package.json Version bump and dependency upgrade for @samchon/openapi.
Files not reviewed (1)
  • pnpm-lock.yaml: Language not supported
Comments suppressed due to low confidence (2)

src/transformers/features/llm/LlmApplicationTransformer.ts:82

  • [nitpick] The variable name 'top' is ambiguous; consider renaming it to something like 'genericType' for improved clarity.
const top: ts.Node = props.expression.typeArguments[0]!;

src/transformers/features/llm/LlmControllerTransformer.ts:20

  • [nitpick] The error message for the case when only one argument is provided ('no executor.') might benefit from additional context about the expected arguments to assist debugging.
else if (props.expression.arguments.length === 1)

Copy link

pkg-pr-new bot commented May 11, 2025

Open in StackBlitz

npm i https://pkg.pr.new/typia@1582

commit: 107a69a

Copy link

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License

View full report

@samchon samchon merged commit 36d5daf into master May 12, 2025
10 checks passed
@samchon samchon deleted the feat/controller branch May 12, 2025 06:17
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.

1 participant