structured-outputs 0.1.0-beta.4 → 0.1.0-beta.6
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/esm/F.d.ts +2 -1
- package/esm/F.d.ts.map +1 -1
- package/esm/F.js +1 -1
- package/esm/F.js.map +1 -1
- package/esm/mod.d.ts +0 -5
- package/esm/mod.d.ts.map +1 -1
- package/esm/mod.js.map +1 -1
- package/package.json +1 -1
- package/src/F.ts +9 -2
- package/src/mod.ts +0 -7
package/esm/F.d.ts
CHANGED
@@ -7,7 +7,8 @@ export type F = {
|
|
7
7
|
/** The description of the function. */
|
8
8
|
description: string;
|
9
9
|
/** Parameters of the function in JSON Schema. */
|
10
|
-
parameters
|
10
|
+
parameters?: unknown;
|
11
11
|
};
|
12
|
+
export declare function F(name: string, description: string): F;
|
12
13
|
export declare function F<M extends Record<string, Ty>>(name: string, description: string, models: M, rootKey: ValidRootKey<M>): F;
|
13
14
|
//# sourceMappingURL=F.d.ts.map
|
package/esm/F.d.ts.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"F.d.ts","sourceRoot":"","sources":["../src/F.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,YAAY,CAAA;AACpC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;AAG/C,MAAM,MAAM,CAAC,GAAG;IACd,IAAI,EAAE,UAAU,CAAA;IAChB,gCAAgC;IAChC,IAAI,EAAE,MAAM,CAAA;IACZ,uCAAuC;IACvC,WAAW,EAAE,MAAM,CAAA;IACnB,iDAAiD;IACjD,UAAU,EAAE,OAAO,CAAA;
|
1
|
+
{"version":3,"file":"F.d.ts","sourceRoot":"","sources":["../src/F.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,YAAY,CAAA;AACpC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;AAG/C,MAAM,MAAM,CAAC,GAAG;IACd,IAAI,EAAE,UAAU,CAAA;IAChB,gCAAgC;IAChC,IAAI,EAAE,MAAM,CAAA;IACZ,uCAAuC;IACvC,WAAW,EAAE,MAAM,CAAA;IACnB,iDAAiD;IACjD,UAAU,CAAC,EAAE,OAAO,CAAA;CACrB,CAAA;AAED,wBAAgB,CAAC,CAAC,IAAI,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,GAAG,CAAC,CAAA;AACvD,wBAAgB,CAAC,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,EAAE,CAAC,EAC5C,IAAI,EAAE,MAAM,EACZ,WAAW,EAAE,MAAM,EACnB,MAAM,EAAE,CAAC,EACT,OAAO,EAAE,YAAY,CAAC,CAAC,CAAC,GACvB,CAAC,CAAA"}
|
package/esm/F.js
CHANGED
package/esm/F.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"F.js","sourceRoot":"","sources":["../src/F.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAA;
|
1
|
+
{"version":3,"file":"F.js","sourceRoot":"","sources":["../src/F.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAA;AAmBpC,MAAM,UAAU,CAAC,CACf,IAAY,EACZ,WAAmB,EACnB,MAAU,EACV,OAAyB;IAEzB,OAAO;QACL,IAAI,EAAE,UAAU;QAChB,IAAI;QACJ,WAAW;QACX,UAAU,EAAE,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,MAAM,EAAE,OAAQ,CAAC,CAAC,CAAC,CAAC,SAAS;KAC1D,CAAA;AACH,CAAC"}
|
package/esm/mod.d.ts
CHANGED
@@ -1,8 +1,3 @@
|
|
1
|
-
import type { ArrayTy } from "./array.js";
|
2
|
-
import type { NumberTy } from "./number.js";
|
3
|
-
import type { ObjectTy } from "./object.js";
|
4
|
-
import type { StringTy } from "./string.js";
|
5
|
-
export type RootTy = NumberTy | StringTy | ObjectTy | ArrayTy;
|
6
1
|
export * from "./array.js";
|
7
2
|
export * from "./common.js";
|
8
3
|
export * from "./F.js";
|
package/esm/mod.d.ts.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"mod.d.ts","sourceRoot":"","sources":["../src/mod.ts"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"mod.d.ts","sourceRoot":"","sources":["../src/mod.ts"],"names":[],"mappings":"AAEA,cAAc,YAAY,CAAA;AAC1B,cAAc,aAAa,CAAA;AAC3B,cAAc,QAAQ,CAAA;AACtB,cAAc,cAAc,CAAA;AAC5B,cAAc,aAAa,CAAA;AAC3B,cAAc,aAAa,CAAA;AAC3B,cAAc,qBAAqB,CAAA;AACnC,cAAc,aAAa,CAAA;AAC3B,cAAc,aAAa,CAAA;AAC3B,cAAc,YAAY,CAAA"}
|
package/esm/mod.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"mod.js","sourceRoot":"","sources":["../src/mod.ts"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"mod.js","sourceRoot":"","sources":["../src/mod.ts"],"names":[],"mappings":"AAAA,+CAA+C;AAE/C,cAAc,YAAY,CAAA;AAC1B,cAAc,aAAa,CAAA;AAC3B,cAAc,QAAQ,CAAA;AACtB,cAAc,cAAc,CAAA;AAC5B,cAAc,aAAa,CAAA;AAC3B,cAAc,aAAa,CAAA;AAC3B,cAAc,qBAAqB,CAAA;AACnC,cAAc,aAAa,CAAA;AAC3B,cAAc,aAAa,CAAA;AAC3B,cAAc,YAAY,CAAA"}
|
package/package.json
CHANGED
package/src/F.ts
CHANGED
@@ -9,19 +9,26 @@ export type F = {
|
|
9
9
|
/** The description of the function. */
|
10
10
|
description: string
|
11
11
|
/** Parameters of the function in JSON Schema. */
|
12
|
-
parameters
|
12
|
+
parameters?: unknown
|
13
13
|
}
|
14
14
|
|
15
|
+
export function F(name: string, description: string): F
|
15
16
|
export function F<M extends Record<string, Ty>>(
|
16
17
|
name: string,
|
17
18
|
description: string,
|
18
19
|
models: M,
|
19
20
|
rootKey: ValidRootKey<M>,
|
21
|
+
): F
|
22
|
+
export function F<M extends Record<string, Ty>>(
|
23
|
+
name: string,
|
24
|
+
description: string,
|
25
|
+
models?: M,
|
26
|
+
rootKey?: ValidRootKey<M>,
|
20
27
|
): F {
|
21
28
|
return {
|
22
29
|
type: "function",
|
23
30
|
name,
|
24
31
|
description,
|
25
|
-
parameters: schema(models, rootKey),
|
32
|
+
parameters: models ? schema(models, rootKey!) : undefined,
|
26
33
|
}
|
27
34
|
}
|
package/src/mod.ts
CHANGED
@@ -1,10 +1,3 @@
|
|
1
|
-
import type { ArrayTy } from "./array.js"
|
2
|
-
import type { NumberTy } from "./number.js"
|
3
|
-
import type { ObjectTy } from "./object.js"
|
4
|
-
import type { StringTy } from "./string.js"
|
5
|
-
|
6
|
-
export type RootTy = NumberTy | StringTy | ObjectTy | ArrayTy
|
7
|
-
|
8
1
|
// moderate --exclude _base.ts code_critique.ts
|
9
2
|
|
10
3
|
export * from "./array.js"
|