Skip to content

armgit / dspy

Public Imported from GitHub
0

DSPy: The framework for programming—not prompting—language models

Python

fix(dsp): attach `kwargs` to HFClientVLLM instance

Rémi Connesson58affaae23c8
diff --git a/dsp/modules/hf_client.py b/dsp/modules/hf_client.py
index 43def85d2..9fd7894f1 100644
--- a/dsp/modules/hf_client.py
+++ b/dsp/modules/hf_client.py
@@ -127,6 +127,8 @@ class HFClientVLLM(HFModel):
raise ValueError(f"The url provided to `HFClientVLLM` is neither a string nor a list of strings. It is of type {type(url)}.")
self.headers = {"Content-Type": "application/json"}
+ self.kwargs = kwargs
+
def _generate(self, prompt, **kwargs):
kwargs = {**self.kwargs, **kwargs}