chatRawMessage method
Stream<String>
chatRawMessage(
- String messageJson, {
- bool enableThinking = false,
- SendOptions options = SendOptions.none,
override
Streams raw SDK JSON for a prebuilt message. This is how tool results go
back: chatRaw always sends role user, and a tool result has to be role
tool for the model to read it as the answer to its call.
Implementation
@override
Stream<String> chatRawMessage(
String messageJson, {
bool enableThinking = false,
SendOptions options = SendOptions.none,
}) => _turn(
jsonDecode(messageJson) as Map<String, Object?>,
(live) => live.chatRawMessage(
messageJson,
enableThinking: enableThinking,
options: options,
),
raw: true,
);