Skip to content

Commit 60017a8

Browse files
committed
fix: update JSON schema to disallow additional properties in translation response
1 parent 6ec0ac9 commit 60017a8

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

index.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -538,17 +538,15 @@ export default class I18nPlugin extends AdminForthPlugin {
538538
// call OpenAI
539539
const resp = await this.options.completeAdapter.complete(
540540
prompt,
541-
[],
542541
prompt.length * 2,
543542
{
544-
json_schema: {
545543
name: "translation_response",
546544
schema: {
547545
type: "object",
548546
properties: jsonSchemaProperties,
549547
required: dedupRequired,
548+
additionalProperties: false,
550549
},
551-
},
552550
}
553551
);
554552

0 commit comments

Comments
 (0)