MCPcopy Create free account
hub / github.com/TIGER-AI-Lab/TheoremExplainAgent / __init__

Method __init__

generate_video.py:76–133  ·  view source on GitHub ↗
(self,
                 planner_model,
                 scene_model=None,
                 helper_model=None,
                 output_dir="output",
                 verbose=False,
                 use_rag=False,
                 use_context_learning=False,
                 context_learning_path="data/context_learning",
                 chroma_db_path="data/rag/chroma_db",
                 manim_docs_path="data/rag/manim_docs",
                 embedding_model="azure/text-embedding-3-large",
                 use_visual_fix_code=False,
                 use_langfuse=True,
                 trace_id=None,
                 max_scene_concurrency: int = 5)

Source from the content-addressed store, hash-verified

74 """
75
76 def __init__(self,
77 planner_model,
78 scene_model=None,
79 helper_model=None,
80 output_dir="output",
81 verbose=False,
82 use_rag=False,
83 use_context_learning=False,
84 context_learning_path="data/context_learning",
85 chroma_db_path="data/rag/chroma_db",
86 manim_docs_path="data/rag/manim_docs",
87 embedding_model="azure/text-embedding-3-large",
88 use_visual_fix_code=False,
89 use_langfuse=True,
90 trace_id=None,
91 max_scene_concurrency: int = 5):
92 self.output_dir = output_dir
93 self.verbose = verbose
94 self.use_visual_fix_code = use_visual_fix_code
95 self.session_id = self._load_or_create_session_id() # Modified to load existing or create new
96 self.scene_semaphore = asyncio.Semaphore(max_scene_concurrency)
97 self.banned_reasonings = get_banned_reasonings()
98
99 # Initialize separate modules
100 self.planner = VideoPlanner(
101 planner_model=planner_model,
102 helper_model=helper_model,
103 output_dir=output_dir,
104 print_response=verbose,
105 use_context_learning=use_context_learning,
106 context_learning_path=context_learning_path,
107 use_rag=use_rag,
108 session_id=self.session_id,
109 chroma_db_path=chroma_db_path,
110 manim_docs_path=manim_docs_path,
111 embedding_model=embedding_model,
112 use_langfuse=use_langfuse
113 )
114 self.code_generator = CodeGenerator(
115 scene_model=scene_model if scene_model is not None else planner_model,
116 helper_model=helper_model if helper_model is not None else planner_model,
117 output_dir=output_dir,
118 print_response=verbose,
119 use_rag=use_rag,
120 use_context_learning=use_context_learning,
121 context_learning_path=context_learning_path,
122 chroma_db_path=chroma_db_path,
123 manim_docs_path=manim_docs_path,
124 embedding_model=embedding_model,
125 use_visual_fix_code=use_visual_fix_code,
126 use_langfuse=use_langfuse,
127 session_id=self.session_id
128 )
129 self.video_renderer = VideoRenderer(
130 output_dir=output_dir,
131 print_response=verbose,
132 use_visual_fix_code=use_visual_fix_code
133 )

Callers

nothing calls this directly

Calls 5

get_banned_reasoningsFunction · 0.90
VideoPlannerClass · 0.90
CodeGeneratorClass · 0.90
VideoRendererClass · 0.90

Tested by

no test coverage detected