Skip to content

livai_adapter

LivAI provider adapter implementation.

This module defines LivAIAdapter, an OpenAIAdapter specialization for LivAI-hosted models.

LivAIAdapter

Bases: OpenAIAdapter

Provider adapter for LivAI-hosted chat models.

LivAI models are served through OpenAI's API, so we can re-use the same behavior as the OpenAIAdapter, while exposing a different provider name.

Attributes:

Name Type Description
provider_name

Name of the provider handled by this adapter.

chat_client

Chat client class used to create LivAI chat clients.

Source code in src/mada/core/chat_clients/livai_adapter.py
class LivAIAdapter(OpenAIAdapter):
    """
    Provider adapter for LivAI-hosted chat models.

    LivAI models are served through OpenAI's API, so we can re-use the
    same behavior as the
    [`OpenAIAdapter`][core.chat_clients.openai_adapter.OpenAIAdapter],
    while exposing a different provider name.

    Attributes:
        provider_name:
            Name of the provider handled by this adapter.
        chat_client:
            Chat client class used to create LivAI chat clients.
    """

    provider_name = "livai"
    chat_client = OpenAIChatClient