File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change 22
33from pydantic import BaseModel
44
5+ from dspy .clients .base_lm import BaseLM
6+ from dspy .clients .lm import LM
57from dspy .predict .parameter import Parameter
68from dspy .primitives .prediction import Prediction
79from dspy .primitives .program import Module
810from dspy .signatures .signature import ensure_signature
911from dspy .utils .callback import with_callbacks
10- from dspy .clients .lm import LM
1112
1213
1314class Predict (Module , Parameter ):
@@ -80,7 +81,7 @@ def forward(self, **kwargs):
8081
8182 # Get the right LM to use.
8283 lm = kwargs .pop ("lm" , self .lm ) or dspy .settings .lm
83- assert isinstance (lm , dspy . LM ), "No LM is loaded."
84+ assert isinstance (lm , BaseLM ), "No LM is loaded."
8485
8586 # If temperature is 0.0 but its n > 1, set temperature to 0.7.
8687 temperature = config .get ("temperature" )
You can’t perform that action at this time.
0 commit comments