diff --git a/src/conversation-api/main.py b/src/conversation-api/main.py index 10caf989..7b5c1ab0 100644 --- a/src/conversation-api/main.py +++ b/src/conversation-api/main.py @@ -433,8 +433,11 @@ async def message_post( ) -@api.get("/message/{id}") -async def message_get(id: UUID, token: UUID, req: Request) -> EventSourceResponse: +@api.get( + "/message/{token}", + description="Load a message from its token. This endpoint is used for SSE. No authentication is required.", +) +async def message_get(token: UUID, req: Request) -> EventSourceResponse: return EventSourceResponse(_read_message_sse(req, token)) diff --git a/src/conversation-ui/src/Conversation.jsx b/src/conversation-ui/src/Conversation.jsx index 01037a09..4ebe92df 100644 --- a/src/conversation-ui/src/Conversation.jsx +++ b/src/conversation-ui/src/Conversation.jsx @@ -191,7 +191,7 @@ function Conversation() { let content = ""; let actions = []; const source = new EventSource( - `${client.defaults.baseURL}/message/${lastMessage.id}?token=${lastMessage.token}` + `${client.defaults.baseURL}/message/${lastMessage.token}` ); source.onmessage = (e) => { if (e.data === "STOP") {