Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 0 additions & 14 deletions src/memos/mem_reader/read_multi_modal/file_content_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -412,7 +412,6 @@ def parse_fast(
# Extract file parameters (all are optional)
file_data = file_info.get("file_data", "")
file_id = file_info.get("file_id", "")
filename = file_info.get("filename", "")
file_url_flag = False
# Build content string based on available information
content_parts = []
Expand All @@ -433,25 +432,12 @@ def parse_fast(
# Check if it looks like a URL
elif file_data.startswith(("http://", "https://", "file://")):
file_url_flag = True
content_parts.append(f"[File URL: {file_data}]")
else:
# TODO: split into multiple memory items
content_parts.append(file_data)
else:
content_parts.append(f"[File Data: {type(file_data).__name__}]")

# Priority 2: If file_id is provided, reference it
if file_id:
content_parts.append(f"[File ID: {file_id}]")

# Priority 3: If filename is provided, include it
if filename:
content_parts.append(f"[Filename: {filename}]")

# If no content can be extracted, create a placeholder
if not content_parts:
content_parts.append("[File: unknown]")

# Combine content parts
content = " ".join(content_parts)

Expand Down