Merge branch 'demo' into refactor/nodes-match-functionality
This commit is contained in:
@@ -29,10 +29,10 @@ export type BasicBeliefNodeData = {
|
||||
};
|
||||
|
||||
// These are all the types a basic belief could be.
|
||||
type BasicBeliefType = Keyword | Semantic | Object | Emotion
|
||||
type BasicBeliefType = Keyword | Semantic | DetectedObject | Emotion
|
||||
type Keyword = { type: "keyword", id: string, value: string, label: "Keyword said:"};
|
||||
type Semantic = { type: "semantic", id: string, value: string, label: "Detected with LLM:"};
|
||||
type Object = { type: "object", id: string, value: string, label: "Object found:"};
|
||||
type DetectedObject = { type: "object", id: string, value: string, label: "Object found:"};
|
||||
type Emotion = { type: "emotion", id: string, value: string, label: "Emotion recognised:"};
|
||||
|
||||
export type BasicBeliefNode = Node<BasicBeliefNodeData>
|
||||
@@ -93,6 +93,10 @@ export default function BasicBeliefNode(props: NodeProps<BasicBeliefNode>) {
|
||||
belief: {
|
||||
...data.belief,
|
||||
type: newType,
|
||||
value:
|
||||
newType === "emotion"
|
||||
? emotionOptions[0]
|
||||
: data.belief.value,
|
||||
},
|
||||
});
|
||||
}
|
||||
@@ -202,13 +206,4 @@ export function BasicBeliefReduce(node: Node, _nodes: Node[]) {
|
||||
break;
|
||||
}
|
||||
return result
|
||||
}
|
||||
|
||||
/**
|
||||
* This function is called whenever a connection is made with this node type (BasicBelief)
|
||||
* @param _thisNode the node of this node type which function is called
|
||||
* @param _otherNode the other node which was part of the connection
|
||||
* @param _isThisSource whether this instance of the node was the source in the connection, true = yes.
|
||||
*/
|
||||
export function BasicBeliefConnects(_thisNode: Node, _otherNode: Node, _isThisSource: boolean) {
|
||||
}
|
||||
Reference in New Issue
Block a user