From 8208b96d8da20a3a6f358f414a4b7d2fe8aab74d Mon Sep 17 00:00:00 2001 From: Jeongho Nam Date: Mon, 23 Dec 2024 01:45:25 +0900 Subject: [PATCH] Test case for #1442 --- ...42_llm_function_parameters_description.ts} | 29 +++++++++++++------ 1 file changed, 20 insertions(+), 9 deletions(-) rename test/src/{debug/llm.application.ts => features/issues/test_pr_1442_llm_function_parameters_description.ts} (77%) diff --git a/test/src/debug/llm.application.ts b/test/src/features/issues/test_pr_1442_llm_function_parameters_description.ts similarity index 77% rename from test/src/debug/llm.application.ts rename to test/src/features/issues/test_pr_1442_llm_function_parameters_description.ts index 32522a9e25..39e6b2c839 100644 --- a/test/src/debug/llm.application.ts +++ b/test/src/features/issues/test_pr_1442_llm_function_parameters_description.ts @@ -1,15 +1,26 @@ import { ILlmApplication, ILlmFunction } from "@samchon/openapi"; import typia, { tags } from "typia"; -const app: ILlmApplication<"chatgpt"> = typia.llm.application< - BbsArticleController, - "chatgpt" ->(); -const func: ILlmFunction<"chatgpt"> | undefined = app.functions.find( - (func) => func.name === "create", -); -console.log(func?.parameters.description); -console.log(func?.output?.description); +import { TestValidator } from "../../helpers/TestValidator"; + +export const test_pr_1442_llm_function_parameters_description = (): void => { + const app: ILlmApplication<"chatgpt"> = typia.llm.application< + BbsArticleController, + "chatgpt" + >(); + for (const func of app.functions) + TestValidator.equals("parameters.description")( + !!func.parameters.description, + )(true); + + const func: ILlmFunction<"chatgpt"> | undefined = app.functions.find( + (func) => func.name === "create", + ); + TestValidator.equals("parameters.description")( + !!func?.parameters.description, + )(true); + TestValidator.equals("output.description")(!!func?.output?.description)(true); +}; interface BbsArticleController { /**