""" Python Backend API to chat with private data 15/11/2023 Theekshana Samaradiwakara """ """ /************************************************************************* * * CONFIDENTIAL * __________________ * * Copyright (2023-2024) AI Labs, IronOne Technologies, LLC * All Rights Reserved * * Author : Theekshana Samaradiwakara * Description :Python Backend API to chat with private data * CreatedDate : 15/11/2023 * LastModifiedDate : 10/12/2020 *************************************************************************/ """ # from passlib.context import CryptContext # pwd_context = CryptContext(schemes=["bcrypt"], deprecated="auto") # def hash(password: str): # return pwd_context.hash(password) # def verify(plain_password, hashed_password): # return pwd_context.verify(plain_password, hashed_password) import re def is_valid_open_ai_api_key(secretKey): if re.search("^sk-[a-zA-Z0-9]{32,}$", secretKey ): return True else: return False