Skip to content

armgit / dspy

Public Imported from GitHub
0

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.py
index 796d8b11b..4af1dc80e 100644
--- a/dsp/modules/lm.py
+++ b/dsp/modules/lm.py
@@ -77,9 +77,11 @@ class LM(ABC):
if provider == "cohere":
text = choices
elif 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 = ' ' + choices
elif provider == "google":
text = choices[0].parts[0].text
elif provider == "mistral":