Skip to content

Commit

Permalink
Test case for #1442
Browse files Browse the repository at this point in the history
  • Loading branch information
samchon committed Dec 22, 2024
1 parent fb528e8 commit 8208b96
Showing 1 changed file with 20 additions and 9 deletions.
Original file line number Diff line number Diff line change
@@ -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 {
/**
Expand Down

0 comments on commit 8208b96

Please sign in to comment.