(chatflow: IChatFlow)
| 1991 | } |
| 1992 | |
| 1993 | export const getAPIOverrideConfig = (chatflow: IChatFlow) => { |
| 1994 | try { |
| 1995 | const apiConfig = chatflow.apiConfig ? JSON.parse(chatflow.apiConfig) : {} |
| 1996 | const nodeOverrides: INodeOverrides = |
| 1997 | apiConfig.overrideConfig && apiConfig.overrideConfig.nodes ? apiConfig.overrideConfig.nodes : {} |
| 1998 | const variableOverrides: IVariableOverride[] = |
| 1999 | apiConfig.overrideConfig && apiConfig.overrideConfig.variables ? apiConfig.overrideConfig.variables : [] |
| 2000 | const apiOverrideStatus: boolean = |
| 2001 | apiConfig.overrideConfig && apiConfig.overrideConfig.status ? apiConfig.overrideConfig.status : false |
| 2002 | |
| 2003 | return { nodeOverrides, variableOverrides, apiOverrideStatus } |
| 2004 | } catch (error) { |
| 2005 | return { nodeOverrides: {}, variableOverrides: [], apiOverrideStatus: false } |
| 2006 | } |
| 2007 | } |
| 2008 | |
| 2009 | export const getUploadPath = (): string => { |
| 2010 | return process.env.BLOB_STORAGE_PATH |
no test coverage detected