File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -543,19 +543,19 @@ export default class I18nPlugin extends AdminForthPlugin {
543543
544544 const dedupRequired = Array . from ( schemaKeyToEnString . keys ( ) ) ;
545545 // call OpenAI
546- const resp = await this . options . completeAdapter . complete (
547- prompt ,
548- prompt . length * 2 ,
549- {
546+ const resp = await this . options . completeAdapter . complete ( {
547+ content : prompt ,
548+ maxTokens : prompt . length * 2 ,
549+ outputSchema : {
550550 name : "translation_response" ,
551551 schema : {
552552 type : "object" ,
553553 properties : jsonSchemaProperties ,
554554 required : dedupRequired ,
555555 additionalProperties : false ,
556556 } ,
557- }
558- ) ;
557+ } ,
558+ } ) ;
559559
560560 process . env . HEAVY_DEBUG && console . log ( `🪲🔪LLM resp >> ${ prompt . length } , <<${ resp . content . length } :\n\n` , JSON . stringify ( resp ) ) ;
561561
You can’t perform that action at this time.
0 commit comments