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
6 changes: 3 additions & 3 deletions dspy/functional/functional.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ def _predictor(func) -> dspy.Module:
return _StripOutput(TypedPredictor(signature, **kwargs), output_key)

# if we have only a single callable argument, the decorator was invoked with no key word arguments
# so we just return the wrapped function
# so we just return the wrapped function
if len(args) == 1 and callable(args[0]) and len(kwargs) == 0:
return _predictor(args[0])
return _predictor
Expand All @@ -36,7 +36,7 @@ def _cot(func) -> dspy.Module:
return _StripOutput(TypedChainOfThought(signature, **kwargs), output_key)

# if we have only a single callable argument, the decorator was invoked with no key word arguments
# so we just return the wrapped function
# so we just return the wrapped function
if len(args) == 1 and callable(args[0]) and len(kwargs) == 0:
return _cot(args[0])
return _cot
Expand Down Expand Up @@ -217,7 +217,7 @@ def parse(x):
format=lambda x: x if isinstance(x, str) else str(x),
parser=parse,
)
elif type_ in (str, int, float, bool):
elif type_ in (str, int, float):
signature = signature.with_updated_fields(
name,
desc=field.json_schema_extra.get("desc", "")
Expand Down