Whitepaper
Docs
Sign In
Function
Function
filter
test
Function ID
test
Creator
@testopenwebui
Downloads
37+
appends more questions
Get
README
No README available
Function Code
Show
class Filter: # Define and Valves class Valves(BaseModel): priority: int = Field( default=0, description="Priority level for the filter operations." ) test_valve: int = Field( default=4, description="A valve controlling a numberical value" ) pass # Define any UserValves class UserValves(BaseModel): test_user_valve: bool = Field( default=False, description="A user valve controlling a True/False (on/off) switch" ) pass def __init__(self): self.valves = self.Valves() pass def inlet(self, body: dict, __user__: Optional[dict] = None) -> dict: print(f"inlet:{__name__}") print(f"inlet:body:{body}") print(f"inlet:user:{__user__}") # Pre-processing logic here return body