> ## Documentation Index
> Fetch the complete documentation index at: https://docs.lapathoniia.top/llms.txt
> Use this file to discover all available pages before exploring further.

# Connectors Overview

> Live data from Prozorro and Держстат directly in chat

<Tabs sync={false}>
  <Tab title="EN">
    ## What are Connectors?

    Connectors give the model access to **real data** from Ukrainian government services during conversation:

    | Connector | Data | Source |
    | - | - | - |
    | **Prozorro** | Tenders, procurement, buyers, winners | ProZorro API |
    | **Держстат** | Official Ukrainian statistics (119 datasets) | stat.gov.ua SDMX API |

    ## Via Chat UI

    Click the **+** button → select a connector. The conversation is automatically enriched with live data.

    ## Via API

    ```python theme={null}
    import httpx, json

    resp = httpx.post(
        "https://app.lapathoniia.top/chat/stream",
        headers={"Authorization": "Bearer YOUR_API_KEY"},
        json={
            "message": "Find Ukrzaliznytsia tenders",
            "model": "hybrid",
            "session_id": "connectors-1",
            "user_id": "user-123",
            "web_search": False,
            "connectors": {
                "prozorro": True,
                "stats": False,
            },
            "chat_history": [],
        },
    )

    for line in resp.iter_lines():
        if line.startswith("data: "):
            d = json.loads(line[6:])
            if "text" in d:
                print(d["text"], end="")
    ```

    <Note>
      Recommend using **Рада** (`hybrid`) for connectors — LapaLLM handles tool calling, MamayLM generates the final answer.
    </Note>
  </Tab>

  <Tab title="UA">
    ## What are Connectors?

    Конектори дають моделі доступ до **реальних даних** українських державних сервісів під час розмови:

    | Конектор | Дані | Джерело |
    | - | - | - |
    | **Prozorro** | Тендери, закупівлі, замовники, переможці | ProZorro API |
    | **Держстат** | Офіційна статистика України (119 датасетів) | stat.gov.ua SDMX API |

    ## Via Chat UI

    Натисніть кнопку **+** → оберіть конектор. Розмова автоматично збагачується живими даними.

    ## Via API

    ```python theme={null}
    resp = httpx.post(
        "https://app.lapathoniia.top/chat/stream",
        headers={"Authorization": "Bearer YOUR_API_KEY"},
        json={
            "message": "Знайди тендери Укрзалізниці",
            "model": "hybrid",
            "session_id": "connectors-1",
            "user_id": "user-123",
            "web_search": False,
            "connectors": {"prozorro": True, "stats": False},
            "chat_history": [],
        },
    )
    ```
  </Tab>
</Tabs>
