skill-invocation-env / test_schema2.py
mpnikhil's picture
Upload folder using huggingface_hub
33bb385 verified
raw
history blame contribute delete
281 Bytes
from pydantic import BaseModel, Field
from typing import Optional
import json
class A(BaseModel):
answer: Optional[str] = Field(
default=None,
json_schema_extra={"type": "string", "maxLength": 100000}
)
print(json.dumps(A.model_json_schema(), indent=2))