feat:移除mood,但是加入mood_api

This commit is contained in:
SengokuCola
2025-09-25 18:23:10 +08:00
parent 1ef4938080
commit 85320f6d50
5 changed files with 89 additions and 5 deletions

View File

@@ -0,0 +1,16 @@
import asyncio
import traceback
import time
from typing import Optional, Union, Dict, List, TYPE_CHECKING, Tuple
from src.chat.message_receive import message
from src.common.logger import get_logger
from src.mood.mood_manager import mood_manager
logger = get_logger("mood_api")
async def get_mood_by_chat_id(chat_id: str) -> Optional[float]:
chat_mood = mood_manager.get_mood_by_chat_id(chat_id)
mood = asyncio.create_task(chat_mood.get_mood())
return mood