-
Notifications
You must be signed in to change notification settings - Fork 4
Open
Description
Priority: P1 — Required for streaming endpoint to deliver buttons to the frontend
File: src/llm_orchestration_service.py
Method: format_sse()
Also: Protocol definition in src/tool_classifier/workflows/service_workflow.py (LLMServiceProtocol.format_sse)
Type: Method signature extension
Add an optional buttons parameter:
def format_sse(
self,
chat_id: str,
content: str,
buttons: Optional[List[Dict[str, Any]]] = None,
) -> str:
When buttons is not None and not empty, include it in the payload:
payload = {
"chatId": chat_id,
"payload": {"content": content, **({"buttons": buttons} if buttons else {})},
"timestamp": ...,
"sentTo": [],
}
All existing call sites pass no buttons argument — no behavior change for RAG/context/single-step flows.
Work:
- Update format_sse signature and body in llm_orchestration_service.py.
- Update the LLMServiceProtocol.format_sse stub in service_workflow.py to match.
- Update the service_stream() async generator in execute_streaming() to call format_sse(chat_id, result["content"], result["buttons"]).
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels
Type
Projects
Status
In Progress