Skip to content

Commit 071fbde

Browse files
committed
Update schemas.
1 parent 92c6ddf commit 071fbde

File tree

4 files changed

+61
-1
lines changed

4 files changed

+61
-1
lines changed

docs/assets/api/schemas.json

Lines changed: 40 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -341,6 +341,9 @@
341341
"items": {
342342
"type": "string"
343343
}
344+
},
345+
"youtubeVideoId": {
346+
"type": "string"
344347
}
345348
},
346349
"required": [
@@ -1894,9 +1897,45 @@
18941897
},
18951898
"progress": {
18961899
"$ref": "#/$defs/StageProgressConfig"
1900+
},
1901+
"timeLimitInMinutes": {
1902+
"anyOf": [
1903+
{
1904+
"type": "number"
1905+
},
1906+
{
1907+
"type": "null"
1908+
}
1909+
]
1910+
},
1911+
"requireFullTime": {
1912+
"type": "boolean"
1913+
},
1914+
"isTurnBasedChat": {
1915+
"type": "boolean"
1916+
},
1917+
"minNumberOfTurns": {
1918+
"type": "number"
1919+
},
1920+
"maxNumberOfTurns": {
1921+
"anyOf": [
1922+
{
1923+
"type": "number"
1924+
},
1925+
{
1926+
"type": "null"
1927+
}
1928+
]
18971929
}
18981930
},
1899-
"required": ["id", "kind", "name", "descriptions", "progress"],
1931+
"required": [
1932+
"id",
1933+
"kind",
1934+
"name",
1935+
"descriptions",
1936+
"progress",
1937+
"timeLimitInMinutes"
1938+
],
19001939
"title": "PrivateChatStageConfig"
19011940
},
19021941
"ProfileStageConfig": {

scripts/deliberate_lab/types.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -380,6 +380,7 @@ class InfoStageConfig(BaseModel):
380380
descriptions: Any
381381
progress: Any
382382
infoLines: List[str]
383+
youtubeVideoId: str | None = None
383384

384385

385386
class ItemRankingStageConfig(BaseModel):
@@ -464,6 +465,11 @@ class PrivateChatStageConfig(BaseModel):
464465
name: str
465466
descriptions: Any
466467
progress: Any
468+
timeLimitInMinutes: float | None = None
469+
requireFullTime: bool | None = None
470+
isTurnBasedChat: bool | None = None
471+
minNumberOfTurns: float | None = None
472+
maxNumberOfTurns: float | None = None
467473

468474

469475
class ProfileStageConfig(BaseModel):

utils/src/stages/info_stage.validation.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ export const InfoStageConfigData = Type.Object(
2121
descriptions: Type.Ref(StageTextConfigSchema),
2222
progress: Type.Ref(StageProgressConfigSchema),
2323
infoLines: Type.Array(Type.String()),
24+
// Optional YouTube video ID to display
25+
youtubeVideoId: Type.Optional(Type.String()),
2426
},
2527
{$id: 'InfoStageConfig', ...strict},
2628
);

utils/src/stages/private_chat_stage.validation.ts

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,17 @@ export const PrivateChatStageConfigData = Type.Object({
1515
name: Type.String(),
1616
descriptions: Type.Ref(StageTextConfigSchema),
1717
progress: Type.Ref(StageProgressConfigSchema),
18+
// If defined, ends chat after specified time limit
19+
// (starting from when the first message is sent)
20+
timeLimitInMinutes: Type.Union([Type.Number(), Type.Null()]),
21+
// Require participants to stay in chat until time limit is up
22+
requireFullTime: Type.Optional(Type.Boolean()),
23+
// If true, requires participant to go back and forth with mediator(s)
24+
// (rather than being able to send multiple messages at once)
25+
isTurnBasedChat: Type.Optional(Type.Boolean()),
26+
// Minimum number of messages participant must send to move on
27+
minNumberOfTurns: Type.Optional(Type.Number()),
28+
// If turn based chat set to true, this specifies the max
29+
// number of messages the participant can send
30+
maxNumberOfTurns: Type.Optional(Type.Union([Type.Number(), Type.Null()])),
1831
});

0 commit comments

Comments
 (0)