Spaces:
Running
Running
File size: 1,003 Bytes
93bc171 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 |
"""
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
|