DSPy: The framework for programming—not prompting—language models
Python
fix(dsp): get the model from the kwargs attached by the parent class
Rémi Connessonaee2b8f242ee
diff --git a/dsp/modules/hf_client.py b/dsp/modules/hf_client.pyindex 56bbbb2ab..aaac020d9 100644--- a/dsp/modules/hf_client.py+++ b/dsp/modules/hf_client.py@@ -128,13 +128,14 @@ class HFClientVLLM(HFModel):self.headers = {"Content-Type": "application/json"}self.kwargs = kwargs+ self.model = modeldef _generate(self, prompt, **kwargs):kwargs = {**self.kwargs, **kwargs}payload = {- "model": self.model,+ "model": self.kwargs["model"],"prompt": prompt,**kwargs,}