This commit is contained in:
Timothy Jaeryang Baek committed 2026-08-31 01:28:40 -04:00
1 parent 89716ea880
commit 2daa610cba
2 files changed
+94 -8

No files matched your search

@@ -100,6 +100,14 @@ class Filter:
return body
def request(self, body: dict, __user__: Optional[dict] = None) -> dict:
# Modify the request body before each model/provider call.
print(f"request:{__name__}")
print(f"request:body:{body}")
print(f"request:user:{__user__}")
return body
def outlet(self, body: dict, __user__: Optional[dict] = None) -> dict:
# Modify or analyze the response body after processing by the API.
# This function is the post-processor for the API, which can be used to modify the response
@@ -201,6 +209,14 @@ class Filter:
return body
def request(self, body: dict, user: Optional[dict] = None) -> dict:
# Modify the request body before each model/provider call.
print(f"request:{__name__}")
print(f"request:body:{body}")
print(f"request:user:{user}")
return body
def outlet(self, body: dict, user: Optional[dict] = None) -> dict:
# Modify or analyze the response body after processing by the API.
# This function is the post-processor for the API, which can be used to modify the response