mirror of
https://github.com/langgenius/dify.git
synced 2026-04-09 18:08:09 +08:00
fix: Update type handling in ToolNodeType to ensure proper formatting for unknown types
This commit is contained in:
parent
6c7c465b17
commit
3797d53c78
@ -99,8 +99,8 @@ const nodeDefault: NodeDefault<ToolNodeType> = {
|
||||
const dataType = output.type
|
||||
const schemaType = getMatchedSchemaType(output, schemaTypeDefinitions)
|
||||
let type = dataType === 'array'
|
||||
? `array[${output.items?.type.slice(0, 1).toLocaleLowerCase()}${output.items?.type.slice(1)}]`
|
||||
: `${output.type.slice(0, 1).toLocaleLowerCase()}${output.type.slice(1)}`
|
||||
? `Array[${output.items?.type ? output.items.type.slice(0, 1).toLocaleLowerCase() + output.items.type.slice(1) : 'Unknown'}]`
|
||||
: `${output.type ? output.type.slice(0, 1).toLocaleLowerCase() + output.type.slice(1) : 'Unknown'}`
|
||||
|
||||
if (type === VarType.object && schemaType === 'file')
|
||||
type = VarType.file
|
||||
|
||||
Loading…
Reference in New Issue
Block a user