feat(core): Update LLM applications building support (no-changelog) (#7710)
extracted out of #7336 --------- Co-authored-by: Jan Oberhauser <jan.oberhauser@gmail.com> Co-authored-by: Oleg Ivaniv <me@olegivaniv.com> Co-authored-by: Alex Grozav <alex@grozav.com>
This commit is contained in:
committed by
GitHub
parent
4a89504d54
commit
117962d473
@@ -1,7 +1,11 @@
|
||||
import { computed, ref, watch } from 'vue';
|
||||
import { defineStore } from 'pinia';
|
||||
import { v4 as uuid } from 'uuid';
|
||||
|
||||
import { useWorkflowsStore } from '@/stores/workflows.store';
|
||||
import { useNodeTypesStore } from '@/stores/nodeTypes.store';
|
||||
import { useUIStore } from '@/stores/ui.store';
|
||||
import { useHistoryStore } from '@/stores/history.store';
|
||||
import { useSourceControlStore } from '@/stores/sourceControl.store';
|
||||
import type { INodeUi, XYPosition } from '@/Interface';
|
||||
import {
|
||||
applyScale,
|
||||
@@ -37,12 +41,6 @@ import {
|
||||
} from '@/utils/nodeViewUtils';
|
||||
import type { PointXY } from '@jsplumb/util';
|
||||
|
||||
import { useWorkflowsStore } from './workflows.store';
|
||||
import { useNodeTypesStore } from './nodeTypes.store';
|
||||
import { useUIStore } from './ui.store';
|
||||
import { useHistoryStore } from './history.store';
|
||||
import { useSourceControlStore } from './sourceControl.store';
|
||||
|
||||
export const useCanvasStore = defineStore('canvas', () => {
|
||||
const workflowStore = useWorkflowsStore();
|
||||
const nodeTypesStore = useNodeTypesStore();
|
||||
|
||||
@@ -157,6 +157,26 @@ export const useNodeTypesStore = defineStore(STORES.NODE_TYPES, {
|
||||
}
|
||||
acc[outputType].push(node.name);
|
||||
});
|
||||
} else {
|
||||
// If outputs is not an array, it must be a string expression
|
||||
// in which case we'll try to match all possible non-main output types that are supported
|
||||
const connectorTypes: ConnectionTypes[] = [
|
||||
NodeConnectionType.AiVectorStore,
|
||||
NodeConnectionType.AiChain,
|
||||
NodeConnectionType.AiDocument,
|
||||
NodeConnectionType.AiEmbedding,
|
||||
NodeConnectionType.AiLanguageModel,
|
||||
NodeConnectionType.AiMemory,
|
||||
NodeConnectionType.AiOutputParser,
|
||||
NodeConnectionType.AiTextSplitter,
|
||||
NodeConnectionType.AiTool,
|
||||
];
|
||||
connectorTypes.forEach((outputType: ConnectionTypes) => {
|
||||
if (outputTypes.includes(outputType)) {
|
||||
acc[outputType] = acc[outputType] || [];
|
||||
acc[outputType].push(node.name);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
return acc;
|
||||
|
||||
Reference in New Issue
Block a user