feat(OpenAI Node): Add frequency-penalty and presence-penalty (#5137)

This commit is contained in:
Ashish Ahuja 2023-02-02 17:48:11 +05:30 committed by GitHub
parent 6d811f0d9f
commit 04c058a34e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -379,6 +379,21 @@ const sharedOperations: INodeProperties[] = [
},
},
},
{
displayName: 'Frequency Penalty',
name: 'frequency_penalty',
default: 0,
typeOptions: { maxValue: 2, minValue: -2, numberPrecision: 1 },
description:
"Positive values penalize new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim",
type: 'number',
routing: {
send: {
type: 'body',
property: 'frequency_penalty',
},
},
},
{
displayName: 'Maximum Number of Tokens',
name: 'maxTokens',
@ -415,6 +430,21 @@ const sharedOperations: INodeProperties[] = [
},
},
},
{
displayName: 'Presence Penalty',
name: 'presence_penalty',
default: 0,
typeOptions: { maxValue: 2, minValue: -2, numberPrecision: 1 },
description:
"Positive values penalize new tokens based on whether they appear in the text so far, increasing the model's likelihood to talk about new topics",
type: 'number',
routing: {
send: {
type: 'body',
property: 'presence_penalty',
},
},
},
{
displayName: 'Sampling Temperature',
name: 'temperature',