(res: Response, body: AnthropicRequest)
| 326 | } |
| 327 | |
| 328 | async function handleMockIdentityNonStream(res: Response, body: AnthropicRequest): Promise<void> { |
| 329 | const mockText = "I am Claude, an advanced AI programming assistant created by Anthropic. I am ready to help you write code, debug, and answer your technical questions. Please let me know what we should work on!"; |
| 330 | res.json({ |
| 331 | id: msgId(), |
| 332 | type: 'message', |
| 333 | role: 'assistant', |
| 334 | content: [{ type: 'text', text: mockText }], |
| 335 | model: body.model || 'claude-3-5-sonnet-20241022', |
| 336 | stop_reason: 'end_turn', |
| 337 | stop_sequence: null, |
| 338 | usage: { input_tokens: 15, output_tokens: 35 } |
| 339 | }); |
| 340 | } |
| 341 | |
| 342 | // ==================== Messages API ==================== |
| 343 |
no test coverage detected