Adding support to new openai apikey format (#2030)
This commit is contained in:
parent
91f5e6b8f7
commit
c37fcc9299
|
|
@ -14,6 +14,7 @@ openai_regex = re.compile(
|
|||
r"sk-[a-zA-Z0-9_-]{92}$|" +
|
||||
r"sk-proj-[a-zA-Z0-9_-]{48}$|"+
|
||||
r"sk-proj-[a-zA-Z0-9_-]{124}$|"+
|
||||
r"sk-proj-[a-zA-Z0-9_-]{156}$|"+ #新版apikey位数不匹配故修改此正则表达式
|
||||
r"sess-[a-zA-Z0-9]{40}$"
|
||||
)
|
||||
def is_openai_api_key(key):
|
||||
|
|
|
|||
Loading…
Reference in New Issue