Class WikiAIChatRest

java.lang.Object
fr.paris.lutece.plugins.wiki.modules.ai.rs.AbstractRestEndpoint
fr.paris.lutece.plugins.wiki.modules.ai.rs.WikiAIChatRest

@RequestScoped @Path("wiki/ai") public class WikiAIChatRest extends AbstractRestEndpoint
REST endpoint for Wiki AI chat operations with streaming support.
  • 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 identifier
      eventSink - the SSE event sink
      sse - the SSE context