From bcf1fcebc0f177554792d72b14ad509bbb6a4c81 Mon Sep 17 00:00:00 2001 From: Wei-Jianan Date: Thu, 13 Jun 2024 05:08:44 +0000 Subject: [PATCH] [fix] Type hint --- metagpt/provider/bedrock_api.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/metagpt/provider/bedrock_api.py b/metagpt/provider/bedrock_api.py index 005488ecf..03954e5c2 100644 --- a/metagpt/provider/bedrock_api.py +++ b/metagpt/provider/bedrock_api.py @@ -1,7 +1,7 @@ import asyncio import json from functools import partial -from typing import Literal +from typing import List, Literal import boto3 from botocore.eventstream import EventStream @@ -128,7 +128,7 @@ class BedrockLLM(BaseLLM): response_body = json.loads(response["body"].read()) return response_body - async def _get_stream_response_body(self, stream_response) -> str: + async def _get_stream_response_body(self, stream_response) -> List[str]: def collect_content() -> str: collected_content = [] for event in stream_response["body"]: