diff --git a/space_flow/public/index.html b/space_flow/public/index.html
index 7b11caa99..52741e97f 100644
--- a/space_flow/public/index.html
+++ b/space_flow/public/index.html
@@ -6,9 +6,9 @@
+
\ No newline at end of file
diff --git a/space_flow/src/CustomNodes/AgentNode/index.tsx b/space_flow/src/CustomNodes/AgentNode/index.tsx
new file mode 100644
index 000000000..8baa59f06
--- /dev/null
+++ b/space_flow/src/CustomNodes/AgentNode/index.tsx
@@ -0,0 +1,17 @@
+import { Handle, Position } from "reactflow";
+
+export default function AgentNode({ data }) {
+ console.log(data)
+ return (
+
+
+
+ Agent
+
+
+ Agent data
+
+
+
+ );
+}
diff --git a/space_flow/src/CustomNodes/ChainNode/index.tsx b/space_flow/src/CustomNodes/ChainNode/index.tsx
new file mode 100644
index 000000000..5887d611c
--- /dev/null
+++ b/space_flow/src/CustomNodes/ChainNode/index.tsx
@@ -0,0 +1,17 @@
+import { Handle, Position } from "reactflow";
+
+export default function ChainNode({ data }) {
+ console.log(data)
+ return (
+
+
+
+ Chain
+
+
+ Chain data
+
+
+
+ );
+}
diff --git a/space_flow/src/CustomNodes/ModelNode/index.tsx b/space_flow/src/CustomNodes/ModelNode/index.tsx
index 7c66a6ccc..29f30dafe 100644
--- a/space_flow/src/CustomNodes/ModelNode/index.tsx
+++ b/space_flow/src/CustomNodes/ModelNode/index.tsx
@@ -3,7 +3,7 @@ import { Handle, Position } from "reactflow";
export default function ModelNode({ data }) {
console.log(data)
return (
-
+
Model
diff --git a/space_flow/src/CustomNodes/PromptNode/index.tsx b/space_flow/src/CustomNodes/PromptNode/index.tsx
index c40c07c92..dce0dca81 100644
--- a/space_flow/src/CustomNodes/PromptNode/index.tsx
+++ b/space_flow/src/CustomNodes/PromptNode/index.tsx
@@ -8,7 +8,7 @@ export default function PromptNode({ data }) {
return (
openPopUp(
teste
)}
- className="prompt-Node relative bg-white h-16 w-40 border rounded-sm solid border-black flex flex-col justify-center"
+ className="prompt-node relative bg-white h-16 w-40 border rounded-sm solid border-black flex flex-col justify-center"
>
diff --git a/space_flow/src/CustomNodes/ValidatorNode/index.tsx b/space_flow/src/CustomNodes/ValidatorNode/index.tsx
new file mode 100644
index 000000000..c7543b8a7
--- /dev/null
+++ b/space_flow/src/CustomNodes/ValidatorNode/index.tsx
@@ -0,0 +1,17 @@
+import { Handle, Position } from "reactflow";
+
+export default function ValidatorNode({ data }) {
+ console.log(data)
+ return (
+
+
+
+ Validator
+
+
+ validator data
+
+
+
+ );
+}
diff --git a/space_flow/src/pages/FlowPage/components/extraSidebarComponent/index.tsx b/space_flow/src/pages/FlowPage/components/extraSidebarComponent/index.tsx
index 12cddeff7..4a42e1394 100644
--- a/space_flow/src/pages/FlowPage/components/extraSidebarComponent/index.tsx
+++ b/space_flow/src/pages/FlowPage/components/extraSidebarComponent/index.tsx
@@ -1,4 +1,6 @@
import { llm_chain } from "../../../../data_assets/llm_chain";
+import { prompt } from "../../../../data_assets/prompt";
+
export function ExtraSidebar(){
@@ -12,13 +14,26 @@ export function ExtraSidebar(){
if(nodeType==="modelNode"){
json = JSON.stringify(llm_chain)
}
+ if(nodeType==="chainNode"){
+ json = JSON.stringify({content:""})
+ }
+ if(nodeType==="agentNode"){
+ json = JSON.stringify({content:""})
+ }
+ if(nodeType==="validatorNode"){
+ json = JSON.stringify({content:""})
+ }
event.dataTransfer.setData('json',json);
}
return(
-
onDragStart(event,'promptNode')}> prompt Node
+
onDragStart(event,'promptNode')}> Prompt Node
onDragStart(event,'modelNode')}> Model Node
+
onDragStart(event,'chainNode')}> Chain Node
+
onDragStart(event,'agentNode')}> Agent Node
+
onDragStart(event,'validatorNode')}> Validator Node
+
)
}
\ No newline at end of file
diff --git a/space_flow/src/pages/FlowPage/index.tsx b/space_flow/src/pages/FlowPage/index.tsx
index f7706a806..c0c1eac22 100644
--- a/space_flow/src/pages/FlowPage/index.tsx
+++ b/space_flow/src/pages/FlowPage/index.tsx
@@ -11,21 +11,30 @@ import PromptNode from "../../CustomNodes/PromptNode";
import ModelNode from "../../CustomNodes/ModelNode";
import { locationContext } from "../../contexts/locationContext";
import { ExtraSidebar } from "./components/extraSidebarComponent";
+import AgentNode from "../../CustomNodes/AgentNode";
+import ChainNode from "../../CustomNodes/ChainNode";
+import ValidatorNode from "../../CustomNodes/ValidatorNode";
+
+const nodeTypes = {
+ textUpdater: TextUpdaterNode,
+ promptNode: PromptNode,
+ modelNode: ModelNode,
+ chainNode: ChainNode,
+ agentNode: AgentNode,
+ validatorNode: ValidatorNode,
+};
export default function FlowPage() {
// outside component to avoid render trigger
const reactFlowWrapper = useRef(null);
- const nodeTypes = {
- textUpdater: TextUpdaterNode,
- promptNode: PromptNode,
- modelNode: ModelNode,
- };
const rfStyle = {
backgroundCOlor: "#B8CEFF",
};
+
let id = 0;
+
const getId = () => `dndnode_${id++}`;
const { setExtraComponent } = useContext(locationContext);