Skip to content

Commit 12975bb

Browse files
Address reviewer comments.
Signed-off-by: Austin Lee <austin@aryn.ai>
1 parent 59193e9 commit 12975bb

File tree

2 files changed

+5
-10
lines changed

2 files changed

+5
-10
lines changed

search-processors/src/main/java/org/opensearch/searchpipelines/questionanswering/generative/GenerativeQAResponseProcessor.java

+5-9
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ public void processResponseAsync(
119119
PipelineProcessingContext requestContext,
120120
ActionListener<SearchResponse> responseListener
121121
) {
122-
log.info("Entering processResponse.");
122+
log.debug("Entering processResponse.");
123123

124124
if (!this.featureFlagSupplier.getAsBoolean()) {
125125
throw new MLException(GenerativeQAProcessorConstants.FEATURE_NOT_ENABLED_ERROR_MSG);
@@ -132,7 +132,7 @@ public void processResponseAsync(
132132
t = DEFAULT_PROCESSOR_TIME_IN_SECONDS;
133133
}
134134
final int timeout = t;
135-
log.info("Timeout for this request: {} seconds.", timeout);
135+
log.debug("Timeout for this request: {} seconds.", timeout);
136136

137137
String llmQuestion = params.getLlmQuestion();
138138
String llmModel = params.getLlmModel() == null ? this.llmModel : params.getLlmModel();
@@ -144,13 +144,12 @@ public void processResponseAsync(
144144
if (conversationId != null && !Strings.hasText(conversationId)) {
145145
throw new IllegalArgumentException("Empty conversation_id is not allowed.");
146146
}
147-
// log.info("LLM question: {}, LLM model {}, conversation id: {}", llmQuestion, llmModel, conversationId);
148147
Instant start = Instant.now();
149148
Integer interactionSize = params.getInteractionSize();
150149
if (interactionSize == null || interactionSize == GenerativeQAParameters.SIZE_NULL_VALUE) {
151150
interactionSize = DEFAULT_CHAT_HISTORY_WINDOW;
152151
}
153-
log.info("Using interaction size of {}", interactionSize);
152+
log.debug("Using interaction size of {}", interactionSize);
154153

155154
Integer topN = params.getContextSize();
156155
if (topN == null) {
@@ -168,9 +167,6 @@ public void processResponseAsync(
168167
effectiveUserInstructions = params.getUserInstructions();
169168
}
170169

171-
// log.info("system_prompt: {}", systemPrompt);
172-
// log.info("user_instructions: {}", userInstructions);
173-
174170
final List<Interaction> chatHistory = new ArrayList<>();
175171
if (conversationId == null) {
176172
doChatCompletion(
@@ -194,7 +190,7 @@ public void processResponseAsync(
194190
} else {
195191
final Instant memoryStart = Instant.now();
196192
memoryClient.getInteractions(conversationId, interactionSize, ActionListener.wrap(r -> {
197-
log.info("getInteractions complete. ({})", getDuration(memoryStart));
193+
log.debug("getInteractions complete. ({})", getDuration(memoryStart));
198194
chatHistory.addAll(r);
199195
doChatCompletion(
200196
LlmIOUtil
@@ -231,7 +227,7 @@ private void doChatCompletion(
231227
llm.doChatCompletion(input, new ActionListener<>() {
232228
@Override
233229
public void onResponse(ChatCompletionOutput output) {
234-
log.info("doChatCompletion complete. ({})", getDuration(chatStart));
230+
log.debug("doChatCompletion complete. ({})", getDuration(chatStart));
235231

236232
final String answer = getAnswer(output);
237233
final String errorMessage = getError(output);

search-processors/src/main/java/org/opensearch/searchpipelines/questionanswering/generative/llm/DefaultLlmImpl.java

-1
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,6 @@ public void onResponse(MLOutput mlOutput) {
8989
.getMlModelTensors()
9090
.get(0)
9191
.getDataAsMap();
92-
// log.info("dataAsMap: {}", dataAsMap.toString());
9392
listener
9493
.onResponse(
9594
buildChatCompletionOutput(

0 commit comments

Comments
 (0)