feat(editor): Node Creator AI nodes improvements (#9484)

Signed-off-by: Oleg Ivaniv <me@olegivaniv.com>
This commit is contained in:
oleg
2024-05-30 16:53:33 +02:00
committed by GitHub
parent e68a3fd6ce
commit be4f54de15
62 changed files with 661 additions and 204 deletions

View File

@@ -247,7 +247,7 @@ export class Agent implements INodeType {
alias: ['LangChain'],
categories: ['AI'],
subcategories: {
AI: ['Agents'],
AI: ['Agents', 'Root Nodes'],
},
resources: {
primaryDocumentation: [

View File

@@ -31,7 +31,7 @@ export class OpenAiAssistant implements INodeType {
alias: ['LangChain'],
categories: ['AI'],
subcategories: {
AI: ['Agents'],
AI: ['Agents', 'Root Nodes'],
},
resources: {
primaryDocumentation: [

View File

@@ -257,7 +257,7 @@ export class ChainLlm implements INodeType {
alias: ['LangChain'],
categories: ['AI'],
subcategories: {
AI: ['Chains'],
AI: ['Chains', 'Root Nodes'],
},
resources: {
primaryDocumentation: [

View File

@@ -30,7 +30,7 @@ export class ChainRetrievalQa implements INodeType {
alias: ['LangChain'],
categories: ['AI'],
subcategories: {
AI: ['Chains'],
AI: ['Chains', 'Root Nodes'],
},
resources: {
primaryDocumentation: [

View File

@@ -16,7 +16,7 @@ export class ChainSummarization extends VersionedNodeType {
alias: ['LangChain'],
categories: ['AI'],
subcategories: {
AI: ['Chains'],
AI: ['Chains', 'Root Nodes'],
},
resources: {
primaryDocumentation: [

View File

@@ -77,7 +77,7 @@ export class MemoryManager implements INodeType {
codex: {
categories: ['AI'],
subcategories: {
AI: ['Miscellaneous'],
AI: ['Miscellaneous', 'Root Nodes'],
},
resources: {
primaryDocumentation: [

View File

@@ -146,6 +146,79 @@ export class OutputParserStructured implements INodeType {
}
}`,
},
{
displayName: 'Schema Type',
name: 'schemaType',
type: 'options',
noDataExpression: true,
options: [
{
name: 'Generate From JSON Example',
value: 'fromJson',
description: 'Generate a schema from an example JSON object',
},
{
name: 'Define Below',
value: 'manual',
description: 'Define the JSON schema manually',
},
],
default: 'fromJson',
description: 'How to specify the schema for the function',
displayOptions: {
show: {
'@version': [{ _cnd: { gte: 1.2 } }],
},
},
},
{
displayName: 'JSON Example',
name: 'jsonSchemaExample',
type: 'json',
default: `{
"state": "California",
"cities": ["Los Angeles", "San Francisco", "San Diego"]
}`,
noDataExpression: true,
typeOptions: {
rows: 10,
},
displayOptions: {
show: {
schemaType: ['fromJson'],
},
},
description: 'Example JSON object to use to generate the schema',
},
{
displayName: 'Input Schema',
name: 'inputSchema',
type: 'json',
default: `{
"type": "object",
"properties": {
"state": {
"type": "string"
},
"cities": {
"type": "array",
"items": {
"type": "string"
}
}
}
}`,
noDataExpression: true,
typeOptions: {
rows: 10,
},
displayOptions: {
show: {
schemaType: ['manual'],
},
},
description: 'Schema to use for the function',
},
{
displayName: 'JSON Schema',
name: 'jsonSchema',

View File

@@ -34,9 +34,6 @@ export class ChatTrigger implements INodeType {
},
],
},
subcategories: {
'Core Nodes': ['Other Trigger Nodes'],
},
},
supportsCORS: true,
maxNodes: 1,

View File

@@ -79,7 +79,7 @@ export const versionDescription: INodeTypeDescription = {
alias: ['LangChain', 'ChatGPT', 'DallE'],
categories: ['AI'],
subcategories: {
AI: ['Agents', 'Miscellaneous'],
AI: ['Agents', 'Miscellaneous', 'Root Nodes'],
},
resources: {
primaryDocumentation: [