kapil-vps / scripts /routers /services.py
ayushsinghal1510's picture
Intial Commit
34df346
raw
history blame contribute delete
374 Bytes
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