mirror of
https://github.com/n8n-io/n8n.git
synced 2024-11-09 22:24:05 -08:00
fix(OpenAI Node): Message text operation parameters case fix (#8804)
This commit is contained in:
parent
4850f6a9cc
commit
e38e96bbec
|
@ -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' };
|
||||
|
|
Loading…
Reference in a new issue