Skip to content

Commit

Permalink
Merge pull request #39 from ai-forever/feature/gigachat-vision
Browse files Browse the repository at this point in the history
Добавил  пример работы с GigaChat Vision
  • Loading branch information
Mikelarg authored Nov 11, 2024
2 parents d74ea5d + a55c751 commit 09f77c5
Show file tree
Hide file tree
Showing 5 changed files with 160 additions and 3 deletions.
1 change: 1 addition & 0 deletions examples/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,4 @@
* [Пример подсчёта токенов](./example_tokens.py)
* [Пример получения изображения](./example_get_image.py)
* [Jupyter-ноутбук с примером работы с чатом и изображениями](./simple_chat_with_images.ipynb)
* [Jupyter-ноутбук с примером работы c GigaChat Vision](./vision/vision.ipynb)
Binary file added examples/vision/cat.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
156 changes: 156 additions & 0 deletions examples/vision/vision.ipynb

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/gigachat/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ def __init__(
cert_file: Optional[str] = None,
key_file: Optional[str] = None,
key_file_password: Optional[str] = None,
flags: Optional[list[str]] = None,
flags: Optional[List[str]] = None,
**_unknown_kwargs: Any,
) -> None:
if _unknown_kwargs:
Expand Down
4 changes: 2 additions & 2 deletions src/gigachat/settings.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from typing import Optional
from typing import List, Optional

from gigachat.pydantic_v1 import BaseSettings

Expand Down Expand Up @@ -37,7 +37,7 @@ class Settings(BaseSettings):
cert_file: Optional[str] = None
key_file: Optional[str] = None
key_file_password: Optional[str] = None
flags: Optional[list[str]] = None
flags: Optional[List[str]] = None

class Config:
env_prefix = ENV_PREFIX

0 comments on commit 09f77c5

Please sign in to comment.