Skip to content

Commit

Permalink
Merge pull request #1 from wrtnio/feature/integer
Browse files Browse the repository at this point in the history
Add `OpenAiTypeChecker.isInteger()`
  • Loading branch information
samchon authored Sep 23, 2024
2 parents 2877be5 + 6839ed1 commit e7cb400
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@wrtnio/schema",
"version": "1.0.3",
"version": "1.0.4",
"description": "JSON and LLM function calling schemas extended for Wrtn Studio Pro",
"main": "lib/index.js",
"module": "./lib/index.mjs",
Expand Down Expand Up @@ -31,10 +31,10 @@
},
"homepage": "https://github.com/wrtnio/schema#readme",
"dependencies": {
"@samchon/openapi": "^1.0.2"
"@samchon/openapi": "^1.0.3"
},
"peerDependencies": {
"@samchon/openapi": ">=1.0.2"
"@samchon/openapi": ">=1.0.3"
},
"devDependencies": {
"@rollup/plugin-terser": "^0.4.4",
Expand Down
4 changes: 4 additions & 0 deletions src/OpenAiTypeChecker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,10 @@ export namespace OpenAiTypeChecker {
schema: IOpenAiSchema,
): schema is IOpenAiSchema.INumber => LlmTypeChecker.isNumber(schema);

export const isInteger = (
schema: IOpenAiSchema,
): schema is IOpenAiSchema.IInteger => LlmTypeChecker.isInteger(schema);

/**
* Test whether the schema is a string type.
*
Expand Down

0 comments on commit e7cb400

Please sign in to comment.