UPDATE 15-Oct bug 679

This commit is contained in:
PAVEL PALMA
2025-10-16 00:01:19 -06:00
parent 582de0130e
commit 6448d88b7a

View File

@@ -12,7 +12,6 @@ import com.example.dto.dialogflow.base.DetectIntentResponseDTO;
import com.example.exception.DialogflowClientException;
import com.google.api.gax.rpc.ApiException;
import com.google.cloud.dialogflow.cx.v3.DetectIntentRequest;
import com.google.cloud.dialogflow.cx.v3.PageName;
import com.google.cloud.dialogflow.cx.v3.QueryParameters;
import com.google.cloud.dialogflow.cx.v3.SessionsClient;
import com.google.cloud.dialogflow.cx.v3.SessionName;
@@ -40,9 +39,6 @@ public class DialogflowClientService {
private final String dialogflowCxLocation;
private final String dialogflowCxAgentId;
private static final String TARGET_FLOW_ID = "00000000-0000-0000-0000-000000000000";
private static final String TARGET_PAGE_ID = "START_PAGE";
private final DialogflowRequestMapper dialogflowRequestMapper;
private final DialogflowResponseMapper dialogflowResponseMapper;
private SessionsClient sessionsClient;
@@ -111,9 +107,6 @@ public class DialogflowClientService {
detectIntentRequestBuilder.setSession(sessionName.toString());
logger.debug("Set session path {} on the request builder for session: {}", sessionName.toString(), sessionId);
// Configure the query parameters to set the target flow
PageName pageName = PageName.of(dialogflowCxProjectId, dialogflowCxLocation, dialogflowCxAgentId, TARGET_FLOW_ID, TARGET_PAGE_ID);
QueryParameters.Builder queryParamsBuilder;
if (detectIntentRequestBuilder.hasQueryParams()) {
queryParamsBuilder = detectIntentRequestBuilder.getQueryParams().toBuilder();
@@ -121,7 +114,6 @@ public class DialogflowClientService {
queryParamsBuilder = QueryParameters.newBuilder();
}
queryParamsBuilder.setCurrentPage(pageName.toString());
detectIntentRequestBuilder.setQueryParams(queryParamsBuilder.build());
// Build the final DetectIntentRequest Protobuf object