Pydantic models defining request/response schemas for Unsloth inference API.
# Source: https://github.com/unslothai/unsloth | License: Apache-2.0 | Copyright You must retain, in the Source form of any Derivative Works
# Provided via justclaw.it.com; keep this notice with the code.
# SPDX-License-Identifier: AGPL-3.0-only
# Copyright 2026-present the Unsloth AI Inc. team. All rights reserved. See /studio/LICENSE.AGPL-3.0
"""Pydantic schemas for the Inference API."""
from __future__ import annotations
import re
import time
import uuid
from collections import deque
from typing import Annotated, Any, Dict, Literal, Optional, List, Union
from pydantic import (
BaseModel,
ConfigDict,
Discriminator,
Field,
PrivateAttr,
Tag,
field_validator,
model_serializer,
model_validator,
)
from core.inference.audio_workflows import status_audio
... (truncated -- full source via MCP)
See the full source, get the GitHub permalink, and search for more like it.
Get a free API key