diff --git a/logdetective/logdetective.py b/logdetective/logdetective.py index 59e50c2..a38c524 100644 --- a/logdetective/logdetective.py +++ b/logdetective/logdetective.py @@ -32,7 +32,7 @@ """ -SUMMARIZE_PROPT_TEMPLATE = """ +SUMMARIZE_PROMPT_TEMPLATE = """ Does following log contain error or issue? Log: @@ -128,7 +128,7 @@ def rate_chunks(self, log: str, n_lines: int = 2) -> list[tuple]: for i in range(0, len(log_lines), n_lines): block = '\n'.join(log_lines[i:i + n_lines]) - prompt = SUMMARIZE_PROPT_TEMPLATE.format(log) + prompt = SUMMARIZE_PROMPT_TEMPLATE.format(log) out = self.model(prompt, max_tokens=7, grammar=self.grammar) out = f"{out['choices'][0]['text']}\n" results.append((block, out)) @@ -169,8 +169,8 @@ def __init__(self, verbose: bool = False, context: bool = False): def __call__(self, log: str) -> str: out = "" for chunk in get_chunks(log): - procesed_line = self.miner.add_log_message(chunk) - LOG.debug(procesed_line) + processed_line = self.miner.add_log_message(chunk) + LOG.debug(processed_line) sorted_clusters = sorted(self.miner.drain.clusters, key=lambda it: it.size, reverse=True) for chunk in get_chunks(log): cluster = self.miner.match(chunk, "always")