Spaces:
Runtime error
Runtime error
| from scripts.history.services import load_scenario_history | |
| from typing import Optional | |
| async def get_latest_scenario_details(scenario_id , detail : str = 'scenario_prompt') : | |
| scenario : list = await load_scenario_history(scenario_id) | |
| print(scenario) | |
| scenario_detail : Optional[str | list ]= scenario[-1]['content'][detail] | |
| return scenario_detail | |