From 785b9d47b7c10f5734cb7a9a4f67acda86bd47d0 Mon Sep 17 00:00:00 2001 From: Akio Nishimura Date: Fri, 29 Sep 2023 00:05:24 +0900 Subject: [PATCH] Fix stop key of TextGen. (#11109) The key of stopping strings used in text-generation-webui api is [`stopping_strings`](https://github.com/oobabooga/text-generation-webui/blob/main/api-examples/api-example.py#L51), not `stop`. --- libs/langchain/langchain/llms/textgen.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/langchain/langchain/llms/textgen.py b/libs/langchain/langchain/llms/textgen.py index 6b409ecb12..e962c7be27 100644 --- a/libs/langchain/langchain/llms/textgen.py +++ b/libs/langchain/langchain/llms/textgen.py @@ -175,7 +175,7 @@ class TextGen(LLM): params = {"preset": self.preset} # then sets it as configured, or default to an empty list: - params["stop"] = self.stopping_strings or stop or [] + params["stopping_strings"] = self.stopping_strings or stop or [] return params