Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to set the model in encode / encode generator like encodeChat or encodeChatGenerator? #34

Open
MiniSuperDev opened this issue Oct 7, 2023 · 0 comments

Comments

@MiniSuperDev
Copy link

How to set the model in encode / encodeGenerator like encodeChat or encodeChatGenerator?

import { encode } from 'gpt-tokenizer'

const text = 'Hello, world!'
const generator =encodeGenerator(text, /* I want to add model or decoder here */)

like

import { encodeChatGenerator } from 'gpt-tokenizer'

const generator = encodeGenerator(messages, 'gpt-3.5-turbo')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant