From 31739577c2e3ca18e50a3a217b6054aba7739b13 Mon Sep 17 00:00:00 2001 From: Abonia Sojasingarayar Date: Mon, 11 Sep 2023 23:20:36 +0200 Subject: [PATCH] textgen-silence-output-feature in terminal (#10402) Hello, Added the new feature to silence TextGen's output in the terminal. - Description: Added a new feature to control printing of TextGen's output to the terminal., - Issue: the issue #TextGen parameter to silence the print in terminal #10337 it fixes (if applicable) Thanks; --------- Co-authored-by: Abonia SOJASINGARAYAR Co-authored-by: Harrison Chase --- libs/langchain/langchain/llms/textgen.py | 4 ---- 1 file changed, 4 deletions(-) diff --git a/libs/langchain/langchain/llms/textgen.py b/libs/langchain/langchain/llms/textgen.py index 5f83dc08b9..6b409ecb12 100644 --- a/libs/langchain/langchain/llms/textgen.py +++ b/libs/langchain/langchain/llms/textgen.py @@ -208,7 +208,6 @@ class TextGen(LLM): prompt=prompt, stop=stop, run_manager=run_manager, **kwargs ): combined_text_output += chunk.text - print(prompt + combined_text_output) result = combined_text_output else: @@ -220,7 +219,6 @@ class TextGen(LLM): if response.status_code == 200: result = response.json()["results"][0]["text"] - print(prompt + result) else: print(f"ERROR: response: {response}") result = "" @@ -256,7 +254,6 @@ class TextGen(LLM): prompt=prompt, stop=stop, run_manager=run_manager, **kwargs ): combined_text_output += chunk.text - print(prompt + combined_text_output) result = combined_text_output else: @@ -268,7 +265,6 @@ class TextGen(LLM): if response.status_code == 200: result = response.json()["results"][0]["text"] - print(prompt + result) else: print(f"ERROR: response: {response}") result = ""