From 0ffb7fc10cf3ba291a99c18e52e2d24dd93422c1 Mon Sep 17 00:00:00 2001 From: Wian Stipp <38293489+WianStipp@users.noreply.github.com> Date: Thu, 20 Jul 2023 06:44:29 -0700 Subject: [PATCH] One Line Fix: missing text output with huggingface TGI LLM (#7972) Small bug fix. The async _call method was missing a line to return the generated text. @baskaryan --- langchain/llms/huggingface_text_gen_inference.py | 1 + 1 file changed, 1 insertion(+) diff --git a/langchain/llms/huggingface_text_gen_inference.py b/langchain/llms/huggingface_text_gen_inference.py index 1bd150de6..012dd29a5 100644 --- a/langchain/llms/huggingface_text_gen_inference.py +++ b/langchain/llms/huggingface_text_gen_inference.py @@ -255,4 +255,5 @@ class HuggingFaceTextGenInference(LLM): if not token.special: if text_callback: await text_callback(token.text) + text += token.text return text