Skip to content

Commit b0e0e36

Browse files
committed
fix AWSEventStreamDecoder linting
1 parent 6112c95 commit b0e0e36

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

Diff for: litellm/llms/bedrock/chat/invoke_handler.py

+7-2
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ async def make_call(
219219
model_response=model_response, json_mode=json_mode
220220
)
221221
elif bedrock_invoke_provider == "anthropic":
222-
decoder = AmazonAnthropicClaudeStreamDecoder(
222+
decoder: AWSEventStreamDecoder = AmazonAnthropicClaudeStreamDecoder(
223223
model=model,
224224
sync_stream=False,
225225
)
@@ -297,7 +297,7 @@ def make_sync_call(
297297
model_response=model_response, json_mode=json_mode
298298
)
299299
elif bedrock_invoke_provider == "anthropic":
300-
decoder = AmazonAnthropicClaudeStreamDecoder(
300+
decoder: AWSEventStreamDecoder = AmazonAnthropicClaudeStreamDecoder(
301301
model=model,
302302
sync_stream=True,
303303
)
@@ -1454,6 +1454,11 @@ def __init__(
14541454
model: str,
14551455
sync_stream: bool,
14561456
) -> None:
1457+
"""
1458+
Child class of AWSEventStreamDecoder that handles the streaming response from the Anthropic family of models
1459+
1460+
The only difference between AWSEventStreamDecoder and AmazonAnthropicClaudeStreamDecoder is the `chunk_parser` method
1461+
"""
14571462
super().__init__(model=model)
14581463
self.anthropic_model_response_iterator = AnthropicModelResponseIterator(
14591464
streaming_response=None,

0 commit comments

Comments
 (0)