mirror of
https://github.com/open-webui/open-webui
synced 2024-11-16 13:40:55 +00:00
refac: comments
This commit is contained in:
parent
40cde07e5c
commit
9108df177c
@ -36,6 +36,8 @@ class Filter:
|
|||||||
pass
|
pass
|
||||||
|
|
||||||
def inlet(self, body: dict, user: Optional[dict] = None) -> dict:
|
def inlet(self, body: dict, user: Optional[dict] = None) -> dict:
|
||||||
|
# This method is invoked before the request is sent to the chat completion API.
|
||||||
|
# It can be used to modify the request body or perform validation checks.
|
||||||
print("inlet")
|
print("inlet")
|
||||||
print(body)
|
print(body)
|
||||||
print(user)
|
print(user)
|
||||||
@ -50,9 +52,12 @@ class Filter:
|
|||||||
return body
|
return body
|
||||||
|
|
||||||
def outlet(self, body: dict, user: Optional[dict] = None) -> dict:
|
def outlet(self, body: dict, user: Optional[dict] = None) -> dict:
|
||||||
|
# This method is invoked after the chat completion API has processed
|
||||||
|
# the request and generated a response. It can be used to overwrite the response messages.
|
||||||
print(f"outlet")
|
print(f"outlet")
|
||||||
print(body)
|
print(body)
|
||||||
print(user)
|
print(user)
|
||||||
|
|
||||||
return body`;
|
return body`;
|
||||||
|
|
||||||
const saveHandler = async () => {
|
const saveHandler = async () => {
|
||||||
|
Loading…
Reference in New Issue
Block a user