DSPy: The framework for programming—not prompting—language models
Python
comm remove
Somesh Fengade60a7cb054d13
diff --git a/dsp/modules/lm.py b/dsp/modules/lm.pyindex 796d8b11b..4af1dc80e 100644--- a/dsp/modules/lm.py+++ b/dsp/modules/lm.py@@ -77,9 +77,11 @@ class LM(ABC):if provider == "cohere":text = choiceselif provider == "openai" or provider == "ollama":- text = " " + self._get_choice_text(choices[0]).strip()- elif provider == "clarifai":- text = choices+ text = ' ' + self._get_choice_text(choices[0]).strip()+ elif provider == "clarifai" or provider == "claude" :+ text=choices+ elif provider == "groq":+ text = ' ' + choiceselif provider == "google":text = choices[0].parts[0].textelif provider == "mistral":