* @param {string} text * @param {any} allowed_special * @param {any} disallowed_special * @returns {any}
(text, allowed_special, disallowed_special)
| 25707 | * @returns {any} |
| 25708 | */ |
| 25709 | encode_with_unstable(text, allowed_special, disallowed_special) { |
| 25710 | if (wasm == null) throw new Error("tiktoken: WASM binary has not been propery initialized."); |
| 25711 | try { |
| 25712 | const retptr = wasm.__wbindgen_add_to_stack_pointer(-16); |
| 25713 | const ptr0 = passStringToWasm0(text, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1); |
| 25714 | const len0 = WASM_VECTOR_LEN; |
| 25715 | wasm.tiktoken_encode_with_unstable(retptr, this.__wbg_ptr, ptr0, len0, addHeapObject(allowed_special), addHeapObject(disallowed_special)); |
| 25716 | var r0 = getInt32Memory0()[retptr / 4 + 0]; |
| 25717 | var r1 = getInt32Memory0()[retptr / 4 + 1]; |
| 25718 | var r22 = getInt32Memory0()[retptr / 4 + 2]; |
| 25719 | if (r22) { |
| 25720 | throw takeObject(r1); |
| 25721 | } |
| 25722 | return takeObject(r0); |
| 25723 | } finally { |
| 25724 | wasm.__wbindgen_add_to_stack_pointer(16); |
| 25725 | } |
| 25726 | } |
| 25727 | /** |
| 25728 | * @param {Uint8Array} bytes |
| 25729 | * @returns {number} |
nothing calls this directly
no test coverage detected