We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents ac3950e + 53a3a30 commit 33ff454Copy full SHA for 33ff454
src/llm_agents_from_scratch/tools/pydantic_function.py
@@ -114,7 +114,7 @@ def __init__(
114
Defaults to None.
115
"""
116
self.func = func
117
- self.desc = desc or func.__doc__ or f"Tool for {func.__name__}"
+ self._desc = desc
118
self.params_mdl = _validate_pydantic_function(func)
119
120
@property
@@ -125,7 +125,9 @@ def name(self) -> str:
125
126
def description(self) -> str:
127
"""Description of what this function tool does."""
128
- return self.desc
+ return (
129
+ self._desc or self.func.__doc__ or f"Tool for {self.func.__name__}"
130
+ )
131
132
133
def parameters_json_schema(self) -> dict[str, Any]:
0 commit comments