mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
15a3e49a40
This reverts commit 5048fc7c9e
.
15 lines
511 B
Python
15 lines
511 B
Python
from typing import Generic, TypeVar
|
|
|
|
from pydantic import BaseModel, Field
|
|
from pydantic.generics import GenericModel
|
|
|
|
GenericBaseModel = TypeVar("GenericBaseModel", bound=BaseModel)
|
|
|
|
|
|
class CursorPaginatedResults(GenericModel, Generic[GenericBaseModel]):
|
|
"""Cursor-paginated results"""
|
|
|
|
limit: int = Field(..., description="Limit of items to get")
|
|
has_more: bool = Field(..., description="Whether there are more items available")
|
|
items: list[GenericBaseModel] = Field(..., description="Items")
|