chatStream abstract method

Stream<ChatStreamEvent> chatStream(
  1. List<ChatMessage> messages, {
  2. List<Tool>? tools,
  3. CancelToken? cancelToken,
})

Sends a streaming chat request to the provider

messages - The conversation history as a list of chat messages tools - Optional list of tools to use in the chat cancelToken - Optional token to cancel the stream

Returns a stream of chat events

Implementation

Stream<ChatStreamEvent> chatStream(
  List<ChatMessage> messages, {
  List<Tool>? tools,
  CancelToken? cancelToken,
});