"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""

from __future__ import annotations
from .link import Link, LinkTypedDict
from ragie.types import BaseModel
from typing import Any, Dict, Optional
from typing_extensions import NotRequired, TypedDict


class DocumentChunkTypedDict(TypedDict):
    id: str
    text: str
    links: Dict[str, LinkTypedDict]
    index: NotRequired[int]
    metadata: NotRequired[Dict[str, Any]]


class DocumentChunk(BaseModel):
    id: str

    text: str

    links: Dict[str, Link]

    index: Optional[int] = -1

    metadata: Optional[Dict[str, Any]] = None
