diff --git a/pyproject.toml b/pyproject.toml index aa84d73..5e1aa56 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "gigachat" -version = "0.1.32" +version = "0.1.33" description = "GigaChat. Python-library for GigaChain and LangChain" authors = ["Konstantin Krestnikov ", "Sergey Malyshev "] license = "MIT" diff --git a/src/gigachat/api/utils.py b/src/gigachat/api/utils.py index 0f20b9c..f3b5ef3 100644 --- a/src/gigachat/api/utils.py +++ b/src/gigachat/api/utils.py @@ -1,5 +1,5 @@ import logging -from typing import Dict, Optional, TypeVar +from typing import Dict, Optional, Type, TypeVar from gigachat.context import ( authorization_cvar, @@ -49,7 +49,7 @@ def build_headers(access_token: Optional[str] = None) -> Dict[str, str]: T = TypeVar("T", bound=BaseModel) -def parse_chunk(line: str, model_class: type[T]) -> Optional[T]: +def parse_chunk(line: str, model_class: Type[T]) -> Optional[T]: try: name, _, value = line.partition(": ") if name == "data":