@budibase/shared-core 3.24.1 → 3.24.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/dist/helpers/index.d.ts
CHANGED
|
@@ -8,6 +8,7 @@ export declare const cron: {
|
|
|
8
8
|
validate: typeof validate;
|
|
9
9
|
};
|
|
10
10
|
export * as schema from "./schema";
|
|
11
|
+
export * as structuredOutput from "./structuredOutput";
|
|
11
12
|
export * as views from "./views";
|
|
12
13
|
export * as roles from "./roles";
|
|
13
14
|
export * as lists from "./lists";
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Normalizes a JSON schema to be compatible with OpenAI structured output.
|
|
3
|
+
* This is the strictest format, so schemas that pass OpenAI validation should hopefully work with other .
|
|
4
|
+
* Fixes:
|
|
5
|
+
* - Adds `additionalProperties: false` to all object schemas (required by OpenAI)
|
|
6
|
+
* - Converts `required: true` boolean to proper array format
|
|
7
|
+
* - Ensures top-level type is "object" (wraps arrays if needed)
|
|
8
|
+
*/
|
|
9
|
+
export declare function normalizeSchemaForStructuredOutput(schema: Record<string, unknown>): Record<string, unknown>;
|