Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions app/schemas/openai.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

from __future__ import annotations

from enum import Enum
from enum import StrEnum
import time
from typing import Any, ClassVar, Literal, TypeAlias
import uuid
Expand Down Expand Up @@ -58,7 +58,7 @@ class Config:
TRANSCRIPTION_MODEL = "local-transcription-model"


class HealthCheckStatus(str, Enum):
class HealthCheckStatus(StrEnum):
"""Health check status."""

OK = "ok"
Expand Down Expand Up @@ -450,38 +450,38 @@ class ModelsResponse(OpenAIBaseModel):
data: list[Model] = Field(..., description="List of models.")


class ImageSize(str, Enum):
class ImageSize(StrEnum):
"""Available image sizes."""

SMALL = "256x256"
MEDIUM = "512x512"
LARGE = "1024x1024"


class Priority(str, Enum):
class Priority(StrEnum):
"""Task priority levels."""

LOW = "low"
NORMAL = "normal"
HIGH = "high"


class ImageEditQuality(str, Enum):
class ImageEditQuality(StrEnum):
"""Image edit quality levels."""

LOW = "low"
MEDIUM = "medium"
HIGH = "high"


class ImageResponseFormat(str, Enum):
class ImageResponseFormat(StrEnum):
"""Image edit response format."""

# Only support b64_json for now
B64_JSON = "b64_json"


class TranscriptionResponseFormat(str, Enum):
class TranscriptionResponseFormat(StrEnum):
"""Audio response format."""

JSON = "json"
Expand Down
Loading