mirror of
https://github.com/n8n-io/n8n.git
synced 2025-03-05 20:50:17 -08:00
feat(Embeddings OpenAI Node, Embeddings Azure OpenAI Node): Add dimensions option (#11773)
This commit is contained in:
parent
a544b74d87
commit
de01a8a01d
|
@ -87,6 +87,36 @@ export class EmbeddingsAzureOpenAi implements INodeType {
|
||||||
'Maximum amount of time a request is allowed to take in seconds. Set to -1 for no timeout.',
|
'Maximum amount of time a request is allowed to take in seconds. Set to -1 for no timeout.',
|
||||||
type: 'number',
|
type: 'number',
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
displayName: 'Dimensions',
|
||||||
|
name: 'dimensions',
|
||||||
|
default: undefined,
|
||||||
|
description:
|
||||||
|
'The number of dimensions the resulting output embeddings should have. Only supported in text-embedding-3 and later models.',
|
||||||
|
type: 'options',
|
||||||
|
options: [
|
||||||
|
{
|
||||||
|
name: '256',
|
||||||
|
value: 256,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: '512',
|
||||||
|
value: 512,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: '1024',
|
||||||
|
value: 1024,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: '1536',
|
||||||
|
value: 1536,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: '3072',
|
||||||
|
value: 3072,
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
|
@ -105,6 +135,7 @@ export class EmbeddingsAzureOpenAi implements INodeType {
|
||||||
batchSize?: number;
|
batchSize?: number;
|
||||||
stripNewLines?: boolean;
|
stripNewLines?: boolean;
|
||||||
timeout?: number;
|
timeout?: number;
|
||||||
|
dimensions?: number | undefined;
|
||||||
};
|
};
|
||||||
|
|
||||||
if (options.timeout === -1) {
|
if (options.timeout === -1) {
|
||||||
|
|
|
@ -135,6 +135,36 @@ export class EmbeddingsOpenAi implements INodeType {
|
||||||
type: 'collection',
|
type: 'collection',
|
||||||
default: {},
|
default: {},
|
||||||
options: [
|
options: [
|
||||||
|
{
|
||||||
|
displayName: 'Dimensions',
|
||||||
|
name: 'dimensions',
|
||||||
|
default: undefined,
|
||||||
|
description:
|
||||||
|
'The number of dimensions the resulting output embeddings should have. Only supported in text-embedding-3 and later models.',
|
||||||
|
type: 'options',
|
||||||
|
options: [
|
||||||
|
{
|
||||||
|
name: '256',
|
||||||
|
value: 256,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: '512',
|
||||||
|
value: 512,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: '1024',
|
||||||
|
value: 1024,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: '1536',
|
||||||
|
value: 1536,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: '3072',
|
||||||
|
value: 3072,
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
{
|
{
|
||||||
displayName: 'Base URL',
|
displayName: 'Base URL',
|
||||||
name: 'baseURL',
|
name: 'baseURL',
|
||||||
|
@ -179,6 +209,7 @@ export class EmbeddingsOpenAi implements INodeType {
|
||||||
batchSize?: number;
|
batchSize?: number;
|
||||||
stripNewLines?: boolean;
|
stripNewLines?: boolean;
|
||||||
timeout?: number;
|
timeout?: number;
|
||||||
|
dimensions?: number | undefined;
|
||||||
};
|
};
|
||||||
|
|
||||||
if (options.timeout === -1) {
|
if (options.timeout === -1) {
|
||||||
|
|
Loading…
Reference in a new issue