From 60722e2ce74d569657e8227cf419b4a2140cf263 Mon Sep 17 00:00:00 2001 From: xufang Date: Fri, 20 Dec 2024 09:38:04 +0800 Subject: [PATCH] fix issue --- samples/cpp/text_generation/greedy_causal_lm.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/samples/cpp/text_generation/greedy_causal_lm.cpp b/samples/cpp/text_generation/greedy_causal_lm.cpp index be3bad2bee..174feb10e9 100644 --- a/samples/cpp/text_generation/greedy_causal_lm.cpp +++ b/samples/cpp/text_generation/greedy_causal_lm.cpp @@ -17,7 +17,7 @@ int main(int argc, char* argv[]) try { int iter = 0; while (iter < 10) { auto result = pipe.generate(prompt, config); - std::cout << result.texts << std::endl; + std::cout << result.texts[0] << std::endl; iter++; std::cout << "\n pipeline generate finish iter:" << iter << std::endl; std::cout << "generate duration s:" << result.perf_metrics.get_generate_duration().mean * 0.001 << std::endl;