mirror of
https://github.com/n8n-io/n8n.git
synced 2025-01-12 05:17:28 -08:00
feat(OpenAI Node): Add frequency-penalty and presence-penalty (#5137)
This commit is contained in:
parent
6d811f0d9f
commit
04c058a34e
|
@ -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',
|
displayName: 'Maximum Number of Tokens',
|
||||||
name: 'maxTokens',
|
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',
|
displayName: 'Sampling Temperature',
|
||||||
name: 'temperature',
|
name: 'temperature',
|
||||||
|
|
Loading…
Reference in a new issue