createMessageResult method

CreateMessageResult? createMessageResult(
  1. String key
)

The sampling arm of the schema InputResponse union under key.

Missing key is null. A value without content, model and role throws ArgumentError.

Implementation

CreateMessageResult? createMessageResult(String key) {
  final value = _typedInputResponse(key, const [
    Keys.content,
    Keys.model,
    Keys.role,
  ]);
  return value == null ? null : value as CreateMessageResult;
}