public QnAMakerMiddleware(QnAMakerMiddlewareOptions options, HttpClient httpClient = null) { _options = options ?? throw new ArgumentNullException(nameof(options)); _qnaMaker = new QnAMaker(options, httpClient); }
/// <summary> /// Creates a new <see cref="QnAMakerMiddleware"/> instance. /// </summary> /// <param name="endpoint">Endpoint details to connect to the QnA service.</param> /// <param name="options">Options to control the behavior of the middleware.</param> /// <param name="httpClient">A client with which to talk to QnAMaker. /// If null, a default client is used for this instance.</param> public QnAMakerMiddleware(QnAMakerEndpoint endpoint, QnAMakerMiddlewareOptions options = null, HttpClient httpClient = null) { _endpoint = endpoint ?? throw new ArgumentNullException(nameof(endpoint)); _options = options ?? new QnAMakerMiddlewareOptions(); _qnaMaker = new QnAMaker(endpoint, options, httpClient); }