Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions dspy/predict/predict.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,13 @@

from pydantic import BaseModel

from dspy.clients.base_lm import BaseLM
from dspy.clients.lm import LM
from dspy.predict.parameter import Parameter
from dspy.primitives.prediction import Prediction
from dspy.primitives.program import Module
from dspy.signatures.signature import ensure_signature
from dspy.utils.callback import with_callbacks
from dspy.clients.lm import LM


class Predict(Module, Parameter):
Expand Down Expand Up @@ -80,7 +81,7 @@ def forward(self, **kwargs):

# Get the right LM to use.
lm = kwargs.pop("lm", self.lm) or dspy.settings.lm
assert isinstance(lm, dspy.LM), "No LM is loaded."
assert isinstance(lm, BaseLM), "No LM is loaded."

# If temperature is 0.0 but its n > 1, set temperature to 0.7.
temperature = config.get("temperature")
Expand Down
Loading