Skip to content

Commit e7ebe40

Browse files
committed
fix: add prop fillPlainFieldsMaxTokens for text -> text generation
1 parent c76ac24 commit e7ebe40

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

index.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,8 @@ export default class BulkAiFlowPlugin extends AdminForthPlugin {
285285
Each object must contain the following fields: ${JSON.stringify(compiledOutputFields)} Use the exact field names.
286286
If it's number field - return only number.`;
287287
//send prompt to OpenAI and get response
288-
const { content: chatResponse } = await this.options.textCompleteAdapter.complete(prompt, [], 500);
288+
const numberOfTokens = this.options.fillPlainFieldsMaxTokens ? this.options.fillPlainFieldsMaxTokens : 1000;
289+
const { content: chatResponse } = await this.options.textCompleteAdapter.complete(prompt, [], numberOfTokens);
289290

290291
const resp: any = (chatResponse as any).response;
291292
const topLevelError = (chatResponse as any).error;

0 commit comments

Comments
 (0)