You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Sep 10, 2025. It is now read-only.
This fixes the following assert that is easy to repro in any chat session:
```
Traceback (most recent call last):
File "/home/ubuntu/cali/torchchat/torchchat.py", line 69, in <module>
generate_main(args)
File "/home/ubuntu/cali/torchchat/generate.py", line 896, in main
for _ in gen.chat(generator_args):
File "/home/ubuntu/cali/torchchat/generate.py", line 748, in chat
self.chat_formatter.encode_header(
File "/home/ubuntu/cali/torchchat/generate.py", line 53, in encode_header
tokens.extend(self.tokenizer.encode(role, bos=False, eos=False))
File "/home/ubuntu/cali/torchchat/tokenizer/tiktoken.py", line 133, in encode
assert type(s) is str
```
I believe this regressed with #1035.
0 commit comments