Skip to content
Open
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion src/biz_layer/mem_db_operations.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ def _convert_timestamp_to_time(
try:
dt = from_iso_format(timestamp)
return to_iso_format(dt)
except:
except Exception:
# If parsing fails, return string directly
return timestamp
else:
Expand Down
6 changes: 3 additions & 3 deletions src/biz_layer/mem_memorize.py
Original file line number Diff line number Diff line change
Expand Up @@ -1290,7 +1290,7 @@ async def memorize(request: MemorizeRequest) -> int:
# ===== Preprocess and get historical data =====
if request.raw_data_type == RawDataType.CONVERSATION:
request = await preprocess_conv_request(request, current_time)
if request == None:
if request is None:
logger.warning(f"[mem_memorize] preprocess_conv_request returned None")
return 0

Expand Down Expand Up @@ -1326,7 +1326,7 @@ async def memorize(request: MemorizeRequest) -> int:
)
logger.debug(f"[mem_memorize] Extracting MemCell took: {time.perf_counter() - memcell_start} seconds")

if memcell_result == None:
if memcell_result is None:
logger.warning(f"[mem_memorize] Skipped extracting MemCell")
return 0

Expand All @@ -1345,7 +1345,7 @@ async def memorize(request: MemorizeRequest) -> int:
)
logger.info("=" * 80)

if memcell == None:
if memcell is None:
# No boundary detected, confirm current messages to accumulation (sync_status: -1 -> 0)
await conversation_data_repo.save_conversation_data(
request.new_raw_data_list, request.group_id
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ async def create_and_save_episodic_memory(
metadata_json = metadata
try:
metadata_dict = json.loads(metadata)
except:
except Exception:
metadata_dict = {}

# Prepare entity data
Expand Down