create method

SdkSession create(
  1. SdkConfig config
)

Create a new SDK session with the given configuration.

Implementation

SdkSession create(SdkConfig config) {
  // Validate required fields.
  if (config.apiKey.isEmpty) {
    throw ArgumentError('apiKey must not be empty');
  }
  if (config.model.isEmpty) {
    throw ArgumentError('model must not be empty');
  }
  return SdkSession._(config);
}