mirror of
https://github.com/Wei-Shaw/claude-relay-service.git
synced 2026-01-22 16:43:35 +00:00
fix: handle bedrock content block start/stop events
This commit is contained in:
@@ -588,6 +588,17 @@ class BedrockRelayService {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (bedrockChunk.type === 'content_block_start') {
|
||||||
|
return {
|
||||||
|
type: 'content_block_start',
|
||||||
|
data: {
|
||||||
|
type: 'content_block_start',
|
||||||
|
index: bedrockChunk.index || 0,
|
||||||
|
content_block: bedrockChunk.content_block || { type: 'text', text: '' }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (bedrockChunk.type === 'content_block_delta') {
|
if (bedrockChunk.type === 'content_block_delta') {
|
||||||
return {
|
return {
|
||||||
type: 'content_block_delta',
|
type: 'content_block_delta',
|
||||||
@@ -598,6 +609,16 @@ class BedrockRelayService {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (bedrockChunk.type === 'content_block_stop') {
|
||||||
|
return {
|
||||||
|
type: 'content_block_stop',
|
||||||
|
data: {
|
||||||
|
type: 'content_block_stop',
|
||||||
|
index: bedrockChunk.index || 0
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (bedrockChunk.type === 'message_delta') {
|
if (bedrockChunk.type === 'message_delta') {
|
||||||
return {
|
return {
|
||||||
type: 'message_delta',
|
type: 'message_delta',
|
||||||
|
|||||||
Reference in New Issue
Block a user