Y
Hacker News
new
|
ask
|
show
|
jobs
by
yunyu
1101 days ago
You simply sample tokens starting with the allowed characters and truncate if needed. It’s pretty efficient, there’s an implementation here:
https://github.com/1rgs/jsonformer