(input?: Usage)
| 58 | } |
| 59 | |
| 60 | function tokens(input?: Usage) { |
| 61 | if (!input) return |
| 62 | return { |
| 63 | prompt_tokens: input.input, |
| 64 | completion_tokens: input.output, |
| 65 | total_tokens: input.input + input.output, |
| 66 | } |
| 67 | } |
| 68 | |
| 69 | function chunk(input: { delta?: Record<string, unknown>; finish?: string; usage?: Usage }) { |
| 70 | return { |
no outgoing calls
no test coverage detected