Skip to content

response_models

Sample response models for parsing.

TextResponse

Bases: BaseModel

A text response.

Source code in spark_instructor/response_models.py
class TextResponse(BaseModel):
    """A text response."""

    text: str

User

Bases: BaseModel

A user.

Source code in spark_instructor/response_models.py
class User(BaseModel):
    """A user."""

    name: str
    age: int