Skip to content

Commit

Permalink
Fix typo
Browse files Browse the repository at this point in the history
  • Loading branch information
YoanSallami committed Jun 12, 2024
1 parent 655495e commit 4de9499
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions docs/api/tools/custom-tools.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,13 @@ from typing import Optional

class BaseTool(dspy.Module):

def __init__(self, name: str):
def __init__(
self,
name: str,
lm = Optional[dspy.LM] = None,
):
self.name = name
self.lm = lm

@abc.abstractmethod
def forward(
Expand All @@ -51,7 +56,6 @@ class BaseTool(dspy.Module):
purpose: str,
prompt: str,
disable_inference: bool = False,
llm: Optional[dspy.LM] = None
) -> dspy.Prediction:
pass
```
Expand Down Expand Up @@ -88,7 +92,7 @@ class GreetTool(BaseTool):
self,
lm = Optional[dspy.LM] = None,
):
super().__init__(name = "Greet")
super().__init__(name = "Greet", lm = lm)
self.predict = dspy.Predict(GreetSignature)
self.prediction_parser = PredictionOutputParser()

Expand Down

0 comments on commit 4de9499

Please sign in to comment.