Skip to content

Commit 741eb53

Browse files
committed
Add discussions to ChatStageConfig so it adds default value.
1 parent ccf53a7 commit 741eb53

File tree

2 files changed

+8
-7
lines changed

2 files changed

+8
-7
lines changed

docs/developers/experiment-api-codelab.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -247,16 +247,16 @@ Export all experiment data including participant responses:
247247
# Export full experiment data
248248
data = client.export_experiment(experiment_id)
249249

250-
# Access exported structure
250+
# Access exported structure (uses Map format)
251251
experiment = data["experiment"]
252-
stages = data["stages"]
253-
cohorts = data["cohorts"]
254-
participants = data["participants"]
252+
stage_map = data["stageMap"]
253+
cohort_map = data["cohortMap"]
254+
participant_map = data["participantMap"]
255255

256256
print(f"Experiment: {experiment['metadata']['name']}")
257-
print(f"Stages: {len(stages)}")
258-
print(f"Cohorts: {len(cohorts)}")
259-
print(f"Total participants: {len(participants)}")
257+
print(f"Stages: {len(stage_map)}")
258+
print(f"Cohorts: {len(cohort_map)}")
259+
print(f"Total participants: {len(participant_map)}")
260260

261261
# Save to file
262262
import json

scripts/deliberate_lab/types.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -627,6 +627,7 @@ class ChatStageConfig(BaseModel):
627627
name: str
628628
descriptions: Any
629629
progress: Any
630+
discussions: list[Any] = [] # Required for cohort creation
630631
timeLimitInMinutes: float | None = None
631632
requireFullTime: bool | None = None
632633

0 commit comments

Comments
 (0)