typia 9.7.0 → 9.7.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/AssertionGuard.d.mts +27 -25
- package/lib/AssertionGuard.d.ts +27 -25
- package/lib/CamelCase.d.mts +1 -1
- package/lib/CamelCase.d.ts +1 -1
- package/lib/IRandomGenerator.d.mts +44 -42
- package/lib/IRandomGenerator.d.ts +44 -42
- package/lib/IReadableURLSearchParams.d.mts +2 -2
- package/lib/IReadableURLSearchParams.d.ts +2 -2
- package/lib/PascalCase.d.mts +1 -1
- package/lib/PascalCase.d.ts +1 -1
- package/lib/Primitive.d.mts +20 -22
- package/lib/Primitive.d.ts +20 -22
- package/lib/Resolved.d.mts +16 -18
- package/lib/Resolved.d.ts +16 -18
- package/lib/SnakeCase.d.mts +3 -2
- package/lib/SnakeCase.d.ts +3 -2
- package/lib/TypeGuardError.d.mts +88 -61
- package/lib/TypeGuardError.d.ts +88 -61
- package/lib/TypeGuardError.js +40 -29
- package/lib/TypeGuardError.js.map +1 -1
- package/lib/TypeGuardError.mjs +70 -48
- package/lib/factories/MetadataCollection.js +4 -12
- package/lib/factories/MetadataCollection.js.map +1 -1
- package/lib/factories/MetadataCollection.mjs +4 -12
- package/lib/factories/MetadataCommentTagFactory.js +5 -15
- package/lib/factories/MetadataCommentTagFactory.js.map +1 -1
- package/lib/factories/MetadataCommentTagFactory.mjs +5 -15
- package/lib/factories/MetadataFactory.js +1 -3
- package/lib/factories/MetadataFactory.js.map +1 -1
- package/lib/factories/MetadataFactory.mjs +1 -3
- package/lib/factories/ProtobufFactory.js +1 -3
- package/lib/factories/ProtobufFactory.js.map +1 -1
- package/lib/factories/ProtobufFactory.mjs +1 -3
- package/lib/functional.d.mts +196 -195
- package/lib/functional.d.ts +196 -195
- package/lib/functional.js +18 -54
- package/lib/functional.js.map +1 -1
- package/lib/functional.mjs +18 -54
- package/lib/http.d.mts +303 -319
- package/lib/http.d.ts +303 -319
- package/lib/http.js +26 -78
- package/lib/http.js.map +1 -1
- package/lib/http.mjs +26 -78
- package/lib/internal/_ProtobufReader.d.mts +3 -9
- package/lib/internal/_ProtobufReader.d.ts +3 -9
- package/lib/internal/_ProtobufReader.js.map +1 -1
- package/lib/internal/_ProtobufReader.mjs +3 -9
- package/lib/internal/_ProtobufSizer.d.mts +4 -12
- package/lib/internal/_ProtobufSizer.d.ts +4 -12
- package/lib/internal/_ProtobufSizer.js.map +1 -1
- package/lib/internal/_ProtobufSizer.mjs +4 -12
- package/lib/internal/_ProtobufWriter.d.mts +5 -15
- package/lib/internal/_ProtobufWriter.d.ts +5 -15
- package/lib/internal/_ProtobufWriter.js.map +1 -1
- package/lib/internal/_ProtobufWriter.mjs +5 -15
- package/lib/internal/_jsonStringifyString.d.mts +4 -4
- package/lib/internal/_jsonStringifyString.d.ts +4 -4
- package/lib/internal/_jsonStringifyString.js +4 -4
- package/lib/internal/_jsonStringifyString.mjs +4 -4
- package/lib/json.d.mts +174 -195
- package/lib/json.d.ts +174 -195
- package/lib/json.js +16 -48
- package/lib/json.js.map +1 -1
- package/lib/json.mjs +16 -48
- package/lib/llm.d.mts +275 -192
- package/lib/llm.d.ts +275 -192
- package/lib/llm.js +4 -12
- package/lib/llm.js.map +1 -1
- package/lib/llm.mjs +4 -12
- package/lib/misc.d.mts +149 -172
- package/lib/misc.d.ts +149 -172
- package/lib/misc.js +17 -51
- package/lib/misc.js.map +1 -1
- package/lib/misc.mjs +17 -51
- package/lib/module.d.mts +263 -275
- package/lib/module.d.ts +263 -275
- package/lib/module.js +18 -54
- package/lib/module.js.map +1 -1
- package/lib/module.mjs +18 -54
- package/lib/notations.d.mts +153 -174
- package/lib/notations.d.ts +153 -174
- package/lib/notations.js +24 -72
- package/lib/notations.js.map +1 -1
- package/lib/notations.mjs +24 -72
- package/lib/programmers/FeatureProgrammer.d.mts +19 -41
- package/lib/programmers/FeatureProgrammer.d.ts +19 -41
- package/lib/programmers/FeatureProgrammer.js.map +1 -1
- package/lib/programmers/ImportProgrammer.js +3 -9
- package/lib/programmers/ImportProgrammer.js.map +1 -1
- package/lib/programmers/ImportProgrammer.mjs +3 -9
- package/lib/programmers/RandomProgrammer.js +6 -0
- package/lib/programmers/RandomProgrammer.js.map +1 -1
- package/lib/programmers/RandomProgrammer.mjs +6 -0
- package/lib/programmers/helpers/ProtobufWire.d.mts +13 -13
- package/lib/programmers/helpers/ProtobufWire.d.ts +13 -13
- package/lib/programmers/internal/check_array_length.js +2 -6
- package/lib/programmers/internal/check_array_length.js.map +1 -1
- package/lib/programmers/internal/check_array_length.mjs +2 -6
- package/lib/programmers/internal/check_bigint.js +2 -6
- package/lib/programmers/internal/check_bigint.js.map +1 -1
- package/lib/programmers/internal/check_bigint.mjs +2 -6
- package/lib/programmers/internal/check_dynamic_key.js +2 -6
- package/lib/programmers/internal/check_dynamic_key.js.map +1 -1
- package/lib/programmers/internal/check_dynamic_key.mjs +2 -6
- package/lib/programmers/internal/check_dynamic_properties.js +3 -9
- package/lib/programmers/internal/check_dynamic_properties.js.map +1 -1
- package/lib/programmers/internal/check_dynamic_properties.mjs +3 -9
- package/lib/programmers/internal/check_everything.js +1 -3
- package/lib/programmers/internal/check_everything.js.map +1 -1
- package/lib/programmers/internal/check_everything.mjs +1 -3
- package/lib/programmers/internal/check_native.js +2 -6
- package/lib/programmers/internal/check_native.js.map +1 -1
- package/lib/programmers/internal/check_native.mjs +2 -6
- package/lib/programmers/internal/check_number.js +2 -6
- package/lib/programmers/internal/check_number.js.map +1 -1
- package/lib/programmers/internal/check_number.mjs +2 -6
- package/lib/programmers/internal/check_object.js +2 -6
- package/lib/programmers/internal/check_object.js.map +1 -1
- package/lib/programmers/internal/check_object.mjs +2 -6
- package/lib/programmers/internal/check_string.js +2 -6
- package/lib/programmers/internal/check_string.js.map +1 -1
- package/lib/programmers/internal/check_string.mjs +2 -6
- package/lib/programmers/internal/check_template.js +1 -3
- package/lib/programmers/internal/check_template.js.map +1 -1
- package/lib/programmers/internal/check_template.mjs +1 -3
- package/lib/programmers/internal/check_union_array_like.js +1 -3
- package/lib/programmers/internal/check_union_array_like.js.map +1 -1
- package/lib/programmers/internal/check_union_array_like.mjs +1 -3
- package/lib/programmers/internal/decode_union_object.js +2 -6
- package/lib/programmers/internal/decode_union_object.js.map +1 -1
- package/lib/programmers/internal/decode_union_object.mjs +2 -6
- package/lib/programmers/internal/feature_object_entries.js +1 -3
- package/lib/programmers/internal/feature_object_entries.js.map +1 -1
- package/lib/programmers/internal/feature_object_entries.mjs +1 -3
- package/lib/programmers/internal/json_schema_escaped.js +2 -6
- package/lib/programmers/internal/json_schema_escaped.js.map +1 -1
- package/lib/programmers/internal/json_schema_escaped.mjs +2 -6
- package/lib/programmers/internal/json_schema_object.js +3 -9
- package/lib/programmers/internal/json_schema_object.js.map +1 -1
- package/lib/programmers/internal/json_schema_object.mjs +3 -9
- package/lib/programmers/internal/metadata_to_pattern.js +1 -3
- package/lib/programmers/internal/metadata_to_pattern.js.map +1 -1
- package/lib/programmers/internal/metadata_to_pattern.mjs +1 -3
- package/lib/programmers/internal/postfix_of_tuple.js +1 -3
- package/lib/programmers/internal/postfix_of_tuple.js.map +1 -1
- package/lib/programmers/internal/postfix_of_tuple.mjs +1 -3
- package/lib/programmers/internal/prune_object_properties.js +1 -3
- package/lib/programmers/internal/prune_object_properties.js.map +1 -1
- package/lib/programmers/internal/prune_object_properties.mjs +1 -3
- package/lib/programmers/internal/stringify_dynamic_properties.js +2 -6
- package/lib/programmers/internal/stringify_dynamic_properties.js.map +1 -1
- package/lib/programmers/internal/stringify_dynamic_properties.mjs +2 -6
- package/lib/programmers/internal/stringify_native.js +1 -3
- package/lib/programmers/internal/stringify_native.js.map +1 -1
- package/lib/programmers/internal/stringify_native.mjs +1 -3
- package/lib/programmers/internal/stringify_regular_properties.js +2 -6
- package/lib/programmers/internal/stringify_regular_properties.js.map +1 -1
- package/lib/programmers/internal/stringify_regular_properties.mjs +2 -6
- package/lib/programmers/internal/template_to_pattern.js +1 -3
- package/lib/programmers/internal/template_to_pattern.js.map +1 -1
- package/lib/programmers/internal/template_to_pattern.mjs +1 -3
- package/lib/programmers/internal/wrap_metadata_rest_tuple.js +1 -3
- package/lib/programmers/internal/wrap_metadata_rest_tuple.js.map +1 -1
- package/lib/programmers/internal/wrap_metadata_rest_tuple.mjs +1 -3
- package/lib/protobuf.d.mts +290 -297
- package/lib/protobuf.d.ts +290 -297
- package/lib/protobuf.js +17 -51
- package/lib/protobuf.js.map +1 -1
- package/lib/protobuf.mjs +17 -51
- package/lib/reflect.d.mts +2 -4
- package/lib/reflect.d.ts +2 -4
- package/lib/reflect.js +1 -3
- package/lib/reflect.js.map +1 -1
- package/lib/reflect.mjs +1 -3
- package/lib/schemas/json/IJsonApplication.d.mts +4 -4
- package/lib/schemas/json/IJsonApplication.d.ts +4 -4
- package/lib/schemas/json/IJsonSchemaCollection.d.mts +73 -56
- package/lib/schemas/json/IJsonSchemaCollection.d.ts +73 -56
- package/lib/schemas/json/IJsonSchemaUnit.d.mts +83 -70
- package/lib/schemas/json/IJsonSchemaUnit.d.ts +83 -70
- package/lib/schemas/metadata/Metadata.d.mts +1 -3
- package/lib/schemas/metadata/Metadata.d.ts +1 -3
- package/lib/schemas/metadata/Metadata.js +9 -27
- package/lib/schemas/metadata/Metadata.js.map +1 -1
- package/lib/schemas/metadata/Metadata.mjs +9 -27
- package/lib/schemas/metadata/MetadataAliasType.d.mts +1 -3
- package/lib/schemas/metadata/MetadataAliasType.d.ts +1 -3
- package/lib/schemas/metadata/MetadataAliasType.js +3 -9
- package/lib/schemas/metadata/MetadataAliasType.js.map +1 -1
- package/lib/schemas/metadata/MetadataAliasType.mjs +3 -9
- package/lib/schemas/metadata/MetadataApplication.d.mts +1 -3
- package/lib/schemas/metadata/MetadataApplication.d.ts +1 -3
- package/lib/schemas/metadata/MetadataApplication.js +2 -6
- package/lib/schemas/metadata/MetadataApplication.js.map +1 -1
- package/lib/schemas/metadata/MetadataApplication.mjs +2 -6
- package/lib/schemas/metadata/MetadataArray.d.mts +1 -3
- package/lib/schemas/metadata/MetadataArray.d.ts +1 -3
- package/lib/schemas/metadata/MetadataArray.js +1 -3
- package/lib/schemas/metadata/MetadataArray.js.map +1 -1
- package/lib/schemas/metadata/MetadataArray.mjs +1 -3
- package/lib/schemas/metadata/MetadataArrayType.d.mts +1 -3
- package/lib/schemas/metadata/MetadataArrayType.d.ts +1 -3
- package/lib/schemas/metadata/MetadataArrayType.js +3 -9
- package/lib/schemas/metadata/MetadataArrayType.js.map +1 -1
- package/lib/schemas/metadata/MetadataArrayType.mjs +3 -9
- package/lib/schemas/metadata/MetadataAtomic.js +1 -3
- package/lib/schemas/metadata/MetadataAtomic.js.map +1 -1
- package/lib/schemas/metadata/MetadataAtomic.mjs +1 -3
- package/lib/schemas/metadata/MetadataEscaped.d.mts +1 -3
- package/lib/schemas/metadata/MetadataEscaped.d.ts +1 -3
- package/lib/schemas/metadata/MetadataEscaped.js +3 -9
- package/lib/schemas/metadata/MetadataEscaped.js.map +1 -1
- package/lib/schemas/metadata/MetadataEscaped.mjs +3 -9
- package/lib/schemas/metadata/MetadataFunction.d.mts +1 -3
- package/lib/schemas/metadata/MetadataFunction.d.ts +1 -3
- package/lib/schemas/metadata/MetadataFunction.js +2 -6
- package/lib/schemas/metadata/MetadataFunction.js.map +1 -1
- package/lib/schemas/metadata/MetadataFunction.mjs +2 -6
- package/lib/schemas/metadata/MetadataObject.d.mts +1 -3
- package/lib/schemas/metadata/MetadataObject.d.ts +1 -3
- package/lib/schemas/metadata/MetadataObject.js +1 -3
- package/lib/schemas/metadata/MetadataObject.js.map +1 -1
- package/lib/schemas/metadata/MetadataObject.mjs +1 -3
- package/lib/schemas/metadata/MetadataObjectType.d.mts +1 -3
- package/lib/schemas/metadata/MetadataObjectType.d.ts +1 -3
- package/lib/schemas/metadata/MetadataObjectType.js +5 -15
- package/lib/schemas/metadata/MetadataObjectType.js.map +1 -1
- package/lib/schemas/metadata/MetadataObjectType.mjs +6 -18
- package/lib/schemas/metadata/MetadataParameter.js +1 -3
- package/lib/schemas/metadata/MetadataParameter.js.map +1 -1
- package/lib/schemas/metadata/MetadataParameter.mjs +1 -3
- package/lib/schemas/metadata/MetadataProperty.d.mts +1 -3
- package/lib/schemas/metadata/MetadataProperty.d.ts +1 -3
- package/lib/schemas/metadata/MetadataProperty.js +3 -9
- package/lib/schemas/metadata/MetadataProperty.js.map +1 -1
- package/lib/schemas/metadata/MetadataProperty.mjs +3 -9
- package/lib/schemas/metadata/MetadataTemplate.js +1 -3
- package/lib/schemas/metadata/MetadataTemplate.js.map +1 -1
- package/lib/schemas/metadata/MetadataTemplate.mjs +1 -3
- package/lib/schemas/metadata/MetadataTuple.d.mts +1 -3
- package/lib/schemas/metadata/MetadataTuple.d.ts +1 -3
- package/lib/schemas/metadata/MetadataTuple.js +2 -6
- package/lib/schemas/metadata/MetadataTuple.js.map +1 -1
- package/lib/schemas/metadata/MetadataTuple.mjs +2 -6
- package/lib/schemas/metadata/MetadataTupleType.js +2 -6
- package/lib/schemas/metadata/MetadataTupleType.js.map +1 -1
- package/lib/schemas/metadata/MetadataTupleType.mjs +3 -9
- package/lib/tags/Constant.d.mts +32 -0
- package/lib/tags/Constant.d.ts +32 -0
- package/lib/tags/ContentMediaType.d.mts +17 -0
- package/lib/tags/ContentMediaType.d.ts +17 -0
- package/lib/tags/Default.d.mts +30 -0
- package/lib/tags/Default.d.ts +30 -0
- package/lib/tags/Example.d.mts +32 -0
- package/lib/tags/Example.d.ts +32 -0
- package/lib/tags/Examples.d.mts +40 -0
- package/lib/tags/Examples.d.ts +40 -0
- package/lib/tags/ExclusiveMaximum.d.mts +21 -0
- package/lib/tags/ExclusiveMaximum.d.ts +21 -0
- package/lib/tags/ExclusiveMinimum.d.mts +21 -0
- package/lib/tags/ExclusiveMinimum.d.ts +21 -0
- package/lib/tags/Format.d.mts +28 -0
- package/lib/tags/Format.d.ts +28 -0
- package/lib/tags/JsonSchemaPlugin.d.mts +28 -0
- package/lib/tags/JsonSchemaPlugin.d.ts +28 -0
- package/lib/tags/MaxItems.d.mts +19 -0
- package/lib/tags/MaxItems.d.ts +19 -0
- package/lib/tags/MaxLength.d.mts +13 -0
- package/lib/tags/MaxLength.d.ts +13 -0
- package/lib/tags/Maximum.d.mts +20 -0
- package/lib/tags/Maximum.d.ts +20 -0
- package/lib/tags/MinItems.d.mts +19 -0
- package/lib/tags/MinItems.d.ts +19 -0
- package/lib/tags/MinLength.d.mts +13 -0
- package/lib/tags/MinLength.d.ts +13 -0
- package/lib/tags/Minimum.d.mts +20 -0
- package/lib/tags/Minimum.d.ts +20 -0
- package/lib/tags/MultipleOf.d.mts +21 -0
- package/lib/tags/MultipleOf.d.ts +21 -0
- package/lib/tags/Pattern.d.mts +18 -0
- package/lib/tags/Pattern.d.ts +18 -0
- package/lib/tags/Sequence.d.mts +27 -0
- package/lib/tags/Sequence.d.ts +27 -0
- package/lib/tags/TagBase.d.mts +38 -18
- package/lib/tags/TagBase.d.ts +38 -18
- package/lib/tags/Type.d.mts +27 -0
- package/lib/tags/Type.d.ts +27 -0
- package/lib/tags/UniqueItems.d.mts +20 -0
- package/lib/tags/UniqueItems.d.ts +20 -0
- package/lib/tags/internal/FormatCheatSheet.d.mts +1 -3
- package/lib/tags/internal/FormatCheatSheet.d.ts +1 -3
- package/lib/tags/internal/FormatCheatSheet.js +1 -3
- package/lib/tags/internal/FormatCheatSheet.js.map +1 -1
- package/lib/tags/internal/FormatCheatSheet.mjs +1 -3
- package/lib/transformers/ITransformOptions.d.mts +27 -19
- package/lib/transformers/ITransformOptions.d.ts +27 -19
- package/lib/transformers/ImportTransformer.js +114 -1
- package/lib/transformers/ImportTransformer.js.map +1 -1
- package/lib/transformers/ImportTransformer.mjs +114 -1
- package/lib/transformers/NoTransformConfigurationError.js +1 -3
- package/lib/transformers/NoTransformConfigurationError.js.map +1 -1
- package/lib/transformers/NoTransformConfigurationError.mjs +1 -3
- package/lib/transformers/features/llm/LlmApplicationTransformer.js +1 -3
- package/lib/transformers/features/llm/LlmApplicationTransformer.js.map +1 -1
- package/lib/transformers/features/llm/LlmApplicationTransformer.mjs +1 -3
- package/lib/typings/Equal.d.mts +6 -6
- package/lib/typings/Equal.d.ts +6 -6
- package/package.json +2 -1
- package/src/AssertionGuard.ts +27 -25
- package/src/CamelCase.ts +1 -1
- package/src/IRandomGenerator.ts +57 -47
- package/src/IReadableURLSearchParams.ts +2 -2
- package/src/PascalCase.ts +1 -1
- package/src/Primitive.ts +20 -22
- package/src/Resolved.ts +16 -18
- package/src/SnakeCase.ts +3 -2
- package/src/TypeGuardError.ts +101 -64
- package/src/factories/MetadataCollection.ts +4 -12
- package/src/factories/MetadataCommentTagFactory.ts +8 -24
- package/src/factories/MetadataFactory.ts +1 -3
- package/src/factories/ProtobufFactory.ts +1 -3
- package/src/functional.ts +214 -249
- package/src/http.ts +329 -397
- package/src/internal/_ProtobufReader.ts +3 -9
- package/src/internal/_ProtobufSizer.ts +4 -12
- package/src/internal/_ProtobufWriter.ts +5 -15
- package/src/internal/_jsonStringifyString.ts +4 -4
- package/src/json.ts +190 -243
- package/src/llm.ts +279 -204
- package/src/misc.ts +166 -223
- package/src/module.ts +281 -329
- package/src/notations.ts +177 -246
- package/src/programmers/FeatureProgrammer.ts +19 -41
- package/src/programmers/ImportProgrammer.ts +3 -9
- package/src/programmers/RandomProgrammer.ts +6 -1
- package/src/programmers/helpers/ProtobufWire.ts +13 -13
- package/src/programmers/internal/check_array_length.ts +2 -6
- package/src/programmers/internal/check_bigint.ts +2 -6
- package/src/programmers/internal/check_dynamic_key.ts +2 -6
- package/src/programmers/internal/check_dynamic_properties.ts +3 -9
- package/src/programmers/internal/check_everything.ts +1 -3
- package/src/programmers/internal/check_native.ts +2 -6
- package/src/programmers/internal/check_number.ts +2 -6
- package/src/programmers/internal/check_object.ts +3 -9
- package/src/programmers/internal/check_string.ts +2 -6
- package/src/programmers/internal/check_template.ts +1 -3
- package/src/programmers/internal/check_union_array_like.ts +2 -6
- package/src/programmers/internal/decode_union_object.ts +3 -9
- package/src/programmers/internal/feature_object_entries.ts +1 -3
- package/src/programmers/internal/json_schema_escaped.ts +2 -6
- package/src/programmers/internal/json_schema_object.ts +4 -12
- package/src/programmers/internal/metadata_to_pattern.ts +1 -3
- package/src/programmers/internal/postfix_of_tuple.ts +1 -3
- package/src/programmers/internal/prune_object_properties.ts +1 -3
- package/src/programmers/internal/stringify_dynamic_properties.ts +2 -6
- package/src/programmers/internal/stringify_native.ts +1 -3
- package/src/programmers/internal/stringify_regular_properties.ts +2 -6
- package/src/programmers/internal/template_to_pattern.ts +1 -3
- package/src/programmers/internal/wrap_metadata_rest_tuple.ts +1 -3
- package/src/protobuf.ts +307 -348
- package/src/reflect.ts +3 -7
- package/src/schemas/json/IJsonApplication.ts +4 -4
- package/src/schemas/json/IJsonSchemaCollection.ts +73 -56
- package/src/schemas/json/IJsonSchemaUnit.ts +83 -70
- package/src/schemas/metadata/IMetadataTypeTag.ts +1 -3
- package/src/schemas/metadata/Metadata.ts +9 -27
- package/src/schemas/metadata/MetadataAliasType.ts +3 -9
- package/src/schemas/metadata/MetadataApplication.ts +2 -6
- package/src/schemas/metadata/MetadataArray.ts +1 -3
- package/src/schemas/metadata/MetadataArrayType.ts +3 -9
- package/src/schemas/metadata/MetadataAtomic.ts +1 -3
- package/src/schemas/metadata/MetadataEscaped.ts +3 -9
- package/src/schemas/metadata/MetadataFunction.ts +2 -6
- package/src/schemas/metadata/MetadataObject.ts +1 -3
- package/src/schemas/metadata/MetadataObjectType.ts +6 -18
- package/src/schemas/metadata/MetadataParameter.ts +1 -3
- package/src/schemas/metadata/MetadataProperty.ts +3 -9
- package/src/schemas/metadata/MetadataTemplate.ts +1 -3
- package/src/schemas/metadata/MetadataTuple.ts +2 -6
- package/src/schemas/metadata/MetadataTupleType.ts +3 -9
- package/src/tags/Constant.ts +32 -0
- package/src/tags/ContentMediaType.ts +17 -0
- package/src/tags/Default.ts +30 -0
- package/src/tags/Example.ts +32 -0
- package/src/tags/Examples.ts +40 -0
- package/src/tags/ExclusiveMaximum.ts +21 -0
- package/src/tags/ExclusiveMinimum.ts +21 -0
- package/src/tags/Format.ts +28 -0
- package/src/tags/JsonSchemaPlugin.ts +28 -0
- package/src/tags/MaxItems.ts +19 -0
- package/src/tags/MaxLength.ts +13 -0
- package/src/tags/Maximum.ts +20 -0
- package/src/tags/MinItems.ts +19 -0
- package/src/tags/MinLength.ts +13 -0
- package/src/tags/Minimum.ts +20 -0
- package/src/tags/MultipleOf.ts +21 -0
- package/src/tags/Pattern.ts +18 -0
- package/src/tags/Sequence.ts +27 -0
- package/src/tags/TagBase.ts +38 -18
- package/src/tags/Type.ts +27 -0
- package/src/tags/UniqueItems.ts +20 -0
- package/src/tags/internal/FormatCheatSheet.ts +1 -3
- package/src/transformers/ITransformOptions.ts +27 -19
- package/src/transformers/ImportTransformer.ts +173 -1
- package/src/transformers/NoTransformConfigurationError.ts +1 -3
- package/src/transformers/features/llm/LlmApplicationTransformer.ts +1 -3
- package/src/typings/Equal.ts +6 -6
package/lib/llm.d.ts
CHANGED
|
@@ -4,18 +4,19 @@ import { ILlmApplication, ILlmController, ILlmSchema } from "@samchon/openapi";
|
|
|
4
4
|
*
|
|
5
5
|
* TypeScript functions to LLM function calling controller.
|
|
6
6
|
*
|
|
7
|
-
* Creates a controller of LLM (Large Language Model) function calling
|
|
8
|
-
*
|
|
7
|
+
* Creates a controller of LLM (Large Language Model) function calling from a
|
|
8
|
+
* TypeScript class or interface type containing the target functions to be
|
|
9
9
|
* called by the LLM function calling feature. The returned controller contains
|
|
10
|
-
* not only the {@link application} of
|
|
11
|
-
*
|
|
10
|
+
* not only the {@link application} of
|
|
11
|
+
* {@link ILlmFunction function calling schemas}, but also the
|
|
12
|
+
* {@link ILlmController.execute executor} of the functions.
|
|
12
13
|
*
|
|
13
14
|
* If you put the returned {@link ILlmController} to the LLM provider like
|
|
14
|
-
* [OpenAI (ChatGPT)](https://openai.com/), the LLM will automatically select
|
|
15
|
-
* proper function and fill its arguments from the conversation (maybe
|
|
16
|
-
* with user (human). And you can actually call the function by
|
|
17
|
-
* {@link ILlmController.execute} property. This is the concept of the LLM
|
|
18
|
-
* calling.
|
|
15
|
+
* [OpenAI (ChatGPT)](https://openai.com/), the LLM will automatically select
|
|
16
|
+
* the proper function and fill its arguments from the conversation (maybe
|
|
17
|
+
* chatting text) with user (human). And you can actually call the function by
|
|
18
|
+
* using {@link ILlmController.execute} property. This is the concept of the LLM
|
|
19
|
+
* function calling.
|
|
19
20
|
*
|
|
20
21
|
* Here is an example of using `typia.llm.controller()` function for AI agent
|
|
21
22
|
* development of performing such AI function calling to mobile API classes
|
|
@@ -47,21 +48,30 @@ import { ILlmApplication, ILlmController, ILlmSchema } from "@samchon/openapi";
|
|
|
47
48
|
* );
|
|
48
49
|
* ```
|
|
49
50
|
*
|
|
50
|
-
* Here is the list of available `Model` types with their corresponding LLM
|
|
51
|
-
* Reading the following list, and determine the `Model` type
|
|
52
|
-
* characteristics of the target LLM provider.
|
|
51
|
+
* Here is the list of available `Model` types with their corresponding LLM
|
|
52
|
+
* schema. Reading the following list, and determine the `Model` type
|
|
53
|
+
* considering the characteristics of the target LLM provider.
|
|
53
54
|
*
|
|
54
55
|
* - LLM provider schemas
|
|
55
|
-
*
|
|
56
|
-
* - `
|
|
57
|
-
*
|
|
58
|
-
* - `
|
|
59
|
-
*
|
|
56
|
+
*
|
|
57
|
+
* - `chatgpt`:
|
|
58
|
+
* [`IChatGptSchema`](https://samchon.github.io/openapi/api/types/IChatGptSchema-1.html)
|
|
59
|
+
* - `claude`:
|
|
60
|
+
* [`IClaudeSchema`](https://samchon.github.io/openapi/api/types/IClaudeSchema-1.html)
|
|
61
|
+
* - `deepseek`:
|
|
62
|
+
* [`IDeepSeekSchema`](https://samchon.github.io/openapi/api/types/IClaudeSchema-1.html)
|
|
63
|
+
* - `gemini`:
|
|
64
|
+
* [`IGeminiSchema`](https://samchon.github.io/openapi/api/types/IGeminiSchema-1.html)
|
|
65
|
+
* - `llama`:
|
|
66
|
+
* [`ILlamaSchema`](https://samchon.github.io/openapi/api/types/ILlamaSchema-1.html)
|
|
60
67
|
* - Middle layer schemas
|
|
68
|
+
*
|
|
61
69
|
* - `3.0`: [`ILlmSchemaV3`](https://samchon.github.io/openapi/api/types/ILlmSchemaV3-1.html)
|
|
62
70
|
* - `3.1`: [`ILlmSchemaV3_1`](https://samchon.github.io/openapi/api/types/ILlmSchemaV3_1-1.html)
|
|
63
71
|
*
|
|
64
|
-
* @
|
|
72
|
+
* @author Jeongho Nam - https://github.com/samchon
|
|
73
|
+
* @template Class Target class or interface type collecting the functions to
|
|
74
|
+
* call
|
|
65
75
|
* @template Model LLM schema model
|
|
66
76
|
* @template Config Configuration of LLM schema composition
|
|
67
77
|
* @param name Identifier name of the controller
|
|
@@ -69,24 +79,24 @@ import { ILlmApplication, ILlmController, ILlmSchema } from "@samchon/openapi";
|
|
|
69
79
|
* @param options Options for the LLM application construction
|
|
70
80
|
* @returns Controller of LLM function calling
|
|
71
81
|
* @reference https://wrtnlabs.io/agentica/docs/core/controller/typescript/
|
|
72
|
-
* @author Jeongho Nam - https://github.com/samchon
|
|
73
82
|
*/
|
|
74
83
|
export declare function controller(name: string, execute: object, options?: Partial<Pick<ILlmApplication.IOptions<any, any>, "separate" | "validate">>): never;
|
|
75
84
|
/**
|
|
76
85
|
* TypeScript functions to LLM function calling controller.
|
|
77
86
|
*
|
|
78
|
-
* Creates a controller of LLM (Large Language Model) function calling
|
|
79
|
-
*
|
|
87
|
+
* Creates a controller of LLM (Large Language Model) function calling from a
|
|
88
|
+
* TypeScript class or interface type containing the target functions to be
|
|
80
89
|
* called by the LLM function calling feature. The returned controller contains
|
|
81
|
-
* not only the {@link application} of
|
|
82
|
-
*
|
|
90
|
+
* not only the {@link application} of
|
|
91
|
+
* {@link ILlmFunction function calling schemas}, but also the
|
|
92
|
+
* {@link ILlmController.execute executor} of the functions.
|
|
83
93
|
*
|
|
84
94
|
* If you put the returned {@link ILlmController} to the LLM provider like
|
|
85
|
-
* [OpenAI (ChatGPT)](https://openai.com/), the LLM will automatically select
|
|
86
|
-
* proper function and fill its arguments from the conversation (maybe
|
|
87
|
-
* with user (human). And you can actually call the function by
|
|
88
|
-
* {@link ILlmController.execute} property. This is the concept of the LLM
|
|
89
|
-
* calling.
|
|
95
|
+
* [OpenAI (ChatGPT)](https://openai.com/), the LLM will automatically select
|
|
96
|
+
* the proper function and fill its arguments from the conversation (maybe
|
|
97
|
+
* chatting text) with user (human). And you can actually call the function by
|
|
98
|
+
* using {@link ILlmController.execute} property. This is the concept of the LLM
|
|
99
|
+
* function calling.
|
|
90
100
|
*
|
|
91
101
|
* Here is an example of using `typia.llm.controller()` function for AI agent
|
|
92
102
|
* development of performing such AI function calling to mobile API classes
|
|
@@ -118,21 +128,30 @@ export declare function controller(name: string, execute: object, options?: Part
|
|
|
118
128
|
* );
|
|
119
129
|
* ```
|
|
120
130
|
*
|
|
121
|
-
* Here is the list of available `Model` types with their corresponding LLM
|
|
122
|
-
* Reading the following list, and determine the `Model` type
|
|
123
|
-
* characteristics of the target LLM provider.
|
|
131
|
+
* Here is the list of available `Model` types with their corresponding LLM
|
|
132
|
+
* schema. Reading the following list, and determine the `Model` type
|
|
133
|
+
* considering the characteristics of the target LLM provider.
|
|
124
134
|
*
|
|
125
135
|
* - LLM provider schemas
|
|
126
|
-
*
|
|
127
|
-
* - `
|
|
128
|
-
*
|
|
129
|
-
* - `
|
|
130
|
-
*
|
|
136
|
+
*
|
|
137
|
+
* - `chatgpt`:
|
|
138
|
+
* [`IChatGptSchema`](https://samchon.github.io/openapi/api/types/IChatGptSchema-1.html)
|
|
139
|
+
* - `claude`:
|
|
140
|
+
* [`IClaudeSchema`](https://samchon.github.io/openapi/api/types/IClaudeSchema-1.html)
|
|
141
|
+
* - `deepseek`:
|
|
142
|
+
* [`IDeepSeekSchema`](https://samchon.github.io/openapi/api/types/IClaudeSchema-1.html)
|
|
143
|
+
* - `gemini`:
|
|
144
|
+
* [`IGeminiSchema`](https://samchon.github.io/openapi/api/types/IGeminiSchema-1.html)
|
|
145
|
+
* - `llama`:
|
|
146
|
+
* [`ILlamaSchema`](https://samchon.github.io/openapi/api/types/ILlamaSchema-1.html)
|
|
131
147
|
* - Middle layer schemas
|
|
148
|
+
*
|
|
132
149
|
* - `3.0`: [`ILlmSchemaV3`](https://samchon.github.io/openapi/api/types/ILlmSchemaV3-1.html)
|
|
133
150
|
* - `3.1`: [`ILlmSchemaV3_1`](https://samchon.github.io/openapi/api/types/ILlmSchemaV3_1-1.html)
|
|
134
151
|
*
|
|
135
|
-
* @
|
|
152
|
+
* @author Jeongho Nam - https://github.com/samchon
|
|
153
|
+
* @template Class Target class or interface type collecting the functions to
|
|
154
|
+
* call
|
|
136
155
|
* @template Model LLM schema model
|
|
137
156
|
* @template Config Configuration of LLM schema composition
|
|
138
157
|
* @param name Identifier name of the controller
|
|
@@ -140,15 +159,14 @@ export declare function controller(name: string, execute: object, options?: Part
|
|
|
140
159
|
* @param options Options for the LLM application construction
|
|
141
160
|
* @returns Controller of LLM function calling
|
|
142
161
|
* @reference https://wrtnlabs.io/agentica/docs/core/controller/typescript/
|
|
143
|
-
* @author Jeongho Nam - https://github.com/samchon
|
|
144
162
|
*/
|
|
145
163
|
export declare function controller<Class extends Record<string, any>, Model extends ILlmSchema.Model, Config extends Partial<ILlmSchema.ModelConfig[Model] & {
|
|
146
164
|
/**
|
|
147
165
|
* Whether to disallow superfluous properties or not.
|
|
148
166
|
*
|
|
149
|
-
* If configure as `true`, {@link validateEquals} function would be
|
|
150
|
-
*
|
|
151
|
-
*
|
|
167
|
+
* If configure as `true`, {@link validateEquals} function would be used
|
|
168
|
+
* for validation feedback, which is more strict than {@link validate}
|
|
169
|
+
* function.
|
|
152
170
|
*
|
|
153
171
|
* @default false
|
|
154
172
|
*/
|
|
@@ -159,115 +177,137 @@ export declare function controller<Class extends Record<string, any>, Model exte
|
|
|
159
177
|
*
|
|
160
178
|
* TypeScript functions to LLM function calling application.
|
|
161
179
|
*
|
|
162
|
-
* Creates an application of LLM (Large Language Model) function calling
|
|
163
|
-
* from a TypeScript class or interface type containing the target
|
|
164
|
-
* called by the LLM function calling feature.
|
|
180
|
+
* Creates an application of LLM (Large Language Model) function calling
|
|
181
|
+
* application from a TypeScript class or interface type containing the target
|
|
182
|
+
* functions to be called by the LLM function calling feature.
|
|
165
183
|
*
|
|
166
|
-
* If you put the returned {@link ILlmApplication.functions} objects to the LLM
|
|
167
|
-
* like [OpenAI (ChatGPT)](https://openai.com/), the LLM will
|
|
168
|
-
* proper function and fill its arguments from the
|
|
169
|
-
* with user (human). This is the concept of
|
|
184
|
+
* If you put the returned {@link ILlmApplication.functions} objects to the LLM
|
|
185
|
+
* provider like [OpenAI (ChatGPT)](https://openai.com/), the LLM will
|
|
186
|
+
* automatically select the proper function and fill its arguments from the
|
|
187
|
+
* conversation (maybe chatting text) with user (human). This is the concept of
|
|
188
|
+
* the LLM function calling.
|
|
170
189
|
*
|
|
171
|
-
* By the way, there can be some parameters (or their nested properties) which
|
|
172
|
-
* composed by human, not by LLM. File uploading feature or some
|
|
173
|
-
* like security keys (password) are the examples. In that
|
|
174
|
-
* function parameters to both LLM and human sides by
|
|
175
|
-
* {@link ILlmApplication.IOptions.separate} property. The
|
|
176
|
-
* assigned to the {@link ILlmFunction.separated}
|
|
190
|
+
* By the way, there can be some parameters (or their nested properties) which
|
|
191
|
+
* must be composed by human, not by LLM. File uploading feature or some
|
|
192
|
+
* sensitive information like security keys (password) are the examples. In that
|
|
193
|
+
* case, you can separate the function parameters to both LLM and human sides by
|
|
194
|
+
* configuring the {@link ILlmApplication.IOptions.separate} property. The
|
|
195
|
+
* separated parameters are assigned to the {@link ILlmFunction.separated}
|
|
196
|
+
* property.
|
|
177
197
|
*
|
|
178
198
|
* For reference, the actual function call execution is not by LLM, but by you.
|
|
179
|
-
* When the LLM selects the proper function and fills the arguments, you just
|
|
180
|
-
* the function with the LLM prepared arguments. And then informs the
|
|
181
|
-
* the LLM by system prompt. The LLM will continue the next
|
|
182
|
-
* the return value.
|
|
199
|
+
* When the LLM selects the proper function and fills the arguments, you just
|
|
200
|
+
* call the function with the LLM prepared arguments. And then informs the
|
|
201
|
+
* return value to the LLM by system prompt. The LLM will continue the next
|
|
202
|
+
* conversation based on the return value.
|
|
183
203
|
*
|
|
184
204
|
* Additionally, if you've configured {@link ILlmApplication.IOptions.separate},
|
|
185
|
-
* so that the parameters are separated to human and LLM sides, you can merge
|
|
186
|
-
* human and LLM sides' parameters into one through
|
|
187
|
-
* before the actual LLM function call
|
|
205
|
+
* so that the parameters are separated to human and LLM sides, you can merge
|
|
206
|
+
* these human and LLM sides' parameters into one through
|
|
207
|
+
* {@link HttpLlm.mergeParameters} before the actual LLM function call
|
|
208
|
+
* execution.
|
|
188
209
|
*
|
|
189
|
-
* Here is the list of available `Model` types with their corresponding LLM
|
|
190
|
-
* Reading the following list, and determine the `Model` type
|
|
191
|
-
* characteristics of the target LLM provider.
|
|
210
|
+
* Here is the list of available `Model` types with their corresponding LLM
|
|
211
|
+
* schema. Reading the following list, and determine the `Model` type
|
|
212
|
+
* considering the characteristics of the target LLM provider.
|
|
192
213
|
*
|
|
193
214
|
* - LLM provider schemas
|
|
194
|
-
*
|
|
195
|
-
* - `
|
|
196
|
-
*
|
|
197
|
-
* - `
|
|
198
|
-
*
|
|
215
|
+
*
|
|
216
|
+
* - `chatgpt`:
|
|
217
|
+
* [`IChatGptSchema`](https://github.com/samchon/openapi/blob/master/src/structures/IChatGptSchema.ts)
|
|
218
|
+
* - `claude`:
|
|
219
|
+
* [`IClaudeSchema`](https://samchon.github.io/openapi/api/types/IClaudeSchema-1.html)
|
|
220
|
+
* - `deepseek`:
|
|
221
|
+
* [`IDeepSeekSchema`](https://samchon.github.io/openapi/api/types/IClaudeSchema-1.html)
|
|
222
|
+
* - `gemini`:
|
|
223
|
+
* [`IGeminiSchema`](https://samchon.github.io/openapi/api/types/IGeminiSchema-1.html)
|
|
224
|
+
* - `llama`:
|
|
225
|
+
* [`ILlamaSchema`](https://samchon.github.io/openapi/api/types/ILlamaSchema-1.html)
|
|
199
226
|
* - Middle layer schemas
|
|
227
|
+
*
|
|
200
228
|
* - `3.0`: [`ILlmSchemaV3`](https://samchon.github.io/openapi/api/types/ILlmSchemaV3-1.html)
|
|
201
229
|
* - `3.1`: [`ILlmSchemaV3_1`](https://samchon.github.io/openapi/api/types/ILlmSchemaV3_1-1.html)
|
|
202
230
|
*
|
|
203
|
-
* @
|
|
231
|
+
* @author Jeongho Nam - https://github.com/samchon
|
|
232
|
+
* @template Class Target class or interface type collecting the functions to
|
|
233
|
+
* call
|
|
204
234
|
* @template Model LLM schema model
|
|
205
235
|
* @template Config Configuration of LLM schema composition
|
|
206
236
|
* @param options Options for the LLM application construction
|
|
207
237
|
* @returns Application of LLM function calling schemas
|
|
208
238
|
* @reference https://platform.openai.com/docs/guides/function-calling
|
|
209
|
-
* @author Jeongho Nam - https://github.com/samchon
|
|
210
239
|
*/
|
|
211
240
|
export declare function application(options?: Partial<Pick<ILlmApplication.IOptions<any, any>, "separate" | "validate">>): never;
|
|
212
241
|
/**
|
|
213
242
|
* TypeScript functions to LLM function calling application.
|
|
214
243
|
*
|
|
215
|
-
* Creates an application of LLM (Large Language Model) function calling
|
|
216
|
-
* from a TypeScript class or interface type containing the target
|
|
217
|
-
* called by the LLM function calling feature.
|
|
244
|
+
* Creates an application of LLM (Large Language Model) function calling
|
|
245
|
+
* application from a TypeScript class or interface type containing the target
|
|
246
|
+
* functions to be called by the LLM function calling feature.
|
|
218
247
|
*
|
|
219
|
-
* If you put the returned {@link ILlmApplication.functions} objects to the LLM
|
|
220
|
-
* like [OpenAI (ChatGPT)](https://openai.com/), the LLM will
|
|
221
|
-
* proper function and fill its arguments from the
|
|
222
|
-
* with user (human). This is the concept of
|
|
248
|
+
* If you put the returned {@link ILlmApplication.functions} objects to the LLM
|
|
249
|
+
* provider like [OpenAI (ChatGPT)](https://openai.com/), the LLM will
|
|
250
|
+
* automatically select the proper function and fill its arguments from the
|
|
251
|
+
* conversation (maybe chatting text) with user (human). This is the concept of
|
|
252
|
+
* the LLM function calling.
|
|
223
253
|
*
|
|
224
|
-
* By the way, there can be some parameters (or their nested properties) which
|
|
225
|
-
* composed by human, not by LLM. File uploading feature or some
|
|
226
|
-
* like security keys (password) are the examples. In that
|
|
227
|
-
* function parameters to both LLM and human sides by
|
|
228
|
-
* {@link ILlmApplication.IOptions.separate} property. The
|
|
229
|
-
* assigned to the {@link ILlmFunction.separated}
|
|
254
|
+
* By the way, there can be some parameters (or their nested properties) which
|
|
255
|
+
* must be composed by human, not by LLM. File uploading feature or some
|
|
256
|
+
* sensitive information like security keys (password) are the examples. In that
|
|
257
|
+
* case, you can separate the function parameters to both LLM and human sides by
|
|
258
|
+
* configuring the {@link ILlmApplication.IOptions.separate} property. The
|
|
259
|
+
* separated parameters are assigned to the {@link ILlmFunction.separated}
|
|
260
|
+
* property.
|
|
230
261
|
*
|
|
231
262
|
* For reference, the actual function call execution is not by LLM, but by you.
|
|
232
|
-
* When the LLM selects the proper function and fills the arguments, you just
|
|
233
|
-
* the function with the LLM prepared arguments. And then informs the
|
|
234
|
-
* the LLM by system prompt. The LLM will continue the next
|
|
235
|
-
* the return value.
|
|
263
|
+
* When the LLM selects the proper function and fills the arguments, you just
|
|
264
|
+
* call the function with the LLM prepared arguments. And then informs the
|
|
265
|
+
* return value to the LLM by system prompt. The LLM will continue the next
|
|
266
|
+
* conversation based on the return value.
|
|
236
267
|
*
|
|
237
268
|
* Additionally, if you've configured {@link ILlmApplication.IOptions.separate},
|
|
238
|
-
* so that the parameters are separated to human and LLM sides, you can merge
|
|
239
|
-
* human and LLM sides' parameters into one through
|
|
240
|
-
* before the actual LLM function call
|
|
269
|
+
* so that the parameters are separated to human and LLM sides, you can merge
|
|
270
|
+
* these human and LLM sides' parameters into one through
|
|
271
|
+
* {@link HttpLlm.mergeParameters} before the actual LLM function call
|
|
272
|
+
* execution.
|
|
241
273
|
*
|
|
242
|
-
* Here is the list of available `Model` types with their corresponding LLM
|
|
243
|
-
* Reading the following list, and determine the `Model` type
|
|
244
|
-
* characteristics of the target LLM provider.
|
|
274
|
+
* Here is the list of available `Model` types with their corresponding LLM
|
|
275
|
+
* schema. Reading the following list, and determine the `Model` type
|
|
276
|
+
* considering the characteristics of the target LLM provider.
|
|
245
277
|
*
|
|
246
278
|
* - LLM provider schemas
|
|
247
|
-
*
|
|
248
|
-
* - `
|
|
249
|
-
*
|
|
250
|
-
* - `
|
|
251
|
-
*
|
|
279
|
+
*
|
|
280
|
+
* - `chatgpt`:
|
|
281
|
+
* [`IChatGptSchema`](https://github.com/samchon/openapi/blob/master/src/structures/IChatGptSchema.ts)
|
|
282
|
+
* - `claude`:
|
|
283
|
+
* [`IClaudeSchema`](https://samchon.github.io/openapi/api/types/IClaudeSchema-1.html)
|
|
284
|
+
* - `deepseek`:
|
|
285
|
+
* [`IDeepSeekSchema`](https://samchon.github.io/openapi/api/types/IClaudeSchema-1.html)
|
|
286
|
+
* - `gemini`:
|
|
287
|
+
* [`IGeminiSchema`](https://samchon.github.io/openapi/api/types/IGeminiSchema-1.html)
|
|
288
|
+
* - `llama`:
|
|
289
|
+
* [`ILlamaSchema`](https://samchon.github.io/openapi/api/types/ILlamaSchema-1.html)
|
|
252
290
|
* - Middle layer schemas
|
|
291
|
+
*
|
|
253
292
|
* - `3.0`: [`ILlmSchemaV3`](https://samchon.github.io/openapi/api/types/ILlmSchemaV3-1.html)
|
|
254
293
|
* - `3.1`: [`ILlmSchemaV3_1`](https://samchon.github.io/openapi/api/types/ILlmSchemaV3_1-1.html)
|
|
255
294
|
*
|
|
256
|
-
* @
|
|
295
|
+
* @author Jeongho Nam - https://github.com/samchon
|
|
296
|
+
* @template Class Target class or interface type collecting the functions to
|
|
297
|
+
* call
|
|
257
298
|
* @template Model LLM schema model
|
|
258
299
|
* @template Config Configuration of LLM schema composition
|
|
259
300
|
* @param options Options for the LLM application construction
|
|
260
301
|
* @returns Application of LLM function calling schemas
|
|
261
302
|
* @reference https://platform.openai.com/docs/guides/function-calling
|
|
262
|
-
* @author Jeongho Nam - https://github.com/samchon
|
|
263
303
|
*/
|
|
264
304
|
export declare function application<Class extends Record<string, any>, Model extends ILlmSchema.Model, Config extends Partial<{
|
|
265
305
|
/**
|
|
266
306
|
* Whether to disallow superfluous properties or not.
|
|
267
307
|
*
|
|
268
|
-
* If configure as `true`, {@link validateEquals} function would be
|
|
269
|
-
*
|
|
270
|
-
*
|
|
308
|
+
* If configure as `true`, {@link validateEquals} function would be used
|
|
309
|
+
* for validation feedback, which is more strict than {@link validate}
|
|
310
|
+
* function.
|
|
271
311
|
*
|
|
272
312
|
* @default false
|
|
273
313
|
*/
|
|
@@ -278,32 +318,42 @@ export declare function application<Class extends Record<string, any>, Model ext
|
|
|
278
318
|
*
|
|
279
319
|
* TypeScript parameters to LLM parameters schema.
|
|
280
320
|
*
|
|
281
|
-
* Creates an LLM (Large Language Model) parameters schema, a type metadata that
|
|
282
|
-
* [LLM function
|
|
283
|
-
*
|
|
284
|
-
*
|
|
321
|
+
* Creates an LLM (Large Language Model) parameters schema, a type metadata that
|
|
322
|
+
* is used in the [LLM function
|
|
323
|
+
* calling](https://platform.openai.com/docs/guides/function-calling) and [LLM
|
|
324
|
+
* structured
|
|
325
|
+
* outputs](https://platform.openai.com/docs/guides/structured-outputs), from a
|
|
326
|
+
* TypeScript parameters type.
|
|
285
327
|
*
|
|
286
|
-
* For references, LLM identifies only keyworded arguments, not positional
|
|
287
|
-
* Therefore, the TypeScript parameters type must be an object type,
|
|
288
|
-
* must be static. If dynamic properties are, it will be
|
|
328
|
+
* For references, LLM identifies only keyworded arguments, not positional
|
|
329
|
+
* arguments. Therefore, the TypeScript parameters type must be an object type,
|
|
330
|
+
* and its properties must be static. If dynamic properties are, it will be
|
|
331
|
+
* compilation error.
|
|
289
332
|
*
|
|
290
|
-
* Also, such parameters type can be utilized not only for the LLM function
|
|
291
|
-
* but also for the LLM structured outputs. The LLM structured outputs
|
|
292
|
-
* that LLM (Large Language Model) can generate a structured
|
|
293
|
-
* text, by filling the parameters from the
|
|
294
|
-
* (human).
|
|
333
|
+
* Also, such parameters type can be utilized not only for the LLM function
|
|
334
|
+
* calling, but also for the LLM structured outputs. The LLM structured outputs
|
|
335
|
+
* is a feature that LLM (Large Language Model) can generate a structured
|
|
336
|
+
* output, not only a plain text, by filling the parameters from the
|
|
337
|
+
* conversation (maybe chatting text) with user (human).
|
|
295
338
|
*
|
|
296
|
-
* Here is the list of available `Model` types with their corresponding LLM
|
|
297
|
-
* Reading the following list, and determine the `Model` type
|
|
298
|
-
* characteristics of the target LLM provider.
|
|
339
|
+
* Here is the list of available `Model` types with their corresponding LLM
|
|
340
|
+
* schema. Reading the following list, and determine the `Model` type
|
|
341
|
+
* considering the characteristics of the target LLM provider.
|
|
299
342
|
*
|
|
300
343
|
* - LLM provider schemas
|
|
301
|
-
*
|
|
302
|
-
* - `
|
|
303
|
-
*
|
|
304
|
-
* - `
|
|
305
|
-
*
|
|
344
|
+
*
|
|
345
|
+
* - `chatgpt`:
|
|
346
|
+
* [`IChatGptSchema`](https://github.com/samchon/openapi/blob/master/src/structures/IChatGptSchema.ts)
|
|
347
|
+
* - `claude`:
|
|
348
|
+
* [`IClaudeSchema`](https://samchon.github.io/openapi/api/types/IClaudeSchema-1.html)
|
|
349
|
+
* - `deepseek`:
|
|
350
|
+
* [`IDeepSeekSchema`](https://samchon.github.io/openapi/api/types/IClaudeSchema-1.html)
|
|
351
|
+
* - `gemini`:
|
|
352
|
+
* [`IGeminiSchema`](https://samchon.github.io/openapi/api/types/IGeminiSchema-1.html)
|
|
353
|
+
* - `llama`:
|
|
354
|
+
* [`ILlamaSchema`](https://samchon.github.io/openapi/api/types/ILlamaSchema-1.html)
|
|
306
355
|
* - Middle layer schemas
|
|
356
|
+
*
|
|
307
357
|
* - `3.0`: [`ILlmSchemaV3`](https://samchon.github.io/openapi/api/types/ILlmSchemaV3-1.html)
|
|
308
358
|
* - `3.1`: [`ILlmSchemaV3_1`](https://samchon.github.io/openapi/api/types/ILlmSchemaV3_1-1.html)
|
|
309
359
|
*
|
|
@@ -318,32 +368,42 @@ export declare function parameters(): never;
|
|
|
318
368
|
/**
|
|
319
369
|
* TypeScript parameters to LLM parameters schema.
|
|
320
370
|
*
|
|
321
|
-
* Creates an LLM (Large Language Model) parameters schema, a type metadata that
|
|
322
|
-
* [LLM function
|
|
323
|
-
*
|
|
324
|
-
*
|
|
371
|
+
* Creates an LLM (Large Language Model) parameters schema, a type metadata that
|
|
372
|
+
* is used in the [LLM function
|
|
373
|
+
* calling](https://platform.openai.com/docs/guides/function-calling) and [LLM
|
|
374
|
+
* structured
|
|
375
|
+
* outputs](https://platform.openai.com/docs/guides/structured-outputs), from a
|
|
376
|
+
* TypeScript parameters type.
|
|
325
377
|
*
|
|
326
|
-
* For references, LLM identifies only keyworded arguments, not positional
|
|
327
|
-
* Therefore, the TypeScript parameters type must be an object type,
|
|
328
|
-
* must be static. If dynamic properties are, it will be
|
|
378
|
+
* For references, LLM identifies only keyworded arguments, not positional
|
|
379
|
+
* arguments. Therefore, the TypeScript parameters type must be an object type,
|
|
380
|
+
* and its properties must be static. If dynamic properties are, it will be
|
|
381
|
+
* compilation error.
|
|
329
382
|
*
|
|
330
|
-
* Also, such parameters type can be utilized not only for the LLM function
|
|
331
|
-
* but also for the LLM structured outputs. The LLM structured outputs
|
|
332
|
-
* that LLM (Large Language Model) can generate a structured
|
|
333
|
-
* text, by filling the parameters from the
|
|
334
|
-
* (human).
|
|
383
|
+
* Also, such parameters type can be utilized not only for the LLM function
|
|
384
|
+
* calling, but also for the LLM structured outputs. The LLM structured outputs
|
|
385
|
+
* is a feature that LLM (Large Language Model) can generate a structured
|
|
386
|
+
* output, not only a plain text, by filling the parameters from the
|
|
387
|
+
* conversation (maybe chatting text) with user (human).
|
|
335
388
|
*
|
|
336
|
-
* Here is the list of available `Model` types with their corresponding LLM
|
|
337
|
-
* Reading the following list, and determine the `Model` type
|
|
338
|
-
* characteristics of the target LLM provider.
|
|
389
|
+
* Here is the list of available `Model` types with their corresponding LLM
|
|
390
|
+
* schema. Reading the following list, and determine the `Model` type
|
|
391
|
+
* considering the characteristics of the target LLM provider.
|
|
339
392
|
*
|
|
340
393
|
* - LLM provider schemas
|
|
341
|
-
*
|
|
342
|
-
* - `
|
|
343
|
-
*
|
|
344
|
-
* - `
|
|
345
|
-
*
|
|
394
|
+
*
|
|
395
|
+
* - `chatgpt`:
|
|
396
|
+
* [`IChatGptSchema`](https://github.com/samchon/openapi/blob/master/src/structures/IChatGptSchema.ts)
|
|
397
|
+
* - `claude`:
|
|
398
|
+
* [`IClaudeSchema`](https://samchon.github.io/openapi/api/types/IClaudeSchema-1.html)
|
|
399
|
+
* - `deepseek`:
|
|
400
|
+
* [`IDeepSeekSchema`](https://samchon.github.io/openapi/api/types/IClaudeSchema-1.html)
|
|
401
|
+
* - `gemini`:
|
|
402
|
+
* [`IGeminiSchema`](https://samchon.github.io/openapi/api/types/IGeminiSchema-1.html)
|
|
403
|
+
* - `llama`:
|
|
404
|
+
* [`ILlamaSchema`](https://samchon.github.io/openapi/api/types/ILlamaSchema-1.html)
|
|
346
405
|
* - Middle layer schemas
|
|
406
|
+
*
|
|
347
407
|
* - `3.0`: [`ILlmSchemaV3`](https://samchon.github.io/openapi/api/types/ILlmSchemaV3-1.html)
|
|
348
408
|
* - `3.1`: [`ILlmSchemaV3_1`](https://samchon.github.io/openapi/api/types/ILlmSchemaV3_1-1.html)
|
|
349
409
|
*
|
|
@@ -360,97 +420,120 @@ export declare function parameters<Parameters extends Record<string, any>, Model
|
|
|
360
420
|
*
|
|
361
421
|
* TypeScript type to LLM type schema.
|
|
362
422
|
*
|
|
363
|
-
* Creates an LLM (Large Language Model) type schema, a type metadata that is
|
|
364
|
-
* [LLM function calling](@reference
|
|
365
|
-
* from a TypeScript
|
|
423
|
+
* Creates an LLM (Large Language Model) type schema, a type metadata that is
|
|
424
|
+
* used in the [LLM function calling](@reference
|
|
425
|
+
* https://platform.openai.com/docs/guides/function-calling), from a TypeScript
|
|
426
|
+
* type.
|
|
366
427
|
*
|
|
367
|
-
* The returned {@link ILlmSchema} type will be specified by the `Model`
|
|
368
|
-
* and here is the list of available `Model` types with their
|
|
369
|
-
* Reading the following list, and determine the
|
|
370
|
-
* characteristics of the target LLM provider.
|
|
428
|
+
* The returned {@link ILlmSchema} type will be specified by the `Model`
|
|
429
|
+
* argument, and here is the list of available `Model` types with their
|
|
430
|
+
* corresponding LLM schema. Reading the following list, and determine the
|
|
431
|
+
* `Model` type considering the characteristics of the target LLM provider.
|
|
371
432
|
*
|
|
372
433
|
* - LLM provider schemas
|
|
373
|
-
*
|
|
374
|
-
* - `
|
|
375
|
-
*
|
|
376
|
-
* - `
|
|
377
|
-
*
|
|
434
|
+
*
|
|
435
|
+
* - `chatgpt`:
|
|
436
|
+
* [`IChatGptSchema`](https://github.com/samchon/openapi/blob/master/src/structures/IChatGptSchema.ts)
|
|
437
|
+
* - `claude`:
|
|
438
|
+
* [`IClaudeSchema`](https://samchon.github.io/openapi/api/types/IClaudeSchema-1.html)
|
|
439
|
+
* - `deepseek`:
|
|
440
|
+
* [`IDeepSeekSchema`](https://samchon.github.io/openapi/api/types/IClaudeSchema-1.html)
|
|
441
|
+
* - `gemini`:
|
|
442
|
+
* [`IGeminiSchema`](https://samchon.github.io/openapi/api/types/IGeminiSchema-1.html)
|
|
443
|
+
* - `llama`:
|
|
444
|
+
* [`ILlamaSchema`](https://samchon.github.io/openapi/api/types/ILlamaSchema-1.html)
|
|
378
445
|
* - Middle layer schemas
|
|
446
|
+
*
|
|
379
447
|
* - `3.0`: [`ILlmSchemaV3`](https://samchon.github.io/openapi/api/types/ILlmSchemaV3-1.html)
|
|
380
448
|
* - `3.1`: [`ILlmSchemaV3_1`](https://samchon.github.io/openapi/api/types/ILlmSchemaV3_1-1.html)
|
|
381
449
|
*
|
|
382
|
-
* If you actually want to perform the LLM function calling with TypeScript
|
|
383
|
-
* you can do it with the {@link application} function. Otherwise you
|
|
384
|
-
* structured output, {@link parameters} function is better.
|
|
385
|
-
* and structured output with the native
|
|
450
|
+
* If you actually want to perform the LLM function calling with TypeScript
|
|
451
|
+
* functions, you can do it with the {@link application} function. Otherwise you
|
|
452
|
+
* hope to perform the structured output, {@link parameters} function is better.
|
|
453
|
+
* Let's enjoy the LLM function calling and structured output with the native
|
|
454
|
+
* TypeScript functions and types.
|
|
386
455
|
*
|
|
387
456
|
* > **What LLM function calling is?
|
|
388
|
-
*
|
|
457
|
+
*
|
|
389
458
|
* > LLM (Large Language Model) selects property function and fill the arguments,
|
|
390
459
|
* > but actual function call execution is not by LLM, but by you.
|
|
391
|
-
*
|
|
460
|
+
*
|
|
392
461
|
* > In nowadays, most LLM (Large Language Model) like OpenAI are supporting
|
|
393
|
-
* > "function calling" feature. The "function calling" means that LLM
|
|
394
|
-
* > a proper function and compose parameter values from the
|
|
395
|
-
* >
|
|
396
|
-
* > When LLM selects the proper function and its arguments, you just call the function
|
|
397
|
-
* > with the arguments. And then informs the return value to the LLM by system prompt,
|
|
398
|
-
* > LLM will continue the next conversation based on the return value.
|
|
462
|
+
* > "function calling" feature. The "function calling" means that LLM
|
|
463
|
+
* > automatically selects a proper function and compose parameter values from the
|
|
464
|
+
* > user's chatting text.
|
|
399
465
|
*
|
|
466
|
+
* > When LLM selects the proper function and its arguments, you just call the
|
|
467
|
+
* > function with the arguments. And then informs the return value to the LLM by
|
|
468
|
+
* > system prompt, LLM will continue the next conversation based on the return
|
|
469
|
+
* > value.
|
|
470
|
+
*
|
|
471
|
+
* @author Jeongho Nam - https://github.com/samchon
|
|
400
472
|
* @template T Target type
|
|
401
473
|
* @template Model LLM schema model
|
|
402
474
|
* @template Config Configuration of LLM schema composition
|
|
403
475
|
* @returns LLM schema
|
|
404
476
|
* @reference https://platform.openai.com/docs/guides/function-calling
|
|
405
477
|
* @reference https://platform.openai.com/docs/guides/structured-outputs
|
|
406
|
-
* @author Jeongho Nam - https://github.com/samchon
|
|
407
478
|
*/
|
|
408
479
|
export declare function schema(): never;
|
|
409
480
|
/**
|
|
410
481
|
* TypeScript type to LLM type schema.
|
|
411
482
|
*
|
|
412
|
-
* Creates an LLM (Large Language Model) type schema, a type metadata that is
|
|
413
|
-
* [LLM function calling](@reference
|
|
414
|
-
* from a TypeScript
|
|
483
|
+
* Creates an LLM (Large Language Model) type schema, a type metadata that is
|
|
484
|
+
* used in the [LLM function calling](@reference
|
|
485
|
+
* https://platform.openai.com/docs/guides/function-calling), from a TypeScript
|
|
486
|
+
* type.
|
|
415
487
|
*
|
|
416
|
-
* The returned {@link ILlmSchema} type will be specified by the `Model`
|
|
417
|
-
* and here is the list of available `Model` types with their
|
|
488
|
+
* The returned {@link ILlmSchema} type will be specified by the `Model`
|
|
489
|
+
* argument, and here is the list of available `Model` types with their
|
|
490
|
+
* corresponding LLM schema:
|
|
418
491
|
*
|
|
419
492
|
* - LLM provider schemas
|
|
420
|
-
*
|
|
421
|
-
* - `
|
|
422
|
-
*
|
|
423
|
-
* - `
|
|
424
|
-
*
|
|
493
|
+
*
|
|
494
|
+
* - `chatgpt`:
|
|
495
|
+
* [`IChatGptSchema`](https://github.com/samchon/openapi/blob/master/src/structures/IChatGptSchema.ts)
|
|
496
|
+
* - `claude`:
|
|
497
|
+
* [`IClaudeSchema`](https://samchon.github.io/openapi/api/types/IClaudeSchema-1.html)
|
|
498
|
+
* - `deepseek`:
|
|
499
|
+
* [`IDeepSeekSchema`](https://samchon.github.io/openapi/api/types/IClaudeSchema-1.html)
|
|
500
|
+
* - `gemini`:
|
|
501
|
+
* [`IGeminiSchema`](https://samchon.github.io/openapi/api/types/IGeminiSchema-1.html)
|
|
502
|
+
* - `llama`:
|
|
503
|
+
* [`ILlamaSchema`](https://samchon.github.io/openapi/api/types/ILlamaSchema-1.html)
|
|
425
504
|
* - Middle layer schemas
|
|
505
|
+
*
|
|
426
506
|
* - `3.0`: [`ILlmSchemaV3`](https://samchon.github.io/openapi/api/types/ILlmSchemaV3-1.html)
|
|
427
507
|
* - `3.1`: [`ILlmSchemaV3_1`](https://samchon.github.io/openapi/api/types/ILlmSchemaV3_1-1.html)
|
|
428
508
|
*
|
|
429
|
-
* If you actually want to perform the LLM function calling with TypeScript
|
|
430
|
-
* you can do it with the {@link application} function. Otherwise you
|
|
431
|
-
* structured output, {@link parameters} function is better.
|
|
432
|
-
* and structured output with the native
|
|
509
|
+
* If you actually want to perform the LLM function calling with TypeScript
|
|
510
|
+
* functions, you can do it with the {@link application} function. Otherwise you
|
|
511
|
+
* hope to perform the structured output, {@link parameters} function is better.
|
|
512
|
+
* Let's enjoy the LLM function calling and structured output with the native
|
|
513
|
+
* TypeScript functions and types.
|
|
433
514
|
*
|
|
434
515
|
* > **What LLM function calling is?
|
|
435
|
-
*
|
|
516
|
+
*
|
|
436
517
|
* > LLM (Large Language Model) selects property function and fill the arguments,
|
|
437
518
|
* > but actual function call execution is not by LLM, but by you.
|
|
438
|
-
*
|
|
519
|
+
*
|
|
439
520
|
* > In nowadays, most LLM (Large Language Model) like OpenAI are supporting
|
|
440
|
-
* > "function calling" feature. The "function calling" means that LLM
|
|
441
|
-
* > a proper function and compose parameter values from the
|
|
442
|
-
* >
|
|
443
|
-
*
|
|
444
|
-
* >
|
|
445
|
-
* >
|
|
521
|
+
* > "function calling" feature. The "function calling" means that LLM
|
|
522
|
+
* > automatically selects a proper function and compose parameter values from the
|
|
523
|
+
* > user's chatting text.
|
|
524
|
+
*
|
|
525
|
+
* > When LLM selects the proper function and its arguments, you just call the
|
|
526
|
+
* > function with the arguments. And then informs the return value to the LLM by
|
|
527
|
+
* > system prompt, LLM will continue the next conversation based on the return
|
|
528
|
+
* > value.
|
|
446
529
|
*
|
|
530
|
+
* @author Jeongho Nam - https://github.com/samchon
|
|
447
531
|
* @template T Target type
|
|
448
532
|
* @template Model LLM schema model
|
|
449
533
|
* @template Config Configuration of LLM schema composition
|
|
450
534
|
* @returns LLM schema
|
|
451
535
|
* @reference https://platform.openai.com/docs/guides/function-calling
|
|
452
536
|
* @reference https://platform.openai.com/docs/guides/structured-outputs
|
|
453
|
-
* @author Jeongho Nam - https://github.com/samchon
|
|
454
537
|
*/
|
|
455
538
|
export declare function schema<T, Model extends ILlmSchema.Model, Config extends Partial<ILlmSchema.ModelConfig[Model]> = {}>(...$defs: Extract<ILlmSchema.ModelSchema[Model], {
|
|
456
539
|
$ref: string;
|