Skip to content

Commit

Permalink
Prompting Updates, slight reorg on SMS functions
Browse files Browse the repository at this point in the history
  • Loading branch information
docwho2 committed Aug 5, 2024
1 parent d8517e0 commit 31d58a8
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -168,21 +168,28 @@ public static FunctionExecutor getFunctionExecuter(LexV2EventWrapper lexRequest)
func.setCallingNumber(callingNumber);
func.setChannelPlatform(channelPlatform);
func.setSessionId(sessionId);

if (isText) {
if (func.isText()) {
log.debug("TEXT MODE Adding: " + func);
list.add(func);
} else {
log.debug("TEXT MODE Excluding: " + func);
}
} else {
// If not Text, then this is voice of course
if (func.isVoice()) {
log.debug("VOICE MODE Adding: " + func);
list.add(func);
} else {
log.debug("VOICE MODE Excluding: " + func);
}
}
} catch (CloneNotSupportedException ex) {
log.error("Error cloning Functions", ex);
}
}
return new FunctionExecutor(list.stream().map(f -> f.getChatFunction()).toList());
return new FunctionExecutor(list.stream().map(AbstractFunction::getChatFunction).toList());
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,5 +30,10 @@ protected Function getExecutor() {
protected boolean isVoice() {
return false;
}

@Override
protected boolean isText() {
return true;
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -47,5 +47,10 @@ protected Function getExecutor() {
protected boolean isText() {
return false;
}

@Override
protected boolean isVoice() {
return true;
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,14 @@ protected Function getExecutor() {
protected boolean isVoice() {
return false;
}

/**
*
*
* @return
*/
@Override
protected boolean isText() {
return true;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,9 @@ protected Function getExecutor() {
protected boolean isText() {
return false;
}

@Override
protected boolean isVoice() {
return true;
}
}

0 comments on commit 31d58a8

Please sign in to comment.