Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Index your code
hub
/
github.com/TIGER-AI-Lab/TheoremExplainAgent
/ functions
Functions
142 in github.com/TIGER-AI-Lab/TheoremExplainAgent
⨍
Functions
142
◇
Types & classes
12
Method
__init__
Initialize the CodeGenerator. Args: scene_model: The model used for scene generation helper_model: The model used for
src/core/code_generator.py:32
Method
__init__
(self, helper_model, output_dir, chroma_db_path, manim_docs_path, embedding_model, use_langfuse=True, session_
src/rag/rag_integration.py:33
Method
__init__
(self, chroma_db_path: str = "chroma_db", manim_docs_path: str = "rag/manim
src/rag/vector_store.py:37
Method
__init__
(self, embedding_model)
src/rag/vector_store.py:116
Function
_extract_code
Helper to extract code block from model response, support Gemini style and OpenAI style
mllm_tools/utils.py:117
Function
_extract_code
Extract code blocks from a text response. Extracts Python code blocks delimited by ```python markers. If no code blocks are found, returns th
src/utils/utils.py:28
Function
_fix_unicode_to_latex
Convert Unicode symbols to LaTeX source code. Converts Unicode subscripts and superscripts to LaTeX format, with optional full Unicode parsing.
src/utils/utils.py:81
Method
_generate_rag_queries_code
Generate RAG queries from implementation plan. Args: implementation_plan (str): Implementation plan text to generate queries from
src/rag/rag_integration.py:288
Method
_generate_rag_queries_error_fix
Generate RAG queries for fixing code errors. Args: error (str): Error message to generate queries from code (str): Co
src/rag/rag_integration.py:334
Method
_load_topic_session_id
Load session ID for a specific topic if it exists. Args: topic (str): The topic to load the session ID for Retu
generate_video.py:175
Function
_prepare_text_audio_inputs
Converts text strings and audio file paths into the input format for the Agent model. Args: texts (Union[str, List[str]]): Text stri
mllm_tools/utils.py:88
Function
_print_response
Print formatted responses from the video generation process. Prints a formatted response with separators and headers for readability. Args:
src/utils/utils.py:8
Function
_upload_to_gemini
Uploads the given file or PIL image to Gemini. See https://ai.google.dev/gemini-api/docs/prompting_with_media
mllm_tools/utils.py:127
Method
adjust_time
(time_str, offset)
src/core/video_renderer.py:416
Method
combine_videos
Combine all videos and subtitle files for a specific topic using ffmpeg. Args: topic (str): Topic name to combine videos for
src/core/video_renderer.py:203
Method
create_snapshot_scene
Create a snapshot of the video for a specific topic and scene using VideoRenderer. Args: topic (str): The topic of the v
generate_video.py:436
Method
embed_documents
(self, texts: list[str])
src/rag/vector_store.py:119
Method
embed_query
(self, text: str)
src/rag/vector_store.py:131
Function
extract_json
Extract and parse JSON content from a text response. Attempts to parse the response as JSON directly, then tries to extract JSON from code blocks
src/utils/utils.py:48
Function
extract_trasnscript
Extract transcript from video audio using Google Speech Recognition. Args: video_path (str): Path to the video file. Returns:
src/core/parse_video.py:165
Method
generate_from_text
(self, text: str, cache_dir: str = None, path: str = None)
src/utils/kokoro_voiceover.py:80
Method
generate_scene_implementation
Generate scene implementations using VideoPlanner. Args: topic (str): The topic of the video description (st
generate_video.py:211
Method
generate_scene_implementation
Generate detailed implementation plans for all scenes. Args: topic (str): The topic of the video description (str): D
src/core/video_planner.py:348
Method
generate_scene_implementation_concurrently
Generate scene implementations concurrently using VideoPlanner. Args: topic (str): The topic of the video de
generate_video.py:230
Method
generate_scene_implementation_concurrently
Generate detailed implementation plans for all scenes concurrently with controlled concurrency. Args: topic (str): The topic of t
src/core/video_planner.py:385
Method
generate_scene_outline
Generate a scene outline based on the topic and description. Args: topic (str): The topic of the video description (s
src/core/video_planner.py:135
Method
generate_single_scene_implementation
(i)
src/core/video_planner.py:408
Function
get_media_wrapper
Get appropriate wrapper for media handling based on model name
mllm_tools/utils.py:148
Function
get_prompt_animation
(topic: str, description: str, additional_context: Union[str, List[str]] = None)
task_generator/__init__.py:241
Function
get_prompt_animation_fix_error
Generate a prompt to fix errors in the given manim code. Args: text_explanation (str): The implementation plan of the scene.
task_generator/__init__.py:255
Function
get_prompt_animation_rag_query_generation
(topic: str, context: str, relevant_plugins: str)
task_generator/__init__.py:281
Function
get_prompt_animation_rag_query_generation_fix_error
(text_explanation: str, error: str, code: str)
task_generator/__init__.py:291
Function
get_prompt_context_learning_animation_narration
(examples: str)
task_generator/__init__.py:210
Function
get_prompt_context_learning_scene_plan
(examples: str)
task_generator/__init__.py:192
Function
get_prompt_context_learning_technical_implementation
(examples: str)
task_generator/__init__.py:204
Function
get_prompt_context_learning_vision_storyboard
(examples: str)
task_generator/__init__.py:198
Function
get_prompt_visual_fix_error
(implementation: str, generated_code: str)
task_generator/__init__.py:143
Function
prepare_media_messages
Prepare messages for media input based on model type
mllm_tools/utils.py:156
Method
run_manim_process
Run manim on all generated manim code for a specific topic using VideoRenderer. Args: topic (str): The topic to render v
generate_video.py:426
Method
run_manim_process
Run manim on all generated manim code for a specific topic. Args: topic (str): Topic name to process Returns:
src/core/video_renderer.py:128
Method
text_to_speech
Generates speech from text using Kokoro ONNX and saves the audio file. Normalizes the audio to make it audible.
src/utils/kokoro_voiceover.py:55
Method
visual_self_reflection
Use snapshot image or mp4 video to fix code. Args: code (str): Code to fix media_path (Union[str, Image.Image]): Path
src/core/code_generator.py:392
← previous
101–142 of 142, ranked by callers