chore: face
This commit is contained in:
@@ -31,11 +31,12 @@ export type BasicBeliefNodeData = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
// These are all the types a basic belief could be.
|
// These are all the types a basic belief could be.
|
||||||
export type BasicBeliefType = Keyword | Semantic | DetectedObject | Emotion
|
export type BasicBeliefType = Keyword | Semantic | DetectedObject | Emotion | Face
|
||||||
type Keyword = { type: "keyword", id: string, value: string, label: "Keyword said:"};
|
type Keyword = { type: "keyword", id: string, value: string, label: "Keyword said:"};
|
||||||
type Semantic = { type: "semantic", id: string, value: string, description: string, label: "Detected with LLM:"};
|
type Semantic = { type: "semantic", id: string, value: string, description: string, label: "Detected with LLM:"};
|
||||||
type DetectedObject = { 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:"};
|
type Emotion = { type: "emotion", id: string, value: string, label: "Emotion recognised:"};
|
||||||
|
type Face = { type: "face", id: string, value: string, label: "Face detected"};
|
||||||
|
|
||||||
export type BasicBeliefNode = Node<BasicBeliefNodeData>
|
export type BasicBeliefNode = Node<BasicBeliefNodeData>
|
||||||
|
|
||||||
@@ -155,6 +156,7 @@ export default function BasicBeliefNode(props: NodeProps<BasicBeliefNode>) {
|
|||||||
<option value="semantic">Detected with LLM:</option>
|
<option value="semantic">Detected with LLM:</option>
|
||||||
<option value="object">Object found:</option>
|
<option value="object">Object found:</option>
|
||||||
<option value="emotion">Emotion recognised:</option>
|
<option value="emotion">Emotion recognised:</option>
|
||||||
|
<option value="face">Face detected</option>
|
||||||
</select>
|
</select>
|
||||||
{wrapping}
|
{wrapping}
|
||||||
{data.belief.type === "emotion" && (
|
{data.belief.type === "emotion" && (
|
||||||
@@ -222,6 +224,10 @@ export function BasicBeliefReduce(node: Node, _nodes: Node[]) {
|
|||||||
result["name"] = data.belief.value;
|
result["name"] = data.belief.value;
|
||||||
result["description"] = data.belief.description;
|
result["description"] = data.belief.description;
|
||||||
break;
|
break;
|
||||||
|
case "face":
|
||||||
|
result["face_present"] = true;
|
||||||
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user