diff --git a/langchain/llms/huggingface_text_gen_inference.py b/langchain/llms/huggingface_text_gen_inference.py index 3d17c73418..cab1178983 100644 --- a/langchain/llms/huggingface_text_gen_inference.py +++ b/langchain/llms/huggingface_text_gen_inference.py @@ -169,4 +169,5 @@ class HuggingFaceTextGenInference(LLM): if not token.special: if text_callback: text_callback(token.text) + text += token.text return text