Package com.axelor.ai.chat
Interface ChatStreamer
- All Known Implementing Classes:
ChatStreamerImpl
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
Main orchestrator entry point. Implementations wire together
ChatProvider + ToolExecutor + PartTracker + StreamWriter to run the multi-step loop.-
Method Summary
Modifier and TypeMethodDescriptionstream(ChatRequest request, StreamWriter writer) Starts an asynchronous streaming chat loop.
-
Method Details
-
stream
Starts an asynchronous streaming chat loop.The implementation calls the LLM, relays streaming deltas as
StreamEvents to the writer, and when the LLM requests tool calls, executes them and feeds results back for subsequent iterations.- Parameters:
request- the chat request containing message history and optionswriter- the SSE stream writer for the HTTP response- Returns:
- a handle to cancel the loop or await its completion
-