()
| 117 | const messages = [{ role: 'user' as const, content: 'Explain' }]; |
| 118 | type Processor = { no_repeat_ngram_size: number; _call(ids: bigint[][], logits: unknown): unknown }; |
| 119 | const processor = () => (fake.generate.mock.calls.at(-1)![0] as { logits_processor: { processors: Processor[] } }).logits_processor.processors; |
| 120 | await send({ id: 2, kind: 'chat', messages, generationProfile: 'automatic-explanation' }); |
| 121 | expect(fake.generate).toHaveBeenLastCalledWith(expect.objectContaining({ max_new_tokens: 128, do_sample: false, repetition_penalty: 1.1 })); |
| 122 | expect(processor().map(item => item.no_repeat_ngram_size)).toEqual([6]); |
no outgoing calls
no test coverage detected