tall-dawn-23938
11/10/2025, 10:24 AMlively-winter-88668
11/10/2025, 11:39 AMrefined-appointment-81829
11/10/2025, 8:47 PMfrom datetime import datetime
import json
def entrypoint(ctx: JobContext):
# Add the following code to the top, before calling ctx.connect()
async def write_transcript():
current_date = datetime.now().strftime("%Y%m%d_%H%M%S")
# This example writes to the temporary directory, but you can save to any location
filename = f"/tmp/transcript_{ctx.room.name}_{current_date}.json"
with open(filename, 'w') as f:
json.dump(session.history.to_dict(), f, indent=2)
print(f"Transcript for {ctx.room.name} saved to {filename}")
ctx.add_shutdown_callback(write_transcript)
# .. The rest of your entrypoint code follows ..tall-dawn-23938
11/11/2025, 4:26 AM