model node added

This commit is contained in:
anovazzi1 2023-02-10 12:16:25 -03:00
commit 84d8909782
4 changed files with 31 additions and 6 deletions

View file

@ -0,0 +1,17 @@
import { Handle, Position } from "reactflow";
export default function ModelNode({ data }) {
console.log(data)
return (
<div className="model-Node relative bg-white h-16 w-40 border rounded-sm solid border-black flex flex-col justify-center">
<Handle type="source" position={Position.Left}></Handle>
<label className="absolute cursor-grab text-sm -top-3 left-1 bg-white w-14 text-center">
Model
</label>
<div className="w-full h-min text-xs text-center">
{data.llm.model_name}
</div>
<Handle type="target" position={Position.Right}></Handle>
</div>
);
}

View file

@ -10,16 +10,14 @@ export default function PromptNode({ data }) {
onClick={()=>openPopUp(<div className="absolute top-1/2 left-1/2">teste</div>)}
className="prompt-Node relative bg-white h-16 w-40 border rounded-sm solid border-black flex flex-col justify-center"
>
<Handle type="target" position={Position.Left}></Handle>
<Handle type="source" position={Position.Left}></Handle>
<label className="absolute cursor-grab text-sm -top-3 left-1 bg-white w-14 text-center">
{" "}
Prompt
</label>
<div className="w-full h-10 truncate bg-slate-50 text-xs">
{" "}
{data.template}
</div>
<Handle type="source" position={Position.Right}></Handle>
<Handle type="target" position={Position.Right}></Handle>
</div>
);
}