mirror of
https://github.com/theroyallab/tabbyAPI.git
synced 2026-03-15 00:07:28 +00:00
API: Ignore add_bos_token in chat completions
When fetching special tokens from the model, don't factor in the add_bos_token and ban_eos_token parameters as switches. In addition, change the internal handling of add_bos_token to an optional boolean. This allows us to fallback to the model when selecting whether or not to add the BOS token, especially for chat completions. Signed-off-by: kingbri <8082010+kingbri1@users.noreply.github.com>
This commit is contained in:
@@ -123,7 +123,7 @@ class BaseModelContainer(abc.ABC):
|
||||
pass
|
||||
|
||||
@abc.abstractmethod
|
||||
def get_special_tokens(self, **kwargs) -> Dict[str, Any]:
|
||||
def get_special_tokens(self) -> Dict[str, Any]:
|
||||
"""
|
||||
Gets special tokens used by the model/tokenizer.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user