Skip to content
This repository was archived by the owner on Dec 4, 2023. It is now read-only.
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -854,13 +854,9 @@ private CompletableFuture<DialogTurnResult> callGenerateAnswer(WaterfallStepCont

// Calling QnAMaker to get response.
return this.getQnAMakerClient(stepContext).thenApply(qnaMakerClient -> {
QueryResults response =
(QueryResults) stepContext.getState().get(String.format("turn.qnaresult%s", this.hashCode()));
if (response == null) {
response = qnaMakerClient
QueryResults response = qnaMakerClient
.getAnswersRaw(stepContext.getContext(), dialogOptions.getQnAMakerOptions(), null, null)
.join();
}

// Resetting previous query.
Integer previousQnAId = -1;
Expand Down Expand Up @@ -980,8 +976,11 @@ private CompletableFuture<DialogTurnResult> checkForMultiTurnPrompt(WaterfallSte

if (answer.getContext() != null && answer.getContext().getPrompts().length > 0) {
Map<String, Integer> previousContextData =
ObjectPath.getPathValue(stepContext.getActiveDialog().getState(), QNA_CONTEXT_DATA, Map.class);

ObjectPath.getPathValue(
stepContext.getActiveDialog().getState(),
QNA_CONTEXT_DATA,
Map.class,
new HashMap<>());
for (QnAMakerPrompt prompt : answer.getContext().getPrompts()) {
previousContextData.put(prompt.getDisplayText(), prompt.getQnaId());
}
Expand Down