Skip to content

Commit

Permalink
fix a type typo
Browse files Browse the repository at this point in the history
  • Loading branch information
jm12138 committed Aug 22, 2023
1 parent 4a7035b commit a97c92f
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions wenxinworkshop/apis.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,13 +115,13 @@ class LLMAPI:
penalty_score: Optional[float] = None,
stream: Optional[bool] = None,
user_id: Optional[str] = None,
chunk_size: Optional[int] = 512
chunk_size: int = 512
) -> Union[str, Generator[str, None, None]]:
Get response from LLM API.
stream_response(
response: requests.Response,
chunk_size: Optional[int] = 512
chunk_size: int = 512
) -> Generator[str, None, None]:
Stream response from LLM API.
Expand Down Expand Up @@ -203,7 +203,7 @@ def __call__(
penalty_score: Optional[float] = None,
stream: Optional[bool] = None,
user_id: Optional[str] = None,
chunk_size: Optional[int] = 512
chunk_size: int = 512
) -> Union[str, Generator[str, None, None]]:
'''
Get response from LLM API.
Expand All @@ -228,7 +228,7 @@ def __call__(
user_id : Optional[str], optional
User ID of LLM API, by default None.
chunk_size : Optional[int], optional
chunk_size : int, optional
Chunk size of LLM API, by default 512.
Returns
Expand Down Expand Up @@ -317,7 +317,7 @@ def __call__(
@staticmethod
def stream_response(
response: requests.Response,
chunk_size: Optional[int] = 512
chunk_size: int = 512
) -> Generator[str, None, None]:
'''
Stream response from LLM API.
Expand All @@ -327,7 +327,7 @@ def stream_response(
response : requests.Response
Response from LLM API.
chunk_size : Optional[int], optional
chunk_size : int, optional
Chunk size of LLM API, by default 512.
Yields
Expand Down

0 comments on commit a97c92f

Please sign in to comment.