mirror of
https://github.com/farcasclaudiu/Flowise.git
synced 2026-06-29 03:01:10 +03:00
disabled ouput parser streaming
This commit is contained in:
+3
-4
@@ -1,4 +1,4 @@
|
||||
import { getBaseClasses, ICommonObject, INode, INodeData, INodeParams } from '../../../src'
|
||||
import { getBaseClasses, INode, INodeData, INodeParams } from '../../../src'
|
||||
import { BaseOutputParser } from 'langchain/schema/output_parser'
|
||||
import { CommaSeparatedListOutputParser } from 'langchain/output_parsers'
|
||||
import { CATEGORY } from '../OutputParserHelpers'
|
||||
@@ -29,14 +29,13 @@ class CSVListOutputParser implements INode {
|
||||
label: 'Autofix',
|
||||
name: 'autofixParser',
|
||||
type: 'boolean',
|
||||
rows: 4,
|
||||
optional: true,
|
||||
description: 'In the event that the first call fails, will make another call to the model to fix any errors.'
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
// eslint-disable-next-line unused-imports/no-unused-vars
|
||||
async init(nodeData: INodeData, _: string, options: ICommonObject): Promise<any> {
|
||||
async init(nodeData: INodeData): Promise<any> {
|
||||
const autoFix = nodeData.inputs?.autofixParser as boolean
|
||||
|
||||
const commaSeparatedListOutputParser = new CommaSeparatedListOutputParser()
|
||||
|
Before Width: | Height: | Size: 8.3 KiB After Width: | Height: | Size: 8.3 KiB |
+4
-4
@@ -1,4 +1,4 @@
|
||||
import { getBaseClasses, ICommonObject, INode, INodeData, INodeParams } from '../../../src'
|
||||
import { getBaseClasses, INode, INodeData, INodeParams } from '../../../src'
|
||||
import { BaseOutputParser } from 'langchain/schema/output_parser'
|
||||
import { CustomListOutputParser as LangchainCustomListOutputParser } from 'langchain/output_parsers'
|
||||
import { CATEGORY } from '../OutputParserHelpers'
|
||||
@@ -44,19 +44,19 @@ class CustomListOutputParser implements INode {
|
||||
label: 'Autofix',
|
||||
name: 'autofixParser',
|
||||
type: 'boolean',
|
||||
rows: 4,
|
||||
optional: true,
|
||||
description: 'In the event that the first call fails, will make another call to the model to fix any errors.'
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
// eslint-disable-next-line unused-imports/no-unused-vars
|
||||
async init(nodeData: INodeData, _: string, options: ICommonObject): Promise<any> {
|
||||
async init(nodeData: INodeData): Promise<any> {
|
||||
const separator = nodeData.inputs?.separator as string
|
||||
const lengthStr = nodeData.inputs?.length as string
|
||||
const autoFix = nodeData.inputs?.autofixParser as boolean
|
||||
let length = 5
|
||||
if (lengthStr) length = parseInt(lengthStr, 10)
|
||||
|
||||
const parser = new LangchainCustomListOutputParser({ length: length, separator: separator })
|
||||
Object.defineProperty(parser, 'autoFix', {
|
||||
enumerable: true,
|
||||
|
Before Width: | Height: | Size: 4.9 KiB After Width: | Height: | Size: 4.9 KiB |
+3
-4
@@ -1,4 +1,4 @@
|
||||
import { getBaseClasses, ICommonObject, INode, INodeData, INodeParams } from '../../../src'
|
||||
import { getBaseClasses, INode, INodeData, INodeParams } from '../../../src'
|
||||
import { BaseOutputParser } from 'langchain/schema/output_parser'
|
||||
import { StructuredOutputParser as LangchainStructuredOutputParser } from 'langchain/output_parsers'
|
||||
import { CATEGORY } from '../OutputParserHelpers'
|
||||
@@ -53,14 +53,13 @@ class StructuredOutputParser implements INode {
|
||||
label: 'Autofix',
|
||||
name: 'autofixParser',
|
||||
type: 'boolean',
|
||||
rows: 4,
|
||||
optional: true,
|
||||
description: 'In the event that the first call fails, will make another call to the model to fix any errors.'
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
// eslint-disable-next-line unused-imports/no-unused-vars
|
||||
async init(nodeData: INodeData, _: string, options: ICommonObject): Promise<any> {
|
||||
async init(nodeData: INodeData): Promise<any> {
|
||||
const structureType = nodeData.inputs?.structureType as string
|
||||
const structure = nodeData.inputs?.structure as string
|
||||
const autoFix = nodeData.inputs?.autofixParser as boolean
|
||||
|
Before Width: | Height: | Size: 3.8 KiB After Width: | Height: | Size: 3.8 KiB |
Reference in New Issue
Block a user