mirror of
https://github.com/oobabooga/text-generation-webui.git
synced 2025-06-07 14:17:09 -04:00
Don't limit the number of prompt characters printed with --verbose
This commit is contained in:
parent
aff41f3482
commit
f59998d268
1 changed files with 2 additions and 2 deletions
|
@ -505,11 +505,11 @@ def generate_reply_custom(question, original_question, state, stopping_strings=N
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|
||||||
def print_prompt(prompt, max_chars=2000):
|
def print_prompt(prompt, max_chars=-1):
|
||||||
DARK_YELLOW = "\033[38;5;3m"
|
DARK_YELLOW = "\033[38;5;3m"
|
||||||
RESET = "\033[0m"
|
RESET = "\033[0m"
|
||||||
|
|
||||||
if len(prompt) > max_chars:
|
if max_chars > 0 and len(prompt) > max_chars:
|
||||||
half_chars = max_chars // 2
|
half_chars = max_chars // 2
|
||||||
hidden_len = len(prompt[half_chars:-half_chars])
|
hidden_len = len(prompt[half_chars:-half_chars])
|
||||||
hidden_msg = f"{DARK_YELLOW}[...{hidden_len} characters hidden...]{RESET}"
|
hidden_msg = f"{DARK_YELLOW}[...{hidden_len} characters hidden...]{RESET}"
|
||||||
|
|
Loading…
Add table
Reference in a new issue