Skip to content
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 @@ -750,7 +750,7 @@ def helpme(
terminal_output += line
# if an Enter key is detected, remove all saved lines.
# This allows to read the output of the last commandline only.
if re.search("^\[\?2004", line):
if re.search("^\\[\\?2004", line):
terminal_output = ""
except:
terminal_output = "No console output is provided."
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ def log_question_to_file(user_question: str, response: str, probability: str = "
.replace("'", "")
.replace("`", "")
)
filename = re.sub("[^a-zA-Z0-9\-]", "", filename)
filename = re.sub("[^a-zA-Z0-9\\-]", "", filename)
if len(filename) > 64:
filename = filename[:64]
log_dir = "./logs/responses"
Expand Down Expand Up @@ -84,7 +84,7 @@ def log_debug_info_to_file(
.replace("'", "")
.replace("`", "")
)
question_formatted = re.sub("[^a-zA-Z0-9\-]", "", question_formatted)
question_formatted = re.sub("[^a-zA-Z0-9\\-]", "", question_formatted)
if len(question_formatted) > 32:
question_formatted = question_formatted[:32]
filename = date_formatted + "-" + question_formatted + "-" + str(uid) + ".txt"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -362,13 +362,13 @@ def build_parent_tree(
def clean_section_id(section_id: str) -> str:
section_id = re.sub("'", "", section_id)
section_id = re.sub("`", "", section_id)
section_id = re.sub("\.", "", section_id)
section_id = re.sub("\,", "", section_id)
section_id = re.sub(r"\.", "", section_id)
section_id = re.sub(",", "", section_id)
section_id = re.sub("#", "", section_id)
section_id = re.sub("\?", "", section_id)
section_id = re.sub("\/", "", section_id)
section_id = re.sub("\{", "", section_id)
section_id = re.sub("\}", "", section_id)
section_id = re.sub(r"\?", "", section_id)
section_id = re.sub(r"\/", "", section_id)
section_id = re.sub(r"\{", "", section_id)
section_id = re.sub(r"\}", "", section_id)
section_id = re.sub(":", "", section_id)
return section_id

Expand Down
Loading
Loading