DSPy: The framework for programming—not prompting—language models
Python
Move `stop_sequences` to init kwargs rather than passed into `basic_request` as kwargs there.
Connor Shortenf8097dfb0bb9
diff --git a/dsp/modules/cohere.py b/dsp/modules/cohere.pyindex e88c6d5c7..a967238a6 100644--- a/dsp/modules/cohere.py+++ b/dsp/modules/cohere.py@@ -67,9 +67,9 @@ class Cohere(LM):"frequency_penalty": 0,"presence_penalty": 0,"num_generations": 1,+ "stop_sequences": stop_sequences**kwargs,}- self.stop_sequences = stop_sequencesself.max_num_generations = 5self.history: list[dict[str, Any]] = []@@ -78,7 +78,6 @@ class Cohere(LM):raw_kwargs = kwargskwargs = {**self.kwargs,- "stop_sequences": self.stop_sequences,"prompt": prompt,**kwargs,}