Skip to main content

Gigachat client for autogen

Project description

О autogen-gigachat

autogen-gigachat — это Python-библиотека для подключения модели Gigachat в autogen

Установка

Для установки библиотеки можно использовать менеджер пакетов pip:

pip install autogen-gigachat

Настройка

В autogen-studio добавить новую модель c 'provider = autogen_gigachat.GigachatChatCompletionClient'

Пример конфигурации:

{
  "provider": "autogen_gigachat.GigachatChatCompletionClient",
  "component_type": "model",
  "version": 1,
  "component_version": 1,
  "description": "Gigachat Lite",
  "label": "Gigachat Lite",
  "config": {
    "model": "GigaChat-2",
    "verify_ssl_certs": false,
    "verbose": true
  }
}

Необходимо указать данные для авторизации.

Можно записать в переменную окружения GIGACHAT_API_KEY или в параметр api_key в json-конфигурации один из вариантов значения:

  • giga-cred-<credentials>:<scope> — для авторизации credentials + scope
  • giga-user-<user>:<password> — для авторизации через имя пользователя и пароль
  • giga-auth-<access_token> — для передачи access_token (который получается одним из первых двух способов)

Также можно использовать переменные, которые поддерживает библиотека GigaChat:

  • GIGACHAT_USER и GIGACHAT_PASSWORD — для авторизации с помощью с помощью логина и пароля.
  • GIGACHAT_CREDENTIALS — для авторизации с помощью ключа авторизации.
  • GIGACHAT_ACCESS_TOKEN — для авторизации с помощью токен доступа, полученного в обмен на ключ.
  • GIGACHAT_VERIFY_SSL_CERTS — для того, что бы проверять SSL сертификаты, по умолчанию False.

Разработка

Для сборки применяется пакетный менеджер uv. Установка описана тут: https://docs.astral.sh/uv/getting-started/installation/.

Установка зависимостей:

uv sync

Лицензия

Проект распространяется под лицензией MIT. Подробная информация — в файле LICENSE.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

autogen_gigachat-0.1.0.tar.gz (14.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

autogen_gigachat-0.1.0-py3-none-any.whl (13.5 kB view details)

Uploaded Python 3

File details

Details for the file autogen_gigachat-0.1.0.tar.gz.

File metadata

  • Download URL: autogen_gigachat-0.1.0.tar.gz
  • Upload date:
  • Size: 14.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for autogen_gigachat-0.1.0.tar.gz
Algorithm Hash digest
SHA256 5370872402d1f183d6f3a48ca1aa32a28a34428eb4d142ff6e2e0cd50e7bef0c
MD5 5676ab95254c896a35da1ce6cb977864
BLAKE2b-256 65dc5c6bc6b56c2c074b7a5740a4f470e1a8b4d55590eb6620e51485352e9b19

See more details on using hashes here.

Provenance

The following attestation bundles were made for autogen_gigachat-0.1.0.tar.gz:

Publisher: publish-pypi.yml on KnyazSh/autogen-gigachat

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file autogen_gigachat-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for autogen_gigachat-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 bd36cf200679b694fef55cc40d78f97e3ba6a3303c70df9c4425c6a2d301a45f
MD5 67ca4a59f101e4c703a192e51017ea26
BLAKE2b-256 5bd9744700bfbd09f9fa59f1888ec05e7510f13aa26769776e53cbe426628f4b

See more details on using hashes here.

Provenance

The following attestation bundles were made for autogen_gigachat-0.1.0-py3-none-any.whl:

Publisher: publish-pypi.yml on KnyazSh/autogen-gigachat

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page