Skip to content

Commit

Permalink
Merge pull request #51 from samchon/feature/integer
Browse files Browse the repository at this point in the history
Add `LlmTypeChecker.isInteger()` function.
  • Loading branch information
samchon authored Sep 23, 2024
2 parents 1c87c42 + e3095ef commit bb4db6f
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 6 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
8 changes: 4 additions & 4 deletions src/structures/IHttpLlmApplication.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,9 +94,9 @@ export interface IHttpLlmApplication<
errors: IHttpLlmApplication.IError<Operation, Route>[];

/**
* 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<Schema>;
Expand Down Expand Up @@ -137,15 +137,15 @@ 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.
*/
route: () => Route | undefined;
}

/**
* Options for composing the LLM document.
* Options for composing the LLM application.
*/
export interface IOptions<Schema extends ILlmSchema = ILlmSchema> {
/**
Expand Down
5 changes: 4 additions & 1 deletion src/structures/ILlmApplication.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,14 @@ export interface ILlmApplication<Schema extends ILlmSchema = ILlmSchema> {
functions: ILlmFunction<Schema>[];

/**
* Options for the document.
* Options for the application.
*/
options: ILlmApplication.IOptions<Schema>;
}
export namespace ILlmApplication {
/**
* Options for composing the LLM application.
*/
export interface IOptions<Schema extends ILlmSchema = ILlmSchema> {
/**
* Separator function for the parameters.
Expand Down
11 changes: 11 additions & 0 deletions src/utils/LlmTypeChecker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*
Expand Down

0 comments on commit bb4db6f

Please sign in to comment.