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.1.tar.gz (14.1 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.1-py3-none-any.whl (13.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: autogen_gigachat-0.1.1.tar.gz
  • Upload date:
  • Size: 14.1 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.1.tar.gz
Algorithm Hash digest
SHA256 72265dc7c0ede2d3ab0d248ec510f49f81e9168f14a24c6de77561019ac1a8c2
MD5 db0a2b45e55bae5bd7286704ca56e64e
BLAKE2b-256 fb569ccbf7c36a59845e9edfd9f72e9adfb08b054c9c3e974bc1552e2b924fed

See more details on using hashes here.

Provenance

The following attestation bundles were made for autogen_gigachat-0.1.1.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.1-py3-none-any.whl.

File metadata

File hashes

Hashes for autogen_gigachat-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 33b72221d881a1e3e65bfd5efde7970b030ee514e7d8b5b019f3afb28e5b6675
MD5 7d2fbc6609bee40d0c0a66b81272fe41
BLAKE2b-256 2f6b36c1b428552a36d430203d24ea17da335ad1227d16399d7d42879b9d78b6

See more details on using hashes here.

Provenance

The following attestation bundles were made for autogen_gigachat-0.1.1-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