INNER CODE UNIT · Python

_validate

simonlin1212/vibe-astock · vr/app.py:67

def _validate(code: str) -> str:
    code = (code or "").strip()
    if not code.isdigit() or len(code) != 6:
        raise HTTPException(400, "代码必须是 6 位数字")
    return code


@app.get("/api/health")
def health():
    return {"ok": True, "service": "vibe-astock", "version": PRODUCT_VERSION}


class LLMConfig(BaseModel):
    provider: str = ""       # cli-* = 订阅接入(调本机 CLI);其余 = API 接入
    baseURL: str = ""        # 订阅接入时留空
    apiKey: str = ""         # 订阅接入时留空
    model: str

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…