Skip to content

Commit 6851215

Browse files
authored
fix inline imports in LLM-generated title (#7642)
1 parent b91acbb commit 6851215

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

openhands/server/routes/manage_conversations.py

+2-4
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
from fastapi.responses import JSONResponse
66
from pydantic import BaseModel
77

8+
from openhands.core.config.llm_config import LLMConfig
89
from openhands.core.logger import openhands_logger as logger
910
from openhands.events.action.message import MessageAction
1011
from openhands.events.event import EventSource
@@ -34,6 +35,7 @@
3435
from openhands.storage.data_models.conversation_metadata import ConversationMetadata
3536
from openhands.storage.data_models.conversation_status import ConversationStatus
3637
from openhands.utils.async_utils import wait_all
38+
from openhands.utils.conversation_summary import generate_conversation_title
3739

3840
app = APIRouter(prefix='/api')
3941

@@ -293,10 +295,6 @@ async def auto_generate_title(conversation_id: str, user_id: str | None) -> str:
293295
break
294296

295297
if first_user_message:
296-
# Try LLM-based title generation first
297-
from openhands.core.config.llm_config import LLMConfig
298-
from openhands.utils.conversation_summary import generate_conversation_title
299-
300298
# Get LLM config from user settings
301299
try:
302300
settings_store = await SettingsStoreImpl.get_instance(config, user_id)

0 commit comments

Comments
 (0)