设置推理响应回调函数。
void SetSendResponseCallback(const SendResponseCallback &callback);
参数 |
是否必选 |
说明 |
取值要求 |
---|---|---|---|
callback |
必选 |
推理请求响应回调函数。 |
非空指针。 |
设置请求回调函数。
1 2 3 4 5 | SendResponseCallback callback = [](std::share_ptr<InferenceResponse> &response) { if (response->IsEOS) { } } request->SetSendResponseCallback(callback); |
无。