Skip to content

Commit

Permalink
working new instructions
Browse files Browse the repository at this point in the history
  • Loading branch information
kontopoulosdm committed Sep 25, 2024
1 parent 1139fed commit 1fa848f
Show file tree
Hide file tree
Showing 2 changed files with 298 additions and 104 deletions.
28 changes: 14 additions & 14 deletions src/bit-systems/agent-system.js
Original file line number Diff line number Diff line change
Expand Up @@ -284,11 +284,10 @@ export default class VirtualAgent {
if (this.micStatus && !this.waitingForResponse) {
this.AskAgent();
} else {
const randNumb = 1;
const randomDestinationName = Object.keys(navSystem.targetName)[randNumb];

const navigation = navSystem.GetInstructions(avatarPos(), randomDestinationName);
navSystem.RenderCues(navigation);
// const randNumb = 1;
// const randomDestinationName = Object.keys(navSystem.targetName)[randNumb];
// const navigation = navSystem.GetInstructions(randomDestinationName);
// navSystem.RenderCues(navigation);
}
}
}
Expand Down Expand Up @@ -359,13 +358,13 @@ export default class VirtualAgent {
this.setMicStatus();
try {
this.isProccessing = true;
// const randNumb = Math.floor(Math.random() * Object.keys(navSystem.targetInfo).length);
const randNumb = 0;
const randomDestinationName = Object.keys(navSystem.targetName)[randNumb];

this.DatasetCreate();
const nav = this.DatasetCreate();
console.log(nav);

this.UpdateTextArray("Navigation Calculated. Check console");
this.UpdateTextArray([nav.knowledge]);
const dsResponse = await dsResponseModule(`How can I go to the ${nav.destination}?`, "navigation", nav.knowledge);
this.UpdateTextArray([dsResponse.data.response]);
} catch (error) {
console.log("error", error);
this.UpdateWithRandomPhrase("error");
Expand All @@ -379,10 +378,11 @@ export default class VirtualAgent {

DatasetCreate() {
const destNames = ["conference room", "business room", "social area", "booth 1", "booth 2", "booth 3", "booth 4"];
destNames.forEach(destination => {
const navigation = navSystem.GetInstructions(avatarPos(), destination);
navSystem.RenderCues(navigation);
});
const randomInt = Math.floor(Math.random() * destNames.length);
const navigation = navSystem.GetInstructions("business room");
navigation.destination = destNames[randomInt];
navSystem.RenderCues(navigation);
return navigation;
}

async SnapActions() {
Expand Down
Loading

0 comments on commit 1fa848f

Please sign in to comment.