Spaces:
Paused

dushyantsingh0 commited on
Commit
882becf
·
1 Parent(s): ae8e555

backend stabilization

Browse files
Files changed (1) hide show
  1. tasks/stories.py +9 -2
tasks/stories.py CHANGED
@@ -7,7 +7,7 @@ from sqlalchemy import select, update
7
  from core.database import async_session_factory
8
  from models.workspace_story import WorkspaceStory, StoryStatus
9
  from models.ticket import Ticket
10
- from core.llm import LLMManager
11
  from core.storage import StorageManager
12
 
13
  logger = logging.getLogger(__name__)
@@ -68,7 +68,14 @@ async def generate_workspace_story_task(ctx, story_id: UUID, user_id: UUID, work
68
  Make it look professional and data-driven.
69
  """
70
 
71
- narrative = await LLMManager.complete(prompt, system_prompt="You are the Nexus Storyteller, an expert in workspace orchestration.")
 
 
 
 
 
 
 
72
 
73
  # 4. Mock File Generation (PDF/PPT)
74
  # For now, we save the narrative as a markdown-like PDF text
 
7
  from core.database import async_session_factory
8
  from models.workspace_story import WorkspaceStory, StoryStatus
9
  from models.ticket import Ticket
10
+ from core.llm import get_llm
11
  from core.storage import StorageManager
12
 
13
  logger = logging.getLogger(__name__)
 
68
  Make it look professional and data-driven.
69
  """
70
 
71
+ llm = get_llm(is_heavy_task=True)
72
+ from langchain_core.messages import SystemMessage, HumanMessage
73
+
74
+ res = await llm.ainvoke([
75
+ SystemMessage(content="You are the Nexus Storyteller, an expert in workspace orchestration."),
76
+ HumanMessage(content=prompt)
77
+ ])
78
+ narrative = res.content
79
 
80
  # 4. Mock File Generation (PDF/PPT)
81
  # For now, we save the narrative as a markdown-like PDF text