Skip to content

Models

Response model classes (mirror OpenAI SDK objects).

Message

A single chat message.

Source code in superme_sdk/models.py
class Message:
    """A single chat message."""

    def __init__(self, data: dict) -> None:
        self.role: str = data.get("role", "assistant")
        self.content: str = data.get("content", "") or ""

Choice

One completion choice.

Source code in superme_sdk/models.py
class Choice:
    """One completion choice."""

    def __init__(self, data: dict) -> None:
        self.index: int = data.get("index", 0)
        self.message = Message(data.get("message") or {})
        self.finish_reason: Optional[str] = data.get("finish_reason")

Usage

Token usage statistics.

Source code in superme_sdk/models.py
class Usage:
    """Token usage statistics."""

    def __init__(self, data: dict) -> None:
        self.prompt_tokens: int = data.get("prompt_tokens", 0)
        self.completion_tokens: int = data.get("completion_tokens", 0)
        self.total_tokens: int = data.get("total_tokens", 0)

ChatCompletion

OpenAI-compatible chat completion response.

SuperMe-specific fields (metadata) are preserved as attributes.

Source code in superme_sdk/models.py
class ChatCompletion:
    """OpenAI-compatible chat completion response.

    SuperMe-specific fields (``metadata``) are preserved as attributes.
    """

    def __init__(self, data: dict) -> None:
        self.id: str = data.get("id", "")
        self.object: str = data.get("object", "chat.completion")
        self.created: int = data.get("created", 0)
        self.model: str = data.get("model", "")
        self.choices: list[Choice] = [Choice(c) for c in data.get("choices", [])]
        self.usage = Usage(data.get("usage") or {})
        self.metadata: Optional[dict] = data.get("metadata")

ProvisionRecord

Bases: TypedDict

A single provisioned member record.

Source code in superme_sdk/models.py
class ProvisionRecord(TypedDict, total=False):
    """A single provisioned member record."""

    user_id: str
    token: str
    name: str
    linkedin_url: Optional[str]
    contact_email: Optional[str]
    notes: Optional[str]
    claim_url: str
    status: str
    created_at: Optional[str]
    claimed_at: Optional[str]
    invited_at: Optional[str]
    socials: dict[str, str]
    doc_count: int
    audited: bool
    audited_at: Optional[str]
    deletion_requested_at: Optional[str]
    deletion_reason: Optional[str]
    reused: bool

ProvisionProfile

Bases: TypedDict

Input profile for :meth:~superme_sdk.SuperMeClient.provision_create_batch.

Source code in superme_sdk/models.py
class ProvisionProfile(TypedDict, total=False):
    """Input profile for :meth:`~superme_sdk.SuperMeClient.provision_create_batch`."""

    name: str
    linkedin_url: str
    contact_email: str
    notes: str
    socials: dict[str, str]
    external_urls: list[str]

StageInfo

Bases: TypedDict

A single stage from the interview status API.

Source code in superme_sdk/models.py
class StageInfo(TypedDict, total=False):
    """A single stage from the interview status API."""

    stage_number: int
    name: str
    status: str

InterviewStatus

Bases: TypedDict

Interview status response from get_interview_status.

Source code in superme_sdk/models.py
class InterviewStatus(TypedDict, total=False):
    """Interview status response from ``get_interview_status``."""

    interview_id: str
    status: str
    stages: list[StageInfo]
    active_stage: int