MCPcopy Index your code

hub / github.com/TIGER-AI-Lab/TheoremExplainAgent / functions

Functions142 in github.com/TIGER-AI-Lab/TheoremExplainAgent

↓ 17 callersFunction_prepare_text_inputs
Converts a list of text strings into the input format for the Agent model. Args: texts (List[str]): The list of text strings to be p
mllm_tools/utils.py:10
↓ 5 callersMethod_load_context_examples
Load context learning examples of a specific type from files. Args: example_type (str): Type of examples to load ('scene_plan', '
src/core/video_planner.py:72
↓ 5 callersMethodcombine_videos
Combine all videos and subtitle files for a specific topic using VideoRenderer. Args: topic (str): The topic to combine
generate_video.py:451
↓ 5 callersFunctionextract_xml
Extract XML content from a text response. Extracts XML content between ```xml markers. Returns the full response if no XML blocks found. Arg
src/utils/utils.py:114
↓ 4 callersMethod_get_embedding_function
Creates an embedding function using litellm. Returns: Embeddings: A LangChain Embeddings instance that wraps litellm functionalit
src/rag/vector_store.py:109
↓ 3 callersMethod_extract_code_with_retries
Extract code from response text with retry logic. Args: response_text (str): The text containing code to extract patt
src/core/code_generator.py:208
↓ 3 callersFunctioncalculate_geometric_mean
Calculate the geometric mean of a list of scores. Args: scores (List[int]): List of integer scores, may contain None values. Re
eval_suite/utils.py:66
↓ 3 callersFunctionconvert_score_fields
Convert score fields in a dictionary to integers recursively. Args: data (dict): Dictionary containing score fields to convert.
eval_suite/utils.py:36
↓ 3 callersFunctionextract_json
Extract JSON content from a string response. Args: response (str): String containing JSON content, possibly within code blocks.
eval_suite/utils.py:6
↓ 3 callersMethodfind_relevant_docs
Finds relevant documentation based on the provided queries. Args: queries (List[Dict]): List of query dictionaries with 'type' an
src/rag/vector_store.py:247
↓ 3 callersFunctionget_prompt_rag_query_generation_code
For generating RAG queries during technical implementation to code generation stage
task_generator/__init__.py:176
↓ 3 callersMethodget_relevant_docs
Get relevant documentation using the vector store. Args: rag_queries (List[Dict]): List of RAG queries to search for
src/rag/rag_integration.py:268
↓ 3 callersFunctionmerge_dicts
Recursively merge two dictionaries. Args: dict1 (dict): First dictionary. dict2 (dict): Second dictionary. Returns:
evaluate.py:225
↓ 3 callersFunctionprocess_topic_name
Process a topic name by capitalizing words and handling special characters. Args: topic_name (str): The topic name to process.
evaluate.py:211
↓ 3 callersMethodrender_video_fix_code
Render the video for all scenes with code fixing capability. Args: topic (str): The topic of the video descr
generate_video.py:291
↓ 3 callersFunctionsave_individual_result
Save individual evaluation result to a file. Args: output_folder (str): Directory to store the evaluation file. file_name (s
evaluate.py:41
↓ 2 callersMethod_add_documents_to_store
Adds documents to a vector store in batches with rate limiting. Args: vector_store (Chroma): The vector store to add documents to
src/rag/vector_store.py:215
↓ 2 callersMethod_generate_scene_implementation_single
Generate implementation plan for a single scene. Args: topic (str): The topic of the video description (str): Descrip
src/core/video_planner.py:180
↓ 2 callersMethod_get_mime_type
Get the MIME type of a file based on its extension Args: file_path: Path to the file Return
mllm_tools/gemini.py:63
↓ 2 callersMethod_load_or_create_session_id
Load existing session ID from file or create a new one. Returns: str: The session ID either loaded from file or newly cr
generate_video.py:135
↓ 2 callersMethod_process_documentation_folder
Processes documentation files from a folder into LangChain documents. Args: folder_path (str): Path to the folder containing docu
src/rag/vector_store.py:164
↓ 2 callersMethoddetect_relevant_plugins
Detect which plugins might be relevant based on topic and description. Args: topic (str): Topic of the video descript
src/rag/rag_integration.py:57
↓ 2 callersFunctionevaluate_sampled_images
Evaluate sampled frames from a video using an image evaluation model. Args: model: The image evaluation model to use video_path (
eval_suite/image_utils.py:63
↓ 2 callersFunctionevaluate_text_file
Evaluate a text file using the provided model. Args: model: The model to use for evaluation. transcript_path (str): Path to
evaluate.py:61
↓ 2 callersFunctionevaluate_video_file
Evaluate a video file using the provided model. Args: model: The model to use for evaluation. video_path (str): Path to the
evaluate.py:94
↓ 2 callersMethodgenerate_video_pipeline
Modified pipeline to handle partial scene completions and option to only generate plans for specific scenes. Args: topic
generate_video.py:478
↓ 2 callersFunctionget_banned_reasonings
()
task_generator/__init__.py:150
↓ 2 callersFunctionget_prompt_fix_error
Generate a prompt to fix errors in the given manim code. Args: implementation_plan (str): The implementation plan of the scene.
task_generator/__init__.py:117
↓ 2 callersFunctionget_prompt_rag_query_generation_fix_error
(error: str, code: str, relevant_plugins: str)
task_generator/__init__.py:184
↓ 2 callersFunctionimage_with_most_non_black_space
Find and save the image with the most non-black space from a list of images. Args: images (list): List of image file paths, PIL Image obj
src/core/parse_video.py:23
↓ 2 callersFunctionmain
()
generate_video.py:802
↓ 2 callersFunctionprocess_theorem
(theorem, topic_semaphore)
generate_video.py:796
↓ 2 callersFunctionprocess_theorem
Process a theorem file or directory for evaluation. Args: models: Dictionary of models for different evaluation types. file_
evaluate.py:245
↓ 2 callersMethodset_relevant_plugins
Set the relevant plugins for the current video. Args: plugins (List[str]): List of plugin names to set as relevant
src/rag/rag_integration.py:49
↓ 1 callersMethod_create_core_store
Creates the main ChromaDB vector store for Manim core documentation. Returns: Chroma: The initialized and populated core vector s
src/rag/vector_store.py:145
↓ 1 callersMethod_download_file
Download a file from a URL and save it as a temporary file Args: url: URL of the file to download
mllm_tools/gemini.py:78
↓ 1 callersMethod_encode_file
Encode local file or PIL Image to base64 string Args: file_path: Path to local file or PIL Image object
mllm_tools/litellm.py:50
↓ 1 callersMethod_format_examples
Format examples using the appropriate template based on their type. Args: example_type (str): Type of examples to format
src/core/video_planner.py:112
↓ 1 callersMethod_generate_rag_queries_code
Generate RAG queries from the implementation plan. Args: implementation (str): The implementation plan text scene_tra
src/core/code_generator.py:94
↓ 1 callersMethod_generate_rag_queries_error_fix
Generate RAG queries for fixing code errors. Args: error (str): The error message to fix code (str): The code contain
src/core/code_generator.py:151
↓ 1 callersMethod_generate_rag_queries_narration
Generate RAG queries from the storyboard to help create narration plan. Args: storyboard (str): Storyboard text to generate queri
src/rag/rag_integration.py:221
↓ 1 callersMethod_generate_rag_queries_storyboard
Generate RAG queries from the scene plan to help create storyboard. Args: scene_plan (str): Scene plan text to generate queries f
src/rag/rag_integration.py:121
↓ 1 callersMethod_generate_rag_queries_technical
Generate RAG queries from the storyboard to help create technical implementation. Args: storyboard (str): Storyboard text to gene
src/rag/rag_integration.py:174
↓ 1 callersMethod_generate_scene_implementation_single
Generate detailed implementation plan for a single scene using VideoPlanner. Args: topic (str): The topic of the video
generate_video.py:460
↓ 1 callersMethod_get_mime_type
Get the MIME type of a file based on its extension Args: file_path: Path to the file Return
mllm_tools/litellm.py:68
↓ 1 callersMethod_load_context_examples
Load all context learning examples from the specified directory. Returns: str: Formatted context learning examples, or None if no
src/core/code_generator.py:75
↓ 1 callersMethod_load_or_create_vector_store
Loads existing or creates new ChromaDB vector stores. Creates/loads vector stores for both Manim core documentation and any available plugins
src/rag/vector_store.py:56
↓ 1 callersMethod_load_plugin_descriptions
Load plugin descriptions from JSON file. Returns: list: List of plugin descriptions, empty list if loading fails
src/rag/rag_integration.py:99
↓ 1 callersFunction_prepare_text_image_inputs
Converts text strings and images into the input format for the Agent model. Args: texts (Union[str, List[str]]): Text string(s) to b
mllm_tools/utils.py:31
↓ 1 callersFunction_prepare_text_video_inputs
Converts text strings and video file paths into the input format for the Agent model. Args: texts (Union[str, List[str]]): Text stri
mllm_tools/utils.py:59
↓ 1 callersMethod_save_image_to_temp
Save a PIL Image to a temporary file Args: image: PIL Image object Returns: Pat
mllm_tools/gemini.py:97
↓ 1 callersMethod_save_topic_session_id
Save session ID for a specific topic. Args: topic (str): The topic to save the session ID for session_id (st
generate_video.py:158
↓ 1 callersMethod_upload_to_gemini
Uploads the given file to Gemini. Args: file_path: Path to the file mime_type: MIME type of the file
mllm_tools/gemini.py:112
↓ 1 callersFunctioncalculate_overall_score
Calculate the overall score from evaluation results. Args: result (Dict): Dictionary containing evaluation results. Returns:
evaluate.py:196
↓ 1 callersFunctioncall_parse_prompt
Find the prompts_raw directory and generate an __init__.py file containing prompt texts. Searches for prompts_raw directory in current and p
task_generator/parse_prompt.py:5
↓ 1 callersFunctioncall_parse_prompt
Locates the prompts_raw directory and generates an __init__.py file containing prompt texts. Searches for prompts_raw directory in current a
eval_suite/parse_prompt.py:5
↓ 1 callersMethodcheck_theorem_status
Check if a theorem has its plan, code files, and rendered videos with detailed scene status. Args: theorem (Dict): Dicti
generate_video.py:587
↓ 1 callersFunctioncombine_results
Combine all evaluation results into a single file. Args: output_folder (str): Directory to store the combined file. combined
evaluate.py:24
↓ 1 callersFunctioncreate_python_file_with_texts
Generate a Python file containing prompt texts from .txt files. Args: folder_path (str): Path to directory containing prompt .txt fi
task_generator/parse_prompt.py:30
↓ 1 callersFunctioncreate_python_file_with_texts
Creates a Python file containing prompt texts from .txt files. Args: folder_path (str): Path to directory containing prompt .txt fil
eval_suite/parse_prompt.py:30
↓ 1 callersMethodcreate_snapshot_scene
Create a snapshot of the video for a specific topic and scene. Args: topic (str): Topic name scene_number (int): Scen
src/core/video_renderer.py:174
↓ 1 callersFunctionevaluate_text
Evaluate transcript text using an LLM model with retry logic. Args: text_eval_model: The LLM model wrapper to use for evaluation.
eval_suite/text_utils.py:54
↓ 1 callersFunctionevaluate_video_chunk_new
Evaluate a single video chunk using a multimodal model. Args: model: The multimodal model to use for evaluation video_path (
eval_suite/video_utils.py:117
↓ 1 callersFunctionextract_key_frames
Extract key frames from a video by dividing it into chunks and selecting representative frames. Args: video_path (str): Path to the input
eval_suite/image_utils.py:13
↓ 1 callersFunctionextract_scores
Extract all score values from a nested dictionary or list structure. Args: data (Union[Dict, List]): The data structure to extract s
evaluate.py:171
↓ 1 callersMethodfix_code_errors
Fix errors in generated Manim code. Args: implementation_plan (str): Original implementation plan code (str): Code co
src/core/code_generator.py:337
↓ 1 callersFunctionfix_transcript
Fix and clean up a transcript using an LLM model. Args: text_eval_model: The LLM model wrapper to use for fixing the transcript.
eval_suite/text_utils.py:34
↓ 1 callersMethodgenerate_manim_code
Generate Manim code from video plan. Args: topic (str): Topic of the scene description (str): Description of the scen
src/core/code_generator.py:252
↓ 1 callersMethodgenerate_scene_outline
Generate scene outline using VideoPlanner. Args: topic (str): The topic of the video description (str): Desc
generate_video.py:194
↓ 1 callersMethodget_data_hash
Generates a hash based on the input data dictionary. The hash is used to create a unique identifier for the input data. Para
src/utils/kokoro_voiceover.py:39
↓ 1 callersFunctionget_images_from_video
Extract frames from a video file at specified FPS. Args: video_path (str): Path to the video file. fps (float, optional): Frames
src/core/parse_video.py:9
↓ 1 callersFunctionget_prompt_code_generation
Generate a prompt for code generation based on the given video plan and implementation details. Args: topic (str): The topic of the
task_generator/__init__.py:82
↓ 1 callersFunctionget_prompt_context_learning_code
(examples: str)
task_generator/__init__.py:216
↓ 1 callersFunctionget_prompt_detect_plugins
Generate a prompt for detecting relevant plugins based on topic and description. Args: topic (str): The video topic descript
task_generator/__init__.py:222
↓ 1 callersFunctionget_prompt_rag_query_generation_narration
For generating RAG queries during storyboard to narration stage
task_generator/__init__.py:168
↓ 1 callersFunctionget_prompt_rag_query_generation_technical
For generating RAG queries during storyboard to technical implementation stage
task_generator/__init__.py:160
↓ 1 callersFunctionget_prompt_rag_query_generation_vision_storyboard
(scene_plan: str, relevant_plugins: str)
task_generator/__init__.py:153
↓ 1 callersFunctionget_prompt_scene_animation_narration
(scene_number: int, topic: str, description: str, scene_outline: str, scene_vision_storyboard: str, technical_
task_generator/__init__.py:70
↓ 1 callersFunctionget_prompt_scene_plan
Generate a prompt for scene planning based on the given parameters. Args: topic (str): The topic of the video. description (
task_generator/__init__.py:28
↓ 1 callersFunctionget_prompt_scene_technical_implementation
(scene_number: int, topic: str, description: str, scene_outline: str, scene_vision_storyboard: str, relevant_p
task_generator/__init__.py:52
↓ 1 callersFunctionget_prompt_scene_vision_storyboard
(scene_number: int, topic: str, description: str, scene_outline: str, relevant_plugins: List[str])
task_generator/__init__.py:42
↓ 1 callersMethodload_implementation_plans
Load implementation plans for each scene. Args: topic (str): The topic to load implementation plans for Returns
generate_video.py:249
↓ 1 callersFunctionmain
Main function to run the evaluation script. Parses command line arguments and orchestrates the evaluation process for text, video, and i
evaluate.py:349
↓ 1 callersFunctionparse_srt_and_extract_frames
Extract frames from video at subtitle timestamps and save with corresponding text. Args: output_dir (str): Directory containing the topic
src/core/parse_video.py:95
↓ 1 callersFunctionparse_srt_to_text
Convert SRT subtitle file to plain text. Args: output_dir (str): Directory containing the topic folders. topic_name (str): Name o
src/core/parse_video.py:76
↓ 1 callersFunctionparse_srt_to_text
Parse an SRT subtitle file into plain text. Args: srt_path: Path to the SRT subtitle file. Returns: str: The subtitle t
eval_suite/text_utils.py:12
↓ 1 callersFunctionprocess_all_topics
Process all topic folders in the output directory. Args: output_folder (str): Directory containing the topic folders.
src/core/parse_video.py:200
↓ 1 callersMethodprocess_scene
Process a single scene using CodeGenerator and VideoRenderer. Args: i (int): Scene index scene_outline (str)
generate_video.py:335
↓ 1 callersFunctionreduce_video_framerate
Reduces the frame rate of a video by only keeping frames at the target interval. Args: input_path (str): Path to the input video
eval_suite/video_utils.py:14
↓ 1 callersMethodrender_scene
Render a single scene and handle error retries and visual fixes. Args: code (str): The Manim code to render file_pref
src/core/video_renderer.py:32
Method__call__
Process messages and return completion Args: messages: List of message dictionaries with 'type' and 'content' ke
mllm_tools/gemini.py:125
Method__call__
Process messages and return completion Args: messages: List of message dictionaries with 'type' and 'content' ke
mllm_tools/litellm.py:83
Method__call__
Process messages and return completion. Args: messages: List of message dictionaries containing type and content
mllm_tools/vertex_ai.py:45
Method__init__
(self, planner_model, scene_model=None, helper_model=None,
generate_video.py:76
Method__init__
Initialize the Gemini wrapper Args: model_name: Name of the model to use temperature: Temperature fo
mllm_tools/gemini.py:17
Method__init__
Initialize the LiteLLM wrapper Args: model_name: Name of the model to use (e.g. "azure/gpt-4", "vertex_ai/gemini
mllm_tools/litellm.py:18
Method__init__
Initialize the Vertex AI wrapper. Args: model_name: Name of the model to use (e.g. "gemini-1.5-pro") temperat
mllm_tools/vertex_ai.py:14
Method__init__
(self, engine=None, model_path: str = Config.KOKORO_MODEL_PATH, voices_path
src/utils/kokoro_voiceover.py:21
Method__init__
(self, planner_model, helper_model=None, output_dir="output", print_response=False, use_context_learning=False
src/core/video_planner.py:45
Method__init__
Initialize the VideoRenderer. Args: output_dir (str, optional): Directory for output files. Defaults to "output". pri
src/core/video_renderer.py:20
next →1–100 of 142, ranked by callers