Versions in this module Expand all Collapse all v1 v1.0.2 Sep 28, 2025 v1.0.1 Sep 28, 2025 Changes in this version + var DifyInputTypeMapping = map[string]UnifiedDataType + var IFlytekCustomParameterTypeMapping = map[string]UnifiedDataType + func ConvertVariableReferenceAdvanced(ref *VariableReference, platform PlatformType) string + func GetDifyValueType(unifiedType UnifiedDataType) string + func GetIFlytekSchemaType(unifiedType UnifiedDataType) string + func GetNodeTypeMapping() map[PlatformType]map[NodeType]string + func GetReverseNodeTypeMapping() map[PlatformType]map[string]NodeType + func GetTypeCategory(dataType UnifiedDataType) string + func IsArrayType(dataType UnifiedDataType) bool + func IsNumericType(dataType UnifiedDataType) bool + func IsObjectType(dataType UnifiedDataType) bool + func IsPrimitiveType(dataType UnifiedDataType) bool + func IsStringType(dataType UnifiedDataType) bool + func IsValidNodeType(nodeType NodeType) bool + func IsValidPlatformType(platform PlatformType) bool + func ValidateTypeCompatibility(sourceType, targetType UnifiedDataType) bool + type ClassifierClass struct + Description string + ID string + IsDefault bool + Name string + type ClassifierConfig struct + Classes []ClassifierClass + Instructions string + IsInIteration bool + IterationID string + Model ModelConfig + Parameters ModelParameters + QueryVariable string + func (c ClassifierConfig) GetNodeType() NodeType + type CodeConfig struct + Code string + Dependencies []string + IsInIteration bool + IterationID string + Language string + func (c CodeConfig) GetNodeType() NodeType + type Condition struct + ComparisonOperator string + Value interface{} + VarType UnifiedDataType + VariableSelector []string + type ConditionCase struct + CaseID string + Conditions []Condition + Level int + LogicalOperator string + type ConditionConfig struct + Cases []ConditionCase + DefaultCase string + IsInIteration bool + IterationID string + func (c ConditionConfig) GetNodeType() NodeType + type Constraints struct + MaxLength int + MinLength int + Options []interface{} + Pattern string + type ContextConfig struct + Enabled bool + VariableSelector []string + type ConversionError struct + Code string + Details string + ErrorType string + FallbackStrategy string + Message string + Severity ErrorSeverity + SourceLocation *Location + SourcePlatform string + Suggestions []string + TargetPlatform string + func (e *ConversionError) Error() string + type CozeMetadata struct + ContentType string + CreateTime int64 + CreatorID string + ExportFormat string + Mode string + SpaceID string + UpdateTime int64 + Version string + WorkflowID string + type DataTypeMapping struct + CozeMapping map[UnifiedDataType]string + DifyAliases map[string]string + DifyMapping map[UnifiedDataType]string + IFlytekAliases map[string]string + IFlytekMapping map[UnifiedDataType]string + UnifiedTypes []UnifiedDataType + func GetDefaultDataTypeMapping() *DataTypeMapping + func (dtm *DataTypeMapping) ConvertValue(value interface{}, fromType, toType UnifiedDataType) (interface{}, error) + func (dtm *DataTypeMapping) FromDifyType(difyType string) UnifiedDataType + func (dtm *DataTypeMapping) FromIFlytekType(iflytekType string) UnifiedDataType + func (dtm *DataTypeMapping) MapToDifyTypeWithAliases(inputType string) string + func (dtm *DataTypeMapping) ToCozeType(unifiedType UnifiedDataType) string + func (dtm *DataTypeMapping) ToDifyType(unifiedType UnifiedDataType) string + func (dtm *DataTypeMapping) ToIFlytekType(unifiedType UnifiedDataType) string + type DataTypeValidator struct + func NewDataTypeValidator() *DataTypeValidator + func (v *DataTypeValidator) ValidateDifyType(difyType string) bool + func (v *DataTypeValidator) ValidateIFlytekType(iflytekType string) bool + func (v *DataTypeValidator) ValidateType(dataType UnifiedDataType) bool + type DifyMetadata struct + AppVersion string + Icon string + IconBackground string + Kind string + Mode string + UseIconAsAnswerIcon bool + type Edge struct + Condition string + ID string + PlatformConfig PlatformConfig + Source string + SourceHandle string + Target string + TargetHandle string + Type EdgeType + func NewEdge(id, source, target string) *Edge + type EdgeType string + const EdgeTypeConditional + const EdgeTypeDefault + type EndConfig struct + OutputMode string + Outputs []EndOutput + StreamOutput bool + Template string + func (c EndConfig) GetNodeType() NodeType + type EndOutput struct + Reference *VariableReference + ValueSelector []string + ValueType UnifiedDataType + Variable string + type ErrorSeverity string + const SeverityCritical + const SeverityError + const SeverityInfo + const SeverityWarning + type ExecutionConfig struct + ErrorHandleMode string + IsParallel bool + ParallelNums int + type Features struct + FileUpload *FileUploadConfig + OpeningStatement string + SpeechToText *SpeechConfig + SuggestedQuestions []string + TextToSpeech *SpeechConfig + type FileUploadConfig struct + AllowedFileExtensions []string + AllowedFileTypes []string + AllowedUploadMethods []string + AudioFileSizeLimit int + BatchCountLimit int + Enabled bool + FileSizeLimit int + ImageFileSizeLimit int + NumberLimits int + VideoFileSizeLimit int + WorkflowFileUploadLimit int + type IFlytekMetadata struct + AdvancedConfig string + AvatarColor string + AvatarIcon string + DSLVersion string + type Input struct + Constraints *Constraints + Default interface{} + Description string + Label string + Name string + Reference *VariableReference + Required bool + Type UnifiedDataType + type IterationConfig struct + Execution ExecutionConfig + Iterator IteratorConfig + OutputSelector OutputSelectorConfig + OutputType string + SubWorkflow SubWorkflowConfig + func (c IterationConfig) GetNodeType() NodeType + type IteratorConfig struct + InputType string + SourceNode string + SourceOutput string + type LLMConfig struct + Context *ContextConfig + IsInIteration bool + IterationID string + Model ModelConfig + Parameters ModelParameters + Prompt PromptConfig + Vision *VisionConfig + func (c LLMConfig) GetNodeType() NodeType + type Location struct + Field string + Line int + NodeID string + type MemoryConfig struct + Enabled bool + Window int + type Message struct + Content string + Role string + type Metadata struct + CreatedAt time.Time + Description string + Name string + UIConfig *UIConfig + UpdatedAt time.Time + type ModelConfig struct + Mode string + Name string + Provider string + type ModelParameters struct + MaxTokens int + ResponseFormat int + Temperature float64 + TopK int + TopP float64 + type Node struct + Config NodeConfig + Description string + ID string + Inputs []Input + Outputs []Output + PlatformConfig PlatformConfig + Position Position + Size Size + Title string + Type NodeType + func NewNode(id string, nodeType NodeType, title string) *Node + type NodeConfig interface + GetNodeType func() NodeType + type NodeType string + const NodeTypeClassifier + const NodeTypeCode + const NodeTypeCondition + const NodeTypeEnd + const NodeTypeIteration + const NodeTypeLLM + const NodeTypeStart + type Output struct + Default interface{} + Description string + Label string + Name string + Required bool + Type UnifiedDataType + type OutputSelectorConfig struct + NodeID string + OutputName string + type ParseError struct + Code string + Location *Location + Message string + Suggestions []string + func (e *ParseError) Error() string + type PlatformConfig struct + Coze map[string]interface{} + Dify map[string]interface{} + IFlytek map[string]interface{} + type PlatformMetadata struct + Coze *CozeMetadata + Dify *DifyMetadata + IFlytek *IFlytekMetadata + type PlatformType string + const PlatformCoze + const PlatformDify + const PlatformIFlytek + func GetSupportedPlatformTypes() []PlatformType + type Position struct + X float64 + Y float64 + type PromptConfig struct + Messages []Message + SystemTemplate string + UserTemplate string + type ReferenceType string + const ReferenceTypeLiteral + const ReferenceTypeNodeOutput + const ReferenceTypeTemplate + type Size struct + Height float64 + Width float64 + type SpeechConfig struct + Enabled bool + Language string + Voice string + type StartConfig struct + IsInIteration bool + ParentID string + Variables []Variable + func (c StartConfig) GetNodeType() NodeType + type SubWorkflowConfig struct + Edges []Edge + EndNodeID string + Nodes []Node + StartNodeID string + type UIConfig struct + Icon string + IconBackground string + OpeningStatement string + SuggestedQuestions []string + type UnifiedDSL struct + Metadata Metadata + PlatformMetadata PlatformMetadata + Version string + Workflow Workflow + func NewUnifiedDSL() *UnifiedDSL + func (dsl *UnifiedDSL) AddEdge(edge Edge) + func (dsl *UnifiedDSL) AddNode(node Node) + func (dsl *UnifiedDSL) GetEdgesBySource(sourceID string) []Edge + func (dsl *UnifiedDSL) GetEdgesByTarget(targetID string) []Edge + func (dsl *UnifiedDSL) GetNodeByID(id string) *Node + func (dsl *UnifiedDSL) UpdateTimestamp() + type UnifiedDataType string + const DataTypeArrayBoolean + const DataTypeArrayFloat + const DataTypeArrayInteger + const DataTypeArrayNumber + const DataTypeArrayObject + const DataTypeArrayString + const DataTypeBoolean + const DataTypeFloat + const DataTypeInteger + const DataTypeNumber + const DataTypeObject + const DataTypeString + func ConvertDifyInputType(difyInputType string) UnifiedDataType + func ConvertIFlytekCustomParameterType(customType string) UnifiedDataType + func GetAllUnifiedTypes() []UnifiedDataType + type ValidationError struct + AffectedItems []string + FixSuggestions []string + Message string + Severity string + Type string + func (e *ValidationError) Error() string + type Variable struct + Constraints *Constraints + CustomParameterType string + Default interface{} + DeleteDisabled bool + Description string + ID string + Label string + Name string + NameErrMsg string + Properties []interface{} + Required bool + Type string + type VariableReference struct + DataType UnifiedDataType + NodeID string + OutputName string + Template string + Type ReferenceType + Value interface{} + type VariableReferenceSystem struct + OutputMappings map[string]map[string]string + func NewVariableReferenceSystem() *VariableReferenceSystem + func (vrs *VariableReferenceSystem) DeserializeReference(data []byte) (*VariableReference, error) + func (vrs *VariableReferenceSystem) ExtractReferencesFromDifyNode(nodeData map[string]interface{}) ([]*VariableReference, error) + func (vrs *VariableReferenceSystem) ExtractReferencesFromIFlytekNode(nodeData map[string]interface{}) ([]*VariableReference, error) + func (vrs *VariableReferenceSystem) ParseDifyReference(valueSelector []string, valueType string) (*VariableReference, error) + func (vrs *VariableReferenceSystem) ParseIFlytekReference(refData map[string]interface{}) (*VariableReference, error) + func (vrs *VariableReferenceSystem) ParseTemplateReference(template string) ([]*VariableReference, error) + func (vrs *VariableReferenceSystem) RegisterOutputMapping(nodeID, oldOutputName, newOutputName string) + func (vrs *VariableReferenceSystem) ReplaceTemplateReferences(template string, fromPlatform, toPlatform PlatformType) (string, error) + func (vrs *VariableReferenceSystem) ResolveOutputName(nodeID, outputName string) string + func (vrs *VariableReferenceSystem) SerializeReference(ref *VariableReference) ([]byte, error) + func (vrs *VariableReferenceSystem) ToDifyReference(ref *VariableReference) ([]string, string, error) + func (vrs *VariableReferenceSystem) ToDifyTemplate(ref *VariableReference) (string, error) + func (vrs *VariableReferenceSystem) ToIFlytekReference(ref *VariableReference) (map[string]interface{}, error) + func (vrs *VariableReferenceSystem) ToIFlytekTemplate(ref *VariableReference) (string, error) + func (vrs *VariableReferenceSystem) ToUnifiedTemplate(ref *VariableReference) (string, error) + func (vrs *VariableReferenceSystem) ValidateReference(ref *VariableReference, dsl *UnifiedDSL) error + type VisionConfig struct + Enabled bool + type Workflow struct + Edges []Edge + Features *Features + Nodes []Node + Variables []Variable