From 866db7e1bb22abcc8be7ea23abaeaf60a251dbc5 Mon Sep 17 00:00:00 2001 From: Randy Shuai Date: Thu, 11 May 2023 11:49:37 -0700 Subject: [PATCH] clear fetch before emplace --- onnxruntime/core/framework/cloud_invoker.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/onnxruntime/core/framework/cloud_invoker.cc b/onnxruntime/core/framework/cloud_invoker.cc index 0f07ac29464e5..a2e9ec97cf931 100644 --- a/onnxruntime/core/framework/cloud_invoker.cc +++ b/onnxruntime/core/framework/cloud_invoker.cc @@ -187,6 +187,7 @@ onnxruntime::Status OpenAIInvoker::Send(const CloudEndPointConfig& run_options, auto* output_string = output_tensor->MutableData(); *output_string = string_buffer.ss_.str(); auto tensor_type = DataTypeImpl::GetType(); + ort_outputs.clear(); ort_outputs.emplace_back(output_tensor.release(), tensor_type, tensor_type->GetDeleteFunc()); return Status::OK(); }