Catalog PyPI
PACKAGE EXPLORERView in registry

acty-gigachat

PyPI

GigaChat executor for acty

gigachatlangchainsessionstelemetryworkflow
Versions collected1
Direct dependencies11From release 0.1.0
Last observed20 Oct, 18:43 UTC

README

Version 0.1.0 documentation

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 acty and acty-core because it imports symbols from both at runtime

Downloads & popularity

Awaiting observations

No metric observations yet

Download counts and popularity will appear here as the collector receives them.

Versions 1

Collected releases
VersionPublishedDirect dependenciesOpen version
0.1.05 Apr 202611

Package advisories

0
No matching advisories collected

This describes our collected data; it is not a security assessment.

Repository

PENDING
conspol/acty-gigachat

Shared repository data · GitHub

License detected in repository
Not collected

Metadata history

Meaningful changes
Current collected state Current

Observed since 20 Oct, 18:43 UTC

No superseded metadata states collected. Unchanged observations do not create new revisions.

Record identity

package:7aab8e78312de3240b849986453cb9a5a86bf317025b89a987f44852a099ca4e