@@ -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
720720async def add_message_to_thread (thread_id , role , content , message = None ):
0 commit comments