mirror of
https://github.com/theroyallab/tabbyAPI.git
synced 2026-04-28 02:01:24 +00:00
OAI: Tokenize chat completion messages
Since chat completion messages are a structure, format the prompt before checking in the tokenizer. Signed-off-by: kingbri <bdashore3@proton.me>
This commit is contained in:
@@ -566,7 +566,9 @@ class ExllamaV2Container:
|
||||
decode_special_tokens=unwrap(kwargs.get("decode_special_tokens"), True),
|
||||
)[0]
|
||||
|
||||
def get_special_tokens(self, add_bos_token: bool, ban_eos_token: bool):
|
||||
def get_special_tokens(
|
||||
self, add_bos_token: bool = True, ban_eos_token: bool = False
|
||||
):
|
||||
return {
|
||||
"bos_token": self.tokenizer.bos_token if add_bos_token else "",
|
||||
"eos_token": self.tokenizer.eos_token if not ban_eos_token else "",
|
||||
|
||||
Reference in New Issue
Block a user