Skip to content

Commit 76fe28d

Browse files
committed
remove more sensitive logs in pipeline/responseProcessor logs
Signed-off-by: Xun Zhang <xunzh@amazon.com>
1 parent 311b971 commit 76fe28d

File tree

2 files changed

+0
-17
lines changed

2 files changed

+0
-17
lines changed

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

-15
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,6 @@ public SearchResponse processResponse(SearchRequest request, SearchResponse resp
120120
if (timeout == null || timeout == GenerativeQAParameters.SIZE_NULL_VALUE) {
121121
timeout = DEFAULT_PROCESSOR_TIME_IN_SECONDS;
122122
}
123-
log.info("Timeout for this request: {} seconds.", timeout);
124123

125124
String llmQuestion = params.getLlmQuestion();
126125
String llmModel = params.getLlmModel() == null ? this.llmModel : params.getLlmModel();
@@ -129,26 +128,21 @@ public SearchResponse processResponse(SearchRequest request, SearchResponse resp
129128
}
130129
String conversationId = params.getConversationId();
131130

132-
log.info("LLM model {}, conversation id: {}", llmModel, conversationId);
133131
Instant start = Instant.now();
134132
Integer interactionSize = params.getInteractionSize();
135133
if (interactionSize == null || interactionSize == GenerativeQAParameters.SIZE_NULL_VALUE) {
136134
interactionSize = DEFAULT_CHAT_HISTORY_WINDOW;
137135
}
138-
log.info("Using interaction size of {}", interactionSize);
139136
List<Interaction> chatHistory = (conversationId == null)
140137
? Collections.emptyList()
141138
: memoryClient.getInteractions(conversationId, interactionSize);
142-
log.info("Retrieved chat history. ({})", getDuration(start));
143139

144140
Integer topN = params.getContextSize();
145141
if (topN == null) {
146142
topN = GenerativeQAParameters.SIZE_NULL_VALUE;
147143
}
148144
List<String> searchResults = getSearchResults(response, topN);
149145

150-
log.info("system_prompt: {}", systemPrompt);
151-
log.info("user_instructions: {}", userInstructions);
152146
start = Instant.now();
153147
try {
154148
ChatCompletionOutput output = llm
@@ -314,15 +308,6 @@ public SearchResponseProcessor create(
314308
config,
315309
GenerativeQAProcessorConstants.CONFIG_NAME_USER_INSTRUCTIONS
316310
);
317-
log
318-
.info(
319-
"model_id {}, llm_model {}, context_field_list {}, system_prompt {}, user_instructions {}",
320-
modelId,
321-
llmModel,
322-
contextFields,
323-
systemPrompt,
324-
userInstructions
325-
);
326311
return new GenerativeQAResponseProcessor(
327312
client,
328313
tag,

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

-2
Original file line numberDiff line numberDiff line change
@@ -102,14 +102,12 @@ public List<Interaction> getInteractions(String conversationId, int lastN) {
102102
interactions.addAll(list);
103103
from += list.size();
104104
maxResults -= list.size();
105-
log.info("Interactions: {}, from: {}, maxResults: {}", interactions, from, maxResults);
106105
} else if (response.hasMorePages()) {
107106
// If we didn't get any results back, we ignore this flag and break out of the loop
108107
// to avoid an infinite loop.
109108
// But in the future, we may support this mode, e.g. DynamoDB.
110109
break;
111110
}
112-
log.info("Interactions: {}, from: {}, maxResults: {}", interactions, from, maxResults);
113111
allInteractionsFetched = !response.hasMorePages();
114112
} while (from < lastN && !allInteractionsFetched);
115113

0 commit comments

Comments
 (0)