mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 10:02:05 +00:00
fix(OpenAI Node): Message text operation parameters case fix (#8804)
This commit is contained in:
@@ -171,6 +171,16 @@ export async function execute(this: IExecuteFunctions, i: number): Promise<INode
|
|||||||
const options = this.getNodeParameter('options', i, {});
|
const options = this.getNodeParameter('options', i, {});
|
||||||
const jsonOutput = this.getNodeParameter('jsonOutput', i, false) as boolean;
|
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;
|
let response_format;
|
||||||
if (jsonOutput) {
|
if (jsonOutput) {
|
||||||
response_format = { type: 'json_object' };
|
response_format = { type: 'json_object' };
|
||||||
|
|||||||
Reference in New Issue
Block a user