Skip to content

Commit

Permalink
Adding support to new openai apikey format (#2030)
Browse files Browse the repository at this point in the history
  • Loading branch information
EricJiang0423 authored Nov 9, 2024
1 parent 91f5e6b commit c37fcc9
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions shared_utils/key_pattern_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
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):
Expand Down

0 comments on commit c37fcc9

Please sign in to comment.