acty-gigachat
acty-gigachat provides a GigaChatExecutor implementation for Acty. It
adapts langchain-gigachat chat models to the Acty executor interface and adds
session-aware behavior for GigaChat prefix-caching workflows.
Install
pip install acty-gigachat
For local development:
pip install -e .[dev]
Usage
import asyncio
from acty import ActyEngine, EngineConfig
from acty_gigachat import GigaChatExecutor
from langchain_gigachat.chat_models import GigaChat
async def main() -> None:
model = GigaChat(credentials="YOUR_AUTHORIZATION_KEY", verify_ssl_certs=False)
engine = ActyEngine(
executor=GigaChatExecutor(model=model),
config=EngineConfig(primer_workers=1, follower_workers=1),
)
try:
submission = await engine.submit_group(
"demo",
{"input": "Hello!", "invoke_kwargs": {"temperature": 0.2}},
[],
)
if submission.primer is not None:
result = await submission.primer
print(result.output)
finally:
await engine.close()
asyncio.run(main())
Payloads may provide messages, input, or prompt. The executor forwards an
optional invoke_kwargs dictionary to the model.
Session Handling
GigaChatExecutor uses the GigaChat SDK session_id_cvar context variable to
control the X-Session-ID header during model calls.
- if
Job.context["cache"]["provider_ref"]is present, the executor reuses it - otherwise, it creates a per-group fallback session id
- session-invalid failures rotate to a new session id
- transient failures reuse the current session id
This makes the executor suitable for Acty cache flows where a primer attaches a provider reference and followers reuse it later.
Telemetry
The executor can enrich the active OpenTelemetry/OpenInference LLM span with:
- Acty correlation identifiers
- bounded input message attributes
- cached prompt token usage when the model response exposes it
This is enabled by default and respects the configured telemetry privacy gates.
Development
- tests live under
tests/ - the repo includes unit tests, session lifecycle tests, and Acty engine integration coverage for telemetry, retry, and TTL/session rotation behavior
- the package depends directly on both
actyandacty-corebecause it imports symbols from both at runtime
Metadata
Release files for acty-gigachat 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| acty_gigachat-0.1.0.tar.gz | 16.2 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| acty_gigachat-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 26.0 kB
Release files / acty_gigachat-0.1.0.tar.gz
| Download URL | acty_gigachat-0.1.0.tar.gz |
|---|---|
| Size | 16.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
441c6d0d365a83b6048450eb91bbecf944962eb290eecad1ac307df6bb3b2a7a
|
|
BLAKE2b-256 checksum How to use checksums |
aeb487be6d4c6522d14a0da8d0a56a52af756ebc2ed64e618a1a0ce1e9d2a9e4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.7
|
Release files / acty_gigachat-0.1.0-py3-none-any.whl
| Download URL | acty_gigachat-0.1.0-py3-none-any.whl |
|---|---|
| Size | 9.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
5527d2505183793beb5d9dd7fd5d4974c74b7f4b0c5c19a36e648edb0e094e49
|
|
BLAKE2b-256 checksum How to use checksums |
1b8f4e6d01f7fc035a4ddd55e1fb8a3843135a6275042098b2cdda80038e4980
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.7
|
Security for acty-gigachat 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.