Skip to content

Commit

Permalink
Remove fix_newlines() calls from chat.py
Browse files Browse the repository at this point in the history
  • Loading branch information
oobabooga committed Apr 16, 2023
1 parent 5342f72 commit 6a03ad0
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions modules/chat.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,7 @@
import modules.extensions as extensions_module
import modules.shared as shared
from modules.extensions import apply_extensions
from modules.html_generator import (chat_html_wrapper, fix_newlines,
make_thumbnail)
from modules.html_generator import chat_html_wrapper, make_thumbnail
from modules.text_generation import (encode, generate_reply,
get_max_prompt_length)

Expand Down Expand Up @@ -60,7 +59,6 @@ def generate_chat_prompt(user_input, state, **kwargs):
elif not _continue:

# Adding the user message
user_input = fix_newlines(user_input)
if len(user_input) > 0:
rows.append(f"{prefix1}{user_input}{state['end_of_turn']}\n")

Expand Down Expand Up @@ -114,7 +112,6 @@ def extract_message_from_reply(reply, state):
continue
break

reply = fix_newlines(reply)
return reply, next_character_found


Expand Down

0 comments on commit 6a03ad0

Please sign in to comment.