mirror of
https://github.com/xinnan-tech/xiaozhi-esp32-server.git
synced 2026-07-29 00:53:52 +08:00
去除默认初始化,补充函数签名缺失
This commit is contained in:
@@ -134,12 +134,13 @@ class MemoryProvider(MemoryProviderBase):
|
|||||||
logger.bind(tag=TAG).debug(f"Detailed error: {traceback.format_exc()}")
|
logger.bind(tag=TAG).debug(f"Detailed error: {traceback.format_exc()}")
|
||||||
self.use_powermem = False
|
self.use_powermem = False
|
||||||
|
|
||||||
async def save_memory(self, msgs):
|
async def save_memory(self, msgs, session_id=None):
|
||||||
"""
|
"""
|
||||||
Save conversation messages to PowerMem.
|
Save conversation messages to PowerMem.
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
msgs: List of message objects with 'role' and 'content' attributes
|
msgs: List of message objects with 'role' and 'content' attributes
|
||||||
|
session_id: Session identifier (optional, for compatibility)
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
Result from PowerMem API or None if failed
|
Result from PowerMem API or None if failed
|
||||||
@@ -293,7 +294,3 @@ class MemoryProvider(MemoryProviderBase):
|
|||||||
logger.bind(tag=TAG).error(f"Error getting user profile: {str(e)}")
|
logger.bind(tag=TAG).error(f"Error getting user profile: {str(e)}")
|
||||||
logger.bind(tag=TAG).debug(f"Detailed error: {traceback.format_exc()}")
|
logger.bind(tag=TAG).debug(f"Detailed error: {traceback.format_exc()}")
|
||||||
return ""
|
return ""
|
||||||
|
|
||||||
|
|
||||||
# Register the memory provider instance
|
|
||||||
powermem = MemoryProvider({})
|
|
||||||
|
|||||||
Reference in New Issue
Block a user