Skip to content

Commit

Permalink
fix(OpenAI Node): Message text operation parameters case fix (#8804)
Browse files Browse the repository at this point in the history
  • Loading branch information
michael-radency authored Mar 5, 2024
1 parent 4850f6a commit e38e96b
Showing 1 changed file with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,16 @@ export async function execute(this: IExecuteFunctions, i: number): Promise<INode
const options = this.getNodeParameter('options', i, {});
const jsonOutput = this.getNodeParameter('jsonOutput', i, false) as boolean;

if (options.maxTokens !== undefined) {
options.max_tokens = options.maxTokens;
delete options.maxTokens;
}

if (options.topP !== undefined) {
options.top_p = options.topP;
delete options.topP;
}

let response_format;
if (jsonOutput) {
response_format = { type: 'json_object' };
Expand Down

0 comments on commit e38e96b

Please sign in to comment.