typia 12.0.0 → 12.0.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/README.md
CHANGED
|
@@ -23,12 +23,12 @@ export namespace json {
|
|
|
23
23
|
export function assertStringify<T>(input: T): string; // safe and faster
|
|
24
24
|
}
|
|
25
25
|
|
|
26
|
-
// AI FUNCTION CALLING
|
|
26
|
+
// AI FUNCTION CALLING HARNESS
|
|
27
27
|
export namespace llm {
|
|
28
28
|
// collection of function calling schemas + validators/parsers
|
|
29
29
|
export function application<Class>(): ILlmApplication<Class>;
|
|
30
30
|
export function structuredOutput<P>(): ILlmStructuredOutput;
|
|
31
|
-
// lenient json parser + type
|
|
31
|
+
// lenient json parser + type coercion
|
|
32
32
|
export function parse<T>(str: string): T;
|
|
33
33
|
}
|
|
34
34
|
|
|
@@ -47,7 +47,7 @@ export function random<T>(g?: Partial<IRandomGenerator>): T;
|
|
|
47
47
|
|
|
48
48
|
- Super-fast Runtime Validators
|
|
49
49
|
- Enhanced JSON schema and serde functions
|
|
50
|
-
- LLM function calling
|
|
50
|
+
- LLM function calling harness
|
|
51
51
|
- Protocol Buffer encoder and decoder
|
|
52
52
|
- Random data generator
|
|
53
53
|
|
|
@@ -56,6 +56,7 @@ export function random<T>(g?: Partial<IRandomGenerator>): T;
|
|
|
56
56
|
> - **Only one line** required, with pure TypeScript type
|
|
57
57
|
> - Runtime validator is **20,000x faster** than `class-validator`
|
|
58
58
|
> - JSON serialization is **200x faster** than `class-transformer`
|
|
59
|
+
> - LLM function calling harness turns **6.75% → 100%** accuracy
|
|
59
60
|
|
|
60
61
|
## Transformation
|
|
61
62
|
If you call `typia` function, it would be compiled like below.
|
|
@@ -87,10 +88,7 @@ Thanks for your support.
|
|
|
87
88
|
|
|
88
89
|
Your donation encourages `typia` development.
|
|
89
90
|
|
|
90
|
-
Also, `typia` is re-distributing
|
|
91
|
-
|
|
92
|
-
- [`nonara/ts-patch`](https://github.com/nonara/ts-patch)
|
|
93
|
-
- [`ryoppippi/unplugin-typia`](https://github.com/ryoppippi/unplugin-typia)
|
|
91
|
+
Also, `typia` is re-distributing quarter of donations to [`nonara/ts-patch`](https://github.com/nonara/ts-patch).
|
|
94
92
|
|
|
95
93
|
[](https://opencollective.com/typia)
|
|
96
94
|
|
|
@@ -124,13 +122,11 @@ Check out the document in the [website](https://typia.io/docs/):
|
|
|
124
122
|
- [JSON Schema](https://typia.io/docs/json/schema/)
|
|
125
123
|
- [`stringify()` functions](https://typia.io/docs/json/stringify/)
|
|
126
124
|
- [`parse()` functions](https://typia.io/docs/json/parse/)
|
|
127
|
-
- LLM Function Calling
|
|
125
|
+
- LLM Function Calling Harness
|
|
128
126
|
- [`application()` function](https://typia.io/docs/llm/application/)
|
|
129
127
|
- [`structuredOutput()` function](https://typia.io/docs/llm/structuredOutput/)
|
|
128
|
+
- [`HttpLlm` module](https://typia.io/docs/llm/http/)
|
|
130
129
|
- [`LlmJson` module](https://typia.io/docs/llm/json/)
|
|
131
|
-
- [MCP (Model Context Protocol)](https://typia.io/docs/llm/mcp/)
|
|
132
|
-
- [Vercel AI SDK](https://typia.io/docs/llm/vercel/)
|
|
133
|
-
- [LangChain](https://typia.io/docs/llm/langchain/)
|
|
134
130
|
- Protocol Buffer
|
|
135
131
|
- [Message Schema](https://typia.io/docs/protobuf/message)
|
|
136
132
|
- [`decode()` functions](https://typia.io/docs/protobuf/decode/)
|
|
@@ -141,6 +137,9 @@ Check out the document in the [website](https://typia.io/docs/):
|
|
|
141
137
|
### 🔗 Appendix
|
|
142
138
|
- [API Documents](https://typia.io/api)
|
|
143
139
|
- Utilization Cases
|
|
140
|
+
- [MCP](https://typia.io/docs/utilization/mcp/)
|
|
141
|
+
- [Vercel AI SDK](https://typia.io/docs/utilization/vercel/)
|
|
142
|
+
- [LangChain](https://typia.io/docs/utilization/langchain/)
|
|
144
143
|
- [NestJS](https://typia.io/docs/utilization/nestjs/)
|
|
145
144
|
- [tRPC](https://typia.io/docs/utilization/trpc/)
|
|
146
145
|
- [⇲ Benchmark Result](https://github.com/samchon/typia/tree/master/benchmark/results/11th%20Gen%20Intel(R)%20Core(TM)%20i5-1135G7%20%40%202.40GHz)
|
|
@@ -1,4 +1,2 @@
|
|
|
1
1
|
import { ILlmApplication } from "@typia/interface";
|
|
2
|
-
export declare const _llmApplicationFinalize: <Class extends object = any>(app: ILlmApplication.__IPrimitive<Class>, config?: Partial<Pick<ILlmApplication.IConfig, "validate"
|
|
3
|
-
equals?: boolean;
|
|
4
|
-
}>) => ILlmApplication<Class>;
|
|
2
|
+
export declare const _llmApplicationFinalize: <Class extends object = any>(app: ILlmApplication.__IPrimitive<Class>, config?: Partial<Pick<ILlmApplication.IConfig, "validate">>) => ILlmApplication<Class>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"_llmApplicationFinalize.js","sourceRoot":"","sources":["../../src/internal/_llmApplicationFinalize.ts"],"names":[],"mappings":";;;AACA,wCAA2D;AAEpD,MAAM,uBAAuB,GAAG,CACrC,GAAwC,EACxC,
|
|
1
|
+
{"version":3,"file":"_llmApplicationFinalize.js","sourceRoot":"","sources":["../../src/internal/_llmApplicationFinalize.ts"],"names":[],"mappings":";;;AACA,wCAA2D;AAEpD,MAAM,uBAAuB,GAAG,CACrC,GAAwC,EACxC,MAA2D,EACnC,EAAE;;IAAC,OAAA,iCACxB,GAAG,KACN,MAAM,kCACD,0BAAkB,CAAC,SAAS,EAAE,KACjC,QAAQ,EAAE,MAAA,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,QAAQ,mCAAI,IAAI,KAEpC,SAAS,EAAE,GAAG,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE;;YAAC,OAAA,iCAClC,IAAI,KACP,KAAK,EAAE,CAAC,KAAa,EAA6B,EAAE,CAClD,eAAO,CAAC,KAAK,CAAC,KAAK,EAAE,IAAI,CAAC,UAAU,CAAC,EACvC,MAAM,EAAE,CAAC,KAAc,EAAW,EAAE,CAAC,eAAO,CAAC,MAAM,CAAC,KAAK,EAAE,IAAI,CAAC,UAAU,CAAC,EAC3E,QAAQ,EAAE,MAAA,MAAA,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,QAAQ,0CAAG,IAAI,CAAC,IAAI,CAAC,mCAAI,IAAI,CAAC,QAAQ,IACxD,CAAA;SAAA,CAAC,IACH,CAAA;CAAA,CAAC;AAhBU,QAAA,uBAAuB,2BAgBjC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"_llmApplicationFinalize.mjs","sources":["../../src/internal/_llmApplicationFinalize.ts"],"sourcesContent":[null],"names":[],"mappings":";;AAGO,MAAM,uBAAuB,GAAG,CACrC,GAAwC,EACxC,
|
|
1
|
+
{"version":3,"file":"_llmApplicationFinalize.mjs","sources":["../../src/internal/_llmApplicationFinalize.ts"],"sourcesContent":[null],"names":[],"mappings":";;AAGO,MAAM,uBAAuB,GAAG,CACrC,GAAwC,EACxC,MAA2D,MAC/B;AAC5B,IAAA,GAAG,GAAG;AACN,IAAA,MAAM,EAAE;QACN,GAAG,kBAAkB,CAAC,SAAS,EAAE;AACjC,QAAA,QAAQ,EAAE,MAAM,EAAE,QAAQ,IAAI,IAAI;AACnC,KAAA;AACD,IAAA,SAAS,EAAE,GAAG,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,IAAI,MAAM;AACtC,QAAA,GAAG,IAAI;AACP,QAAA,KAAK,EAAE,CAAC,KAAa,KACnB,OAAO,CAAC,KAAK,CAAC,KAAK,EAAE,IAAI,CAAC,UAAU,CAAC;AACvC,QAAA,MAAM,EAAE,CAAC,KAAc,KAAc,OAAO,CAAC,MAAM,CAAC,KAAK,EAAE,IAAI,CAAC,UAAU,CAAC;AAC3E,QAAA,QAAQ,EAAE,MAAM,EAAE,QAAQ,GAAG,IAAI,CAAC,IAAI,CAAC,IAAI,IAAI,CAAC,QAAQ;AACzD,KAAA,CAAC,CAAC;AACJ,CAAA;;;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "typia",
|
|
3
|
-
"version": "12.0.
|
|
3
|
+
"version": "12.0.2",
|
|
4
4
|
"description": "Superfast runtime validators with only one line",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"exports": {
|
|
@@ -46,10 +46,10 @@
|
|
|
46
46
|
"inquirer": "^8.2.5",
|
|
47
47
|
"package-manager-detector": "^0.2.0",
|
|
48
48
|
"randexp": "^0.5.3",
|
|
49
|
-
"@typia/
|
|
50
|
-
"@typia/
|
|
51
|
-
"@typia/utils": "^12.0.
|
|
52
|
-
"@typia/
|
|
49
|
+
"@typia/interface": "^12.0.2",
|
|
50
|
+
"@typia/transform": "^12.0.2",
|
|
51
|
+
"@typia/utils": "^12.0.2",
|
|
52
|
+
"@typia/core": "^12.0.2"
|
|
53
53
|
},
|
|
54
54
|
"peerDependencies": {
|
|
55
55
|
"typescript": ">=4.8.0 <5.10.0"
|
|
@@ -3,11 +3,7 @@ import { LlmJson, LlmSchemaConverter } from "@typia/utils";
|
|
|
3
3
|
|
|
4
4
|
export const _llmApplicationFinalize = <Class extends object = any>(
|
|
5
5
|
app: ILlmApplication.__IPrimitive<Class>,
|
|
6
|
-
config?: Partial<
|
|
7
|
-
Pick<ILlmApplication.IConfig, "validate"> & {
|
|
8
|
-
equals?: boolean;
|
|
9
|
-
}
|
|
10
|
-
>,
|
|
6
|
+
config?: Partial<Pick<ILlmApplication.IConfig, "validate">>,
|
|
11
7
|
): ILlmApplication<Class> => ({
|
|
12
8
|
...app,
|
|
13
9
|
config: {
|