mirror of
https://github.com/langgenius/dify.git
synced 2026-05-03 08:58:09 +08:00
provider compatible in model_config
This commit is contained in:
@ -35,6 +35,7 @@ import type { ToolNodeType } from './nodes/tool/types'
|
||||
import type { IterationNodeType } from './nodes/iteration/types'
|
||||
import { CollectionType } from '@/app/components/tools/types'
|
||||
import { toolParametersToFormSchemas } from '@/app/components/tools/utils/to-form-schema'
|
||||
import { correctProvider } from '@/utils'
|
||||
|
||||
const WHITE = 'WHITE'
|
||||
const GRAY = 'GRAY'
|
||||
@ -212,13 +213,6 @@ export const preprocessNodesAndEdges = (nodes: Node[], edges: Edge[]) => {
|
||||
}
|
||||
}
|
||||
|
||||
export const correctProvider = (provider: string) => {
|
||||
if (provider.includes('/'))
|
||||
return provider
|
||||
|
||||
return `langgenius/${provider}/${provider}`
|
||||
}
|
||||
|
||||
export const initialNodes = (originNodes: Node[], originEdges: Edge[]) => {
|
||||
const { nodes, edges } = preprocessNodesAndEdges(cloneDeep(originNodes), cloneDeep(originEdges))
|
||||
const firstNode = nodes[0]
|
||||
|
||||
Reference in New Issue
Block a user