Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Backport 2.12] remove more sensitive logs in pipeline/responseProcessor logs #2132

Merged
merged 1 commit into from
Feb 19, 2024
Merged
Show file tree
Hide file tree
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 @@ -120,7 +120,6 @@ public SearchResponse processResponse(SearchRequest request, SearchResponse resp
if (timeout == null || timeout == GenerativeQAParameters.SIZE_NULL_VALUE) {
timeout = DEFAULT_PROCESSOR_TIME_IN_SECONDS;
}
log.info("Timeout for this request: {} seconds.", timeout);

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

log.info("LLM model {}, conversation id: {}", llmModel, conversationId);
Instant start = Instant.now();
Integer interactionSize = params.getInteractionSize();
if (interactionSize == null || interactionSize == GenerativeQAParameters.SIZE_NULL_VALUE) {
interactionSize = DEFAULT_CHAT_HISTORY_WINDOW;
}
log.info("Using interaction size of {}", interactionSize);
List<Interaction> chatHistory = (conversationId == null)
? Collections.emptyList()
: memoryClient.getInteractions(conversationId, interactionSize);
log.info("Retrieved chat history. ({})", getDuration(start));

Integer topN = params.getContextSize();
if (topN == null) {
topN = GenerativeQAParameters.SIZE_NULL_VALUE;
}
List<String> searchResults = getSearchResults(response, topN);

log.info("system_prompt: {}", systemPrompt);
log.info("user_instructions: {}", userInstructions);
start = Instant.now();
try {
ChatCompletionOutput output = llm
Expand Down Expand Up @@ -314,15 +308,6 @@ public SearchResponseProcessor create(
config,
GenerativeQAProcessorConstants.CONFIG_NAME_USER_INSTRUCTIONS
);
log
.info(
"model_id {}, llm_model {}, context_field_list {}, system_prompt {}, user_instructions {}",
modelId,
llmModel,
contextFields,
systemPrompt,
userInstructions
);
return new GenerativeQAResponseProcessor(
client,
tag,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,14 +102,12 @@ public List<Interaction> getInteractions(String conversationId, int lastN) {
interactions.addAll(list);
from += list.size();
maxResults -= list.size();
log.info("Interactions: {}, from: {}, maxResults: {}", interactions, from, maxResults);
} else if (response.hasMorePages()) {
// If we didn't get any results back, we ignore this flag and break out of the loop
// to avoid an infinite loop.
// But in the future, we may support this mode, e.g. DynamoDB.
break;
}
log.info("Interactions: {}, from: {}, maxResults: {}", interactions, from, maxResults);
allInteractionsFetched = !response.hasMorePages();
} while (from < lastN && !allInteractionsFetched);

Expand Down
Loading