(question)
| 55 | const instruction = `A chat between a curious human and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the human's questions.` |
| 56 | |
| 57 | function format_prompt(question) { |
| 58 | return `${instruction}\n${ |
| 59 | chat.map(m =>`### Human: ${m.human}\n### Assistant: ${m.assistant}`).join("\n") |
| 60 | }\n### Human: ${question}\n### Assistant:` |
| 61 | } |
| 62 | |
| 63 | async function tokenize(content) { |
| 64 | const result = await fetch(`${API_URL}/tokenize`, { |
no test coverage detected