Package com.axelor.ai.chat
Interface ChatHandle
public interface ChatHandle
Handle returned by
ChatStreamer.stream(com.axelor.ai.chat.ChatRequest, com.axelor.ai.chat.stream.StreamWriter) — allows cancellation and awaiting completion.-
Method Summary
-
Method Details
-
cancel
void cancel()Requests cooperative cancellation of the streaming loop. The current LLM turn or tool execution will complete, but no further steps will start. AnStreamEvent.Abortevent is written before the stream closes. -
await
Blocks until the streaming loop finishes or the timeout elapses.- Parameters:
timeout- maximum time to wait- Returns:
trueif the loop completed,falseif the timeout elapsed- Throws:
InterruptedException- if the waiting thread is interrupted
-