(idx, kp, folder_path: Path, cfg: RunConfig)
| 720 | |
| 721 | |
| 722 | def process_knowledge_point(idx, kp, folder_path: Path, cfg: RunConfig): |
| 723 | print(f"\n🚀 Processing knowledge topic: {kp}") |
| 724 | start_time = time.time() |
| 725 | |
| 726 | agent = TeachingVideoAgent( |
| 727 | idx=idx, |
| 728 | knowledge_point=kp, |
| 729 | folder=folder_path, |
| 730 | cfg=cfg, |
| 731 | ) |
| 732 | video_path = agent.GENERATE_VIDEO() |
| 733 | |
| 734 | duration_minutes = (time.time() - start_time) / 60 |
| 735 | total_tokens = agent.token_usage["total_tokens"] |
| 736 | |
| 737 | print(f"✅ Knowledge topic '{kp}' processed. Cost Time: {duration_minutes:.2f} minutes, Tokens used: {total_tokens}") |
| 738 | return kp, video_path, duration_minutes, total_tokens |
| 739 | |
| 740 | |
| 741 | def process_batch(batch_data, cfg: RunConfig): |
no test coverage detected