Skip to content

Calling tokenizer.encode('toString') errors due to bpe function #17

@jihan-yin

Description

@jihan-yin
const tokenizer = new GPT3Tokenizer({ type: 'gpt3' });
tokenizer.encode('toString')

will fail. This is because tokenizer.bpe('toString') returns the javascript function toString() instead of an actual string representing the token.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions