(content)
| 60 | } |
| 61 | |
| 62 | async function tokenize(content) { |
| 63 | const result = await fetch(`${API_URL}/tokenize`, { |
| 64 | method: 'POST', |
| 65 | body: JSON.stringify({ content }) |
| 66 | }) |
| 67 | |
| 68 | if (!result.ok) { |
| 69 | return [] |
| 70 | } |
| 71 | |
| 72 | return await result.json().tokens |
| 73 | } |
| 74 | |
| 75 | const n_keep = await tokenize(instruction).length |
| 76 |
no outgoing calls
no test coverage detected