From e3095ef81dc4ec31a298a1e54f4a1e6d1736370e Mon Sep 17 00:00:00 2001 From: Jeongho Nam Date: Mon, 23 Sep 2024 17:35:54 +0900 Subject: [PATCH] Add `LlmTypeChecker.isInteger()` function. --- package.json | 2 +- src/structures/IHttpLlmApplication.ts | 8 ++++---- src/structures/ILlmApplication.ts | 5 ++++- src/utils/LlmTypeChecker.ts | 11 +++++++++++ 4 files changed, 20 insertions(+), 6 deletions(-) diff --git a/package.json b/package.json index 3efa548..7d56daa 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@samchon/openapi", - "version": "1.0.2", + "version": "1.0.3", "description": "OpenAPI definitions and converters for 'typia' and 'nestia'.", "main": "./lib/index.js", "module": "./lib/index.mjs", diff --git a/src/structures/IHttpLlmApplication.ts b/src/structures/IHttpLlmApplication.ts index 99f96e2..f850c2b 100644 --- a/src/structures/IHttpLlmApplication.ts +++ b/src/structures/IHttpLlmApplication.ts @@ -94,9 +94,9 @@ export interface IHttpLlmApplication< errors: IHttpLlmApplication.IError[]; /** - * Options for the document. + * Options for the application. * - * Adjusted options when composing the document through + * Adjusted options when composing the application through * {@link HttpLlm.application} function. */ options: IHttpLlmApplication.IOptions; @@ -137,7 +137,7 @@ export namespace IHttpLlmApplication { * Get the migration route metadata, of the source. * * If the property returns `undefined`, it means that the error has - * been occured in the migration level, not of LLM document composition. + * been occured in the migration level, not of LLM application composition. * * @returns Migration route metadata. */ @@ -145,7 +145,7 @@ export namespace IHttpLlmApplication { } /** - * Options for composing the LLM document. + * Options for composing the LLM application. */ export interface IOptions { /** diff --git a/src/structures/ILlmApplication.ts b/src/structures/ILlmApplication.ts index f256ba5..823a3cb 100644 --- a/src/structures/ILlmApplication.ts +++ b/src/structures/ILlmApplication.ts @@ -40,11 +40,14 @@ export interface ILlmApplication { functions: ILlmFunction[]; /** - * Options for the document. + * Options for the application. */ options: ILlmApplication.IOptions; } export namespace ILlmApplication { + /** + * Options for composing the LLM application. + */ export interface IOptions { /** * Separator function for the parameters. diff --git a/src/utils/LlmTypeChecker.ts b/src/utils/LlmTypeChecker.ts index 633403e..cc35366 100644 --- a/src/utils/LlmTypeChecker.ts +++ b/src/utils/LlmTypeChecker.ts @@ -77,6 +77,17 @@ export namespace LlmTypeChecker { ): schema is ILlmSchema.IBoolean => (schema as ILlmSchema.IBoolean).type === "boolean"; + /** + * Test whether the schema is an integer type. + * + * @param schema Target schema + * @returns Whether integer type or not + */ + export const isInteger = ( + schema: ILlmSchema, + ): schema is ILlmSchema.IInteger => + (schema as ILlmSchema.IInteger).type === "integer"; + /** * Test whether the schema is a number type. *