Skip to content

Commit d056228

Browse files
committed
Strip leading/trailing whitespace
In nekomata chat formatter, want to strip leading/trailing whitespace.
1 parent cb554a2 commit d056228

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

llama_cpp/llama_chat_format.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1074,7 +1074,7 @@ def format_nekomata(
10741074
10751075
### 応答:
10761076
""".format(
1077-
instruction=system_msg["content"], input=user_msg["content"]
1077+
instruction=system_msg["content"].strip(), input=user_msg["content"].strip()
10781078
)
10791079

10801080
else:
@@ -1086,7 +1086,7 @@ def format_nekomata(
10861086
10871087
### 応答:
10881088
""".format(
1089-
input=user_msg["content"]
1089+
input=user_msg["content"].strip()
10901090
)
10911091

10921092
prompt = prompt.lstrip("\n")

0 commit comments

Comments
 (0)