Class WikiAIChatRest
java.lang.Object
fr.paris.lutece.plugins.wiki.modules.ai.rs.AbstractRestEndpoint
fr.paris.lutece.plugins.wiki.modules.ai.rs.WikiAIChatRest
REST endpoint for Wiki AI chat operations with streaming support.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionjakarta.ws.rs.core.ResponseCreates a new conversation for the authenticated user.voidgetStreamingChatEvents(String streamId, jakarta.ws.rs.sse.SseEventSink eventSink, jakarta.ws.rs.sse.Sse sse) Establishes an SSE connection for receiving chat streaming events.jakarta.ws.rs.core.ResponseinitStreamingChat(Map<String, Object> request) Initializes a streaming chat session.
-
Constructor Details
-
WikiAIChatRest
public WikiAIChatRest()
-
-
Method Details
-
createNewConversation
@POST @Path("chat/new") @Produces("application/json") public jakarta.ws.rs.core.Response createNewConversation()Creates a new conversation for the authenticated user.- Returns:
- response containing the conversation_id or error details
-
initStreamingChat
@POST @Path("chat/stream/init") @Consumes("application/json") @Produces("application/json") public jakarta.ws.rs.core.Response initStreamingChat(Map<String, Object> request) Initializes a streaming chat session.- Parameters:
request- the request containing query and conversation_id- Returns:
- response containing the stream_id or error details
-
getStreamingChatEvents
@GET @Path("chat/stream/events/{streamId}") @Produces("text/event-stream") public void getStreamingChatEvents(@PathParam("streamId") String streamId, @Context jakarta.ws.rs.sse.SseEventSink eventSink, @Context jakarta.ws.rs.sse.Sse sse) Establishes an SSE connection for receiving chat streaming events.- Parameters:
streamId- the stream identifiereventSink- the SSE event sinksse- the SSE context
-