MCPcopy Create free account

hub / github.com/ByteDance-Seed/m3-agent / functions

Functions136 in github.com/ByteDance-Seed/m3-agent

↓ 14 callersMethodget_connected_nodes
Get all nodes connected to given node.
mmagent/videograph.py:544
↓ 13 callersFunctionparse_video_caption
(video_graph, video_caption)
mmagent/memory_processing.py:36
↓ 8 callersFunctiongenerate_messages
Generate message list for chat completion from mixed inputs. Args: inputs (list): List of input dictionaries with 'type' and 'content' ke
mmagent/utils/chat_api.py:243
↓ 6 callersFunctionget_response_with_retry
Retry get_response up to MAX_RETRIES times with error handling. Args: model (str): Model identifier messages (list): List of mess
mmagent/utils/chat_api.py:66
↓ 6 callersMethodrefresh_equivalences
(self)
mmagent/videograph.py:417
↓ 5 callersFunctionparallel_get_embedding
Process multiple texts in parallel to get embeddings. Args: model (str): Model identifier texts (list): List of texts to embed
mmagent/utils/chat_api.py:154
↓ 3 callersFunctionget_files_by_name
Get video files matching the specified name and config. Files can be .mp4, .mp3, .srt, .txt, depending on the base_path type. Args: b
mmagent/utils/general.py:70
↓ 3 callersFunctionget_response
Get chat completion response from specified model. Args: model (str): Model identifier messages (list): List of message dictionar
mmagent/utils/chat_api.py:49
↓ 3 callersFunctioninsert_memory
(video_graph, memory, type='episodic')
mmagent/memory_processing_qwen.py:190
↓ 3 callersFunctioninsert_memory
(video_graph, memory, type='episodic')
mmagent/memory_processing.py:209
↓ 3 callersMethodprint_faces
Print faces for given image nodes in a grid layout with 9 faces per row. Args: img_nodes (list): List of image node IDs t
mmagent/videograph.py:738
↓ 3 callersFunctionprocess_faces
Process video frames to detect, cluster and track faces. Args: video_graph: Graph object to store face embeddings and relationships
mmagent/face_processing.py:49
↓ 3 callersFunctionprocess_video_clip
(video_path, fps=5, audio_fps=16000)
mmagent/utils/video_processing.py:82
↓ 3 callersFunctionsearch
(video_graph, query, current_clips, topk=5, mode='max', threshold=0, mem_wise=False, before_clip=None, episodi
mmagent/retrieve.py:237
↓ 3 callersFunctiontranslate
(video_graph, memories)
mmagent/retrieve.py:35
↓ 3 callersFunctionvalidate_and_fix_json
(invalid_json)
mmagent/utils/general.py:256
↓ 2 callersMethodadd_edge
Add or update bidirectional weighted edges between two nodes. Text-to-text connections are not allowed between same type text nodes.
mmagent/videograph.py:228
↓ 2 callersMethodadd_text_node
Add a new text node with episodic or semantic content. Args: text: Text content text_type: Type of text node
mmagent/videograph.py:158
↓ 2 callersFunctionget_embedding_with_retry
Retry get_embedding up to MAX_RETRIES times with error handling. Args: model (str): Model identifier text (str): Text to embed
mmagent/utils/chat_api.py:132
↓ 2 callersFunctionhas_stream
(stream_type)
mmagent/utils/video_processing.py:117
↓ 2 callersFunctionload_video_graph
Load video graph from pickle file.
mmagent/utils/general.py:371
↓ 2 callersFunctionprocess_memories
(video_graph, memory_contents, clip_id, type='episodic')
mmagent/memory_processing_qwen.py:183
↓ 2 callersFunctionprocess_voices
(video_graph, base64_audio, base64_video, save_path, preprocessing=[])
mmagent/voice_processing.py:92
↓ 2 callersMethodreinforce_node
Reinforce all edges connected to the given node. Args: node_id: ID of the node to reinforce delta_weight: Amo
mmagent/videograph.py:253
↓ 2 callersFunctiontruncate
(text: str, max_len: int | None)
visualization.py:23
↓ 2 callersMethodtruncate_memory_by_clip
(self, clip_id, refresh=True)
mmagent/videograph.py:866
↓ 2 callersMethodupdate_edge_weight
Update weight of existing bidirectional edge.
mmagent/videograph.py:239
↓ 2 callersMethodupdate_node
Update an existing node. Args: node_id: ID of target node update_info: Dictionary of update information
mmagent/videograph.py:189
↓ 2 callersMethodweaken_node
Weaken all edges connected to the given node. Args: node_id: ID of the node to weaken delta_weight: Amount to
mmagent/videograph.py:276
↓ 1 callersMethod_average_similarity
Calculate average cosine similarity between two lists of embeddings.
mmagent/videograph.py:70
↓ 1 callersMethod_cluster_semantic_nodes
(self, nodes, threshold=0.9)
mmagent/videograph.py:85
↓ 1 callersMethodadd_img_node
Add a new face node with initial image embedding(s). Args: img_embedding: Single embedding or list of embeddings
mmagent/videograph.py:118
↓ 1 callersMethodadd_voice_node
Add a new voice node with initial audio embedding(s). Args: audio_embedding: Single embedding or list of embeddings
mmagent/videograph.py:138
↓ 1 callersFunctionanswer_with_retrieval
(video_graph, question, video_clip_base64=None, topk=5, auto_refresh=False, mode='max', multiple_queries=False
mmagent/retrieve.py:277
↓ 1 callersFunctionback_translate
(video_graph, queries)
mmagent/retrieve.py:50
↓ 1 callersFunctioncluster_face
(faces)
mmagent/face_processing.py:43
↓ 1 callersFunctioncluster_faces
(faces, min_cluster_size=2, distance_threshold=0.5)
mmagent/src/face_clustering.py:17
↓ 1 callersFunctioncompute_embedding
(wav_file, save=True)
mmagent/voice_processing.py:61
↓ 1 callersFunctioncreate_audio_segments
(base64_audio, asrs)
mmagent/voice_processing.py:185
↓ 1 callersFunctiondiarize_audio
(base64_video, filter=None)
mmagent/voice_processing.py:136
↓ 1 callersFunctionestablish_mapping
(faces, key="cluster_id", filter=None)
mmagent/face_processing.py:120
↓ 1 callersFunctioneval_answer
(question, predict, ground_truth)
m3_agent/control.py:57
↓ 1 callersMethodexpand_route
(self, route)
mmagent/videograph.py:836
↓ 1 callersFunctionextract_faces
(face_app, image_list, num_workers=4)
mmagent/src/face_extraction.py:25
↓ 1 callersFunctionextract_frames
(video, start_time=None, interval=None, sample_fps=10)
mmagent/utils/video_processing.py:61
↓ 1 callersMethodfix_collisions
(self, node_id, mode='eq_only')
mmagent/videograph.py:328
↓ 1 callersFunctiongenerate
(wav)
mmagent/voice_processing.py:71
↓ 1 callersFunctiongenerate_action
(question, knowledge, retrieval_plan=None, multiple_queries=False, responses=[], switch=False, model="gpt-4o-2
mmagent/retrieve.py:152
↓ 1 callersFunctiongenerate_all_memories
(video_context, model_type="sft")
mmagent/memory_processing_qwen.py:144
↓ 1 callersFunctiongenerate_file_name
(video_path)
mmagent/utils/general.py:345
↓ 1 callersFunctiongenerate_memories
( base64_frames, faces_list, voices_list, video_path, model_type="sft" )
mmagent/memory_processing_qwen.py:176
↓ 1 callersFunctiongenerate_video_context
( base64_frames, faces_list, voices_list, video_path=None, faces_input="face_only" )
mmagent/memory_processing_qwen.py:36
↓ 1 callersFunctionget_audio_embeddings
(audio_segments)
mmagent/voice_processing.py:78
↓ 1 callersFunctionget_audio_segments
(base64_audio, dialogs)
mmagent/voice_processing.py:93
↓ 1 callersFunctionget_embedding
(wav)
mmagent/voice_processing.py:49
↓ 1 callersFunctionget_embedding
Get embedding for text using specified model. Args: model (str): Model identifier text (str): Text to embed Returns:
mmagent/utils/chat_api.py:118
↓ 1 callersFunctionget_embeddings
(base64_frames, batch_size)
mmagent/face_processing.py:101
↓ 1 callersFunctionget_face
(frames)
mmagent/face_processing.py:38
↓ 1 callersFunctionget_memory_embeddings
(memory_contents)
mmagent/memory_processing_qwen.py:184
↓ 1 callersFunctionget_memory_embeddings
(memory_contents)
mmagent/memory_processing.py:203
↓ 1 callersFunctionget_normed_audio_embeddings
Get normalized audio embeddings for a list of base64 audio strings Args: base64_audios (list): List of base64 en
mmagent/voice_processing.py:168
↓ 1 callersFunctionget_related_nodes
(video_graph, query)
mmagent/retrieve.py:138
↓ 1 callersFunctionget_response
(messages, timeout=30)
m3_agent/control.py:41
↓ 1 callersFunctionget_response_with_retry
(messages, timeout=30)
m3_agent/control.py:47
↓ 1 callersFunctionget_video_info
Get video/audio information using appropriate libraries. Args: file_path (str): Path to video or audio file Returns:
mmagent/utils/video_processing.py:33
↓ 1 callersFunctionget_whisper
Transcribe audio file using Whisper model. Args: model (str): Model identifier file_path (str): Path to audio file Returns:
mmagent/utils/chat_api.py:185
↓ 1 callersFunctionget_whisper_with_retry
Retry Whisper transcription with error handling. Args: model (str): Model identifier file_path (str): Path to audio file Ret
mmagent/utils/chat_api.py:198
↓ 1 callersFunctionhas_static_segment
( video_path, min_static_duration=5.0, diff_threshold=0.001, )
mmagent/utils/video_processing.py:127
↓ 1 callersFunctionhas_video_and_audio
(file_path)
mmagent/utils/video_processing.py:116
↓ 1 callersFunctionload_wav
(wav_file, obj_fs=16000)
mmagent/voice_processing.py:51
↓ 1 callersFunctionmain
()
mmagent/face_processing.py:224
↓ 1 callersFunctionmain
()
mmagent/utils/video_verification.py:69
↓ 1 callersFunctionnormalize_embedding
Normalize embedding to unit length.
mmagent/utils/general.py:338
↓ 1 callersFunctionparallel_get_whisper
Process multiple audio files in parallel using Whisper model. Args: model (str): Model identifier file_paths (list): List of audi
mmagent/utils/chat_api.py:219
↓ 1 callersFunctionparse_args
()
mmagent/utils/video_verification.py:21
↓ 1 callersFunctionprint_clip_full
(vg, clip_id: int, only: str | None = None, max_len: int | None = None
visualization.py:28
↓ 1 callersMethodprint_img_nodes
(self, node_id=None)
mmagent/videograph.py:805
↓ 1 callersMethodprint_voice_nodes
(self)
mmagent/videograph.py:793
↓ 1 callersFunctionprocess_segment
( video_graph, base64_video, base64_frames, base64_audio, clip_id, sample )
m3_agent/memorization_intermediate_outputs.py:30
↓ 1 callersFunctionprocess_segment
( video_graph, base64_video, base64_frames, base64_audio, clip_id, sample, clip_pa
m3_agent/memorization_memory_graphs.py:33
↓ 1 callersFunctionrefine_json_str
Clean and format JSON string by removing markdown code blocks. Args: json_str (str): Raw JSON string with potential markdown formatting
mmagent/utils/general.py:210
↓ 1 callersFunctionretrieve_from_videograph
(video_graph, query, topk=5, mode='max', threshold=0, before_clip=None)
mmagent/retrieve.py:76
↓ 1 callersMethodsearch_img_nodes
Search for face nodes using image embeddings.
mmagent/videograph.py:614
↓ 1 callersMethodsearch_text_nodes
Search for text nodes using text embeddings. Args: query_embeddings: Query embeddings range_nodes: Optional l
mmagent/videograph.py:554
↓ 1 callersMethodsearch_voice_nodes
Search for voice nodes using audio embeddings.
mmagent/videograph.py:643
↓ 1 callersFunctionselect_queries
(action_content, responses)
mmagent/retrieve.py:204
↓ 1 callersFunctionstreaming_process_video
Process video segments at specified intervals with given fps. Args: video_graph (VideoGraph): Graph object to store video information
m3_agent/memorization_intermediate_outputs.py:56
↓ 1 callersFunctionstreaming_process_video
Process video segments at specified intervals with given fps. Args: video_graph (VideoGraph): Graph object to store video information
m3_agent/memorization_memory_graphs.py:69
↓ 1 callersFunctionupdate_video_graph
(video_graph, memories, type='episodic')
mmagent/memory_processing_qwen.py:197
↓ 1 callersFunctionupdate_video_graph
(video_graph, memories, type='episodic')
mmagent/memory_processing.py:216
↓ 1 callersFunctionupdate_videograph
(video_graph, audios)
mmagent/voice_processing.py:197
↓ 1 callersFunctionupdate_videograph
(video_graph, tempid2faces)
mmagent/face_processing.py:149
↓ 1 callersFunctionvalidate_and_fix_python_list
Validate and fix Python list string. Args: invalid_list (str): Raw Python list string with potential markdown formatting Returns:
mmagent/utils/general.py:266
↓ 1 callersFunctionverify_entity
(video_graph, entity_str)
mmagent/memory_processing.py:39
↓ 1 callersFunctionvideo_to_base64
(video_path)
mmagent/retrieve.py:435
Method__init__
Initialize a video graph with nodes for faces, voices and text events. Args: max_img_embeddings: Maximum number of image
mmagent/videograph.py:40
Method__init__
(self, node_id, node_type)
mmagent/videograph.py:64
Method__init__
(self, frame_id, bounding_box, face_emb, cluster_id, extra_data)
mmagent/face_processing.py:31
Function_process_batch
Process a batch of video frames to detect faces. Args: params (tuple): A tuple containing: - frames (lis
mmagent/face_processing.py:75
Functioncalculate_similarity
(mem, query, related_nodes)
mmagent/retrieve.py:402
next →1–100 of 136, ranked by callers