[bug] Collector class missing clear() method documented in official guide
Product
BAML
Describe the bug
According to the official BAML guide, the Collector class should have a clear() method to reset or clear collected logs. However, in the actual implementation (baml-py version 0.201.0), the Collector class does not include a clear() method:
class Collector:
def __init__(self, name: Optional[str] = None) -> None: ...
@property
def logs(self) -> List[FunctionLog]: ...
@property
def last(self) -> Optional[FunctionLog]: ...
@property
def usage(self) -> Usage: ...
def id(self, function_log_id: str) -> Optional[FunctionLog]: ...
# For debugging
@staticmethod
def __function_call_count() -> int: ...
@staticmethod
def __print_storage() -> None: ...
There is no clear() method defined.
Expected behavior: the Collector class should include the clear() method as documented, or the documentation should be updated to reflect its absence.
Reproduction Steps
Package details: name = "baml-py" version = "0.201.0"
Look inside of the Collector class in Python and you will notice clear() is not there
class Collector:
def __init__(self, name: Optional[str] = None) -> None: ...
@property
def logs(self) -> List[FunctionLog]: ...
@property
def last(self) -> Optional[FunctionLog]: ...
@property
def usage(self) -> Usage: ...
def id(self, function_log_id: str) -> Optional[FunctionLog]: ...
# For debugging
@staticmethod
def __function_call_count() -> int: ...
@staticmethod
def __print_storage() -> None: ...
BAML Version
No response
Language/Framework
None
LLM Provider
None
LLM Model
No response
Operating System
None
Browser
None
Code Editor
None
Hey, sorry for the radio silence on this! We'll look into this soon.