feat(tarot-lab): config + Pydantic 모델 5개 추출
This commit is contained in:
47
tarot-lab/app/models.py
Normal file
47
tarot-lab/app/models.py
Normal file
@@ -0,0 +1,47 @@
|
||||
"""Tarot Pydantic 모델 — agent-office models.py에서 추출."""
|
||||
from typing import List, Literal, Optional
|
||||
|
||||
from pydantic import BaseModel, Field
|
||||
|
||||
|
||||
class TarotCardDraw(BaseModel):
|
||||
position: str
|
||||
card_id: str
|
||||
reversed: bool = False
|
||||
|
||||
|
||||
class TarotInterpretRequest(BaseModel):
|
||||
spread_type: Literal["one_card", "three_card"]
|
||||
category: Optional[str] = None
|
||||
question: Optional[str] = None
|
||||
cards: List[TarotCardDraw]
|
||||
cards_reference: str = Field(..., min_length=1)
|
||||
context_meta: dict = Field(default_factory=dict)
|
||||
|
||||
|
||||
class TarotInterpretResponse(BaseModel):
|
||||
interpretation_json: dict
|
||||
model: str
|
||||
tokens_in: int
|
||||
tokens_out: int
|
||||
cost_usd: float
|
||||
latency_ms: int
|
||||
reroll_count: int = 0
|
||||
|
||||
|
||||
class TarotSaveRequest(BaseModel):
|
||||
spread_type: Literal["one_card", "three_card"]
|
||||
category: Optional[str] = None
|
||||
question: Optional[str] = None
|
||||
cards: List[TarotCardDraw]
|
||||
interpretation_json: dict
|
||||
model: str
|
||||
tokens_in: int
|
||||
tokens_out: int
|
||||
cost_usd: float
|
||||
confidence: Optional[str] = None
|
||||
|
||||
|
||||
class TarotPatchRequest(BaseModel):
|
||||
favorite: Optional[bool] = None
|
||||
note: Optional[str] = None
|
||||
Reference in New Issue
Block a user