Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dev #33

Merged
merged 2 commits into from
Aug 5, 2024
Merged

Dev #33

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -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 <[email protected]>", "Sergey Malyshev <[email protected]>"]
license = "MIT"
Expand Down
4 changes: 2 additions & 2 deletions src/gigachat/api/utils.py
Original file line number Diff line number Diff line change
@@ -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,
Expand Down Expand Up @@ -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":
Expand Down
Loading