Skip to content

Commit

Permalink
Fix typos in the variable names
Browse files Browse the repository at this point in the history
  • Loading branch information
jkonecny12 authored and xsuchy committed May 16, 2024
1 parent 4ef3b0b commit bd7ac5e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions logdetective/logdetective.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
"""

SUMMARIZE_PROPT_TEMPLATE = """
SUMMARIZE_PROMPT_TEMPLATE = """
Does following log contain error or issue?
Log:
Expand Down Expand Up @@ -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))
Expand Down Expand Up @@ -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")
Expand Down

0 comments on commit bd7ac5e

Please sign in to comment.