Skip to content

armgit / dspy

Public Imported from GitHub
0

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

Python

Update the instruction model checking for prompt template

Insop Songe94640454e7f
diff --git a/dsp/modules/hf_client.py b/dsp/modules/hf_client.py
index 22729012c..9c14a4b29 100644
--- a/dsp/modules/hf_client.py
+++ b/dsp/modules/hf_client.py
@@ -214,7 +214,7 @@ class Together(HFModel):
self.model = model
self.use_inst_template = False
- if "inst" in self.model.lower() or "instruct" in model.lower():
+ if any(keyword in self.model.lower() for keyword in ["inst", "instruct"]):
self.use_inst_template = True
stop_default = "\n\n---"