When streaming responses from Claude 3 using the Anthropic Typescript SDK, after several tokens, I get an error:
Could not parse message into JSON:
From chunk: [ 'event: content_block_delta' ]
⨯ Error: failed to pipe response
This error doesn't happen if I go directly to Anthropic's API by omitting the baseURL and defaultHeaders in the client constructor:
``function getAnthropic() {
return new Anthropic({
apiKey: process.env.ANTHROPIC_API_KEY,
// baseURL: 'https://anthropic.hconeai.com/',
// defaultHeaders: {
// 'Helicone-Auth':
Bearer ${process.env.ANTHROPIC_API_KEY}`,
// },
});
}