(model: string = 'test-model')
| 6 | import { describe, it, expect, vi } from 'vitest'; |
| 7 | |
| 8 | function makeChatCompletionResponse(model: string = 'test-model') { |
| 9 | return { |
| 10 | id: 'chatcmpl-test123', |
| 11 | object: 'chat.completion', |
| 12 | created: 1234567890, |
| 13 | model, |
| 14 | choices: [ |
| 15 | { |
| 16 | index: 0, |
| 17 | message: { role: 'assistant', content: 'Hello' }, |
| 18 | finish_reason: 'stop', |
| 19 | }, |
| 20 | ], |
| 21 | usage: { prompt_tokens: 10, completion_tokens: 5, total_tokens: 15 }, |
| 22 | }; |
| 23 | } |
| 24 | |
| 25 | function createProvider( |
| 26 | stream: boolean = false, |
no outgoing calls
no test coverage detected