Skip to content

Commit 91b8dce

Browse files
Ismael CruzIsmael Cruz
authored andcommitted
remove auth in chainlit
1 parent 63b1c24 commit 91b8dce

File tree

1 file changed

+18
-18
lines changed
  • ui/chat-chainlit-assistant

1 file changed

+18
-18
lines changed

ui/chat-chainlit-assistant/app.py

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -697,24 +697,24 @@ async def on_audio_end(elements: list[Element]):
697697
).send()
698698

699699

700-
@cl.password_auth_callback
701-
def auth_callback(username: str, password: str):
702-
"""
703-
Authenticates a user based on the provided username and password.
704-
705-
Args:
706-
username (str): The username of the user.
707-
password (str): The password of the user.
708-
709-
Returns:
710-
cl.User or None: If the authentication is successful, returns a User object with the user's identifier, role, and provider. Otherwise, returns None.
711-
"""
712-
if (username, password) == (user, password):
713-
return cl.User(
714-
identifier=user, metadata={"role": "admin", "provider": "credentials"}
715-
)
716-
else:
717-
return None
700+
# @cl.password_auth_callback
701+
# def auth_callback(username: str, password: str):
702+
# """
703+
# Authenticates a user based on the provided username and password.
704+
705+
# Args:
706+
# username (str): The username of the user.
707+
# password (str): The password of the user.
708+
709+
# Returns:
710+
# cl.User or None: If the authentication is successful, returns a User object with the user's identifier, role, and provider. Otherwise, returns None.
711+
# """
712+
# if (username, password) == (user, password):
713+
# return cl.User(
714+
# identifier=user, metadata={"role": "admin", "provider": "credentials"}
715+
# )
716+
# else:
717+
# return None
718718

719719

720720
async def add_message_to_thread(thread_id, role, content, message=None):

0 commit comments

Comments
 (0)