Spaces:
Running
Running
Upload folder using huggingface_hub
Browse files- models.py +1 -2
- test_schema2.py +11 -0
models.py
CHANGED
|
@@ -42,8 +42,7 @@ class SkillInvocationAction(Action):
|
|
| 42 |
answer: Optional[str] = Field(
|
| 43 |
default=None,
|
| 44 |
description='Solution text (required for submit)',
|
| 45 |
-
|
| 46 |
-
json_schema_extra={"type": "string"}
|
| 47 |
)
|
| 48 |
|
| 49 |
|
|
|
|
| 42 |
answer: Optional[str] = Field(
|
| 43 |
default=None,
|
| 44 |
description='Solution text (required for submit)',
|
| 45 |
+
json_schema_extra={"type": "string", "maxLength": 100000}
|
|
|
|
| 46 |
)
|
| 47 |
|
| 48 |
|
test_schema2.py
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from pydantic import BaseModel, Field
|
| 2 |
+
from typing import Optional
|
| 3 |
+
import json
|
| 4 |
+
|
| 5 |
+
class A(BaseModel):
|
| 6 |
+
answer: Optional[str] = Field(
|
| 7 |
+
default=None,
|
| 8 |
+
json_schema_extra={"type": "string", "maxLength": 100000}
|
| 9 |
+
)
|
| 10 |
+
|
| 11 |
+
print(json.dumps(A.model_json_schema(), indent=2))
|