(output: &mut impl Write, bytes: &[u8])
| 54 | } |
| 55 | |
| 56 | pub fn animate_output(output: &mut impl Write, bytes: &[u8]) -> Result<(), ChatError> { |
| 57 | for b in bytes.chunks(12) { |
| 58 | output.write_all(b)?; |
| 59 | std::thread::sleep(Duration::from_millis(16)); |
| 60 | } |
| 61 | Ok(()) |
| 62 | } |
| 63 | |
| 64 | /// Returns `true` if the character is from an invisible or control Unicode range |
| 65 | /// that is considered unsafe for LLM input. These rarely appear in normal input, |
no outgoing calls
no test coverage detected