bugfix
This commit is contained in:
parent
b807c1efba
commit
07627e0648
0
files/README.md
Normal file
0
files/README.md
Normal file
0
i18n/README.md
Normal file
0
i18n/README.md
Normal file
0
logs/README.md
Normal file
0
logs/README.md
Normal file
@ -1,15 +0,0 @@
|
||||
# 大模型公司账号信息
|
||||
|
||||
## 商汤
|
||||
### 开元云账号
|
||||
用户名:kyycloud
|
||||
密码:Kyy123456@
|
||||
_VaV5trl8faujgr7xaE3D
|
||||
调试用Bearer令牌 apikey=
|
||||
eyJhbGciOiJSUzI1NiIsImtpZCI6InB1YmxpYzpoeWRyYS5qd3QuYWNjZXNzLXRva2VuIiwidHlwIjoiSldUIn0.eyJhdWQiOltdLCJjbGllbnRfaWQiOiI0ZTQxNDg1NC03MjAwLTUwOWYtYjk2MC1mOGIwZGJiYmYzMzEiLCJleHAiOjE3MjE3Mzc5MTYsImV4dCI6eyJhbGxfYXoiOmZhbHNlLCJhel9saXN0IjpbImNuLXNoLTAxeiJdLCJpc19kZWRpY2F0ZWRfdGVuYW50IjpmYWxzZSwicHJwX2xpc3QiOltdLCJ0ZW5hbnRfY2VydGlmeV9zdGF0dXMiOmZhbHNlLCJ0ZW5hbnRfY2VydGlmeV90eXBlIjoibm9uZSIsInRlbmFudF9jb2RlIjoia3l5Y2xvdWQiLCJ0ZW5hbnRfaWQiOiIwOTVjOGRhZS1lYjAzLTQ0YmEtYjdkOS00M2QxOWYxNzJhMWIiLCJ1c2VyX2lkIjoiNTM1ZmNlNjYtM2VlOC00ZDdhLTk3OWEtNjVlNDQzMGFmNTRiIiwidXNlcl90eXBlIjoiYWRtaW4iLCJ1c2VybmFtZSI6Imt5eWNsb3VkIn0sImlhdCI6MTcyMTcyNzExNiwiaXNzIjoiaHR0cHM6Ly9zaWduaW4uc2Vuc2Vjb3JlLmNuLyIsImp0aSI6ImNhOWU2YjgyLWY1ZjktNGYyOC05OGJkLTc4ZjNiZGRmOTIxNyIsIm5iZiI6MTcyMTcyNzExNiwic2NwIjpbIm9wZW5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U7fU5Vn8-AkdqtpY0Nhd-CCnQNIvX2ngvA08WxKV4nt9VGouuSCrbvZ8LrtiyPx3Ays3F8fUdefH91WD28YRytzfA1SrAogMfZz7zX-pKulB0erHfoveRqbY4wjDiY8lYRARVmd0d_RVNE7q6ArilvgSOo-oiJI-VQYeFse16xuUcYnvhQjNR6fSW1vARiEvztMOhF1lwPhikcXggqY7-XEklsgot3Qi402kXPu8r9WEfjdlrcY3I8eaGfRew2i4PrwKEZulgwuU7LC1VQufdQDGKxS8X_vQntHMwe1b-3s0RZ8qpMcWB6mNXSB8T6ghT2N0taCkKTc6Oe_O322Y9lLWqLXAYC96cU9eoaIyC0jXNPp9tbE
|
||||
|
||||
AccessKey ID: A13ECA33C26F4B20AB283ADB11159792 AccessKey Secret:D3843572206F4701BB779949C89F7576
|
||||
以下是个人注册的
|
||||
AccessKey ID: 69DDB0B8B4D443A589F8E0AEF70CE29C AccessKey Secret:C7699DC1E8904B3189959942EFB8918B
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -1,9 +0,0 @@
|
||||
from appPublic.log import info
|
||||
from ahserver.auth_api import AuthAPI
|
||||
from sqlor.dbpools import DBPools
|
||||
|
||||
async def checkUserPermission(self, user, path):
|
||||
info(f'checkUserPermission():{user} access to {path} ..')
|
||||
return True
|
||||
|
||||
AuthAPI.checkUserPermission = checkUserPermission
|
@ -1,56 +0,0 @@
|
||||
import sys
|
||||
from ahserver.serverenv import ServerEnv
|
||||
from appPublic.dictObject import DictObject
|
||||
import time
|
||||
import jwt
|
||||
|
||||
def generate_zhipuai_token(apikey: str, exp_seconds: int=86400):
|
||||
try:
|
||||
id, secret = apikey.split(".")
|
||||
except Exception as e:
|
||||
raise Exception("invalid apikey", e)
|
||||
|
||||
payload = {
|
||||
"api_key": id,
|
||||
"exp": int(round(time.time() * 1000)) + exp_seconds * 1000,
|
||||
"timestamp": int(round(time.time() * 1000)),
|
||||
}
|
||||
|
||||
return jwt.encode(
|
||||
payload,
|
||||
secret,
|
||||
algorithm="HS256",
|
||||
headers={"alg": "HS256", "sign_type": "SIGN"},
|
||||
)
|
||||
|
||||
async def get_llm_user_apikey(apiname, user):
|
||||
if apiname == 'qianwen':
|
||||
return DictObject(apikey='sk-ca5dfeb58d494f32a9cf1e9f064370c8')
|
||||
|
||||
if apiname=='baiduqianfan':
|
||||
return DictObject(apikey='SjAN4GHU07LuB8ZYOIstB31G',
|
||||
secretkey='QbakADoGJsM2qjUzIogTkBZruToxYAve')
|
||||
if apiname=='baichuanai':
|
||||
return DictObject(apikey='sk-f1fca6335df32d13c096e5f2e72821db')
|
||||
if apiname=='deepseek':
|
||||
return DictObject(apikey='sk-a6a2d5eca1b7419b95f2c263c362be1e')
|
||||
|
||||
if apiname == 'minimax':
|
||||
return DictObject(apikey='eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJHcm91cE5hbWUiOiJtb3FpbmcgeXUiLCJVc2VyTmFtZSI6Im1vcWluZyB5dSIsIkFjY291bnQiOiIiLCJTdWJqZWN0SUQiOiIxNzY4NTM3NjQ1ODMyNDg3NjAyIiwiUGhvbmUiOiIxMzgwMTAxNTI5MiIsIkdyb3VwSUQiOiIxNzY4NTM3NjQ1ODI4MjkyOTMwIiwiUGFnZU5hbWUiOiIiLCJNYWlsIjoiIiwiQ3JlYXRlVGltZSI6IjIwMjQtMDQtMTAgMTg6MDA6NTMiLCJpc3MiOiJtaW5pbWF4In0.VaRRHr9XMUSYhZOKVS2PRZv6Y9VCaW4JX2ks4QZX3aFr_emjnDbGv5HfNskf54piflEAeTMW4Qw1nG7bqhYea7N5LKHGf0YpesPGSoqxwyZUR4oaJNNVUsSe6eiLbdYSDO2wMb_hV5xyawh-lYe1reBKWaPVuOjfTrDhxzA0IBmzl-jAQhL8-kIZet2uX-p3NjxElpo_zjmVV_hA1BJEvTwuAk8ka-1SBZmXciMhBi1fJG4jcqoHCCN_JHJ7pgjKr5bk2Zw5qCqiU2Ecsc-kPIEK1SI5EYoLszT43UpJ8_wV4Pm07UBCn3vktAa0fjKDSUArPkBoYWSkgKDMWlmxig', groupid='1768537645828292930')
|
||||
if apiname == 'zhipuai':
|
||||
return DictObject(token=generate_zhipuai_token('ffd0affcb6b5f9368f517c09c75a6817.jp9DdpcgwdxXvDiT'))
|
||||
if apiname == 'moonshot':
|
||||
return DictObject(apikey='sk-fHOyIKC2mlIDfGwUQV6SwjwVJkjBJgkNWYv82yt3OdpYh592')
|
||||
if apiname == 'openai':
|
||||
return DictObject(apikey='sk-proj-gFbYlxVnhmfqf8MXhX42T3BlbkFJprO7jXabkwtjmrNeH77Z')
|
||||
if apiname == 'doubao':
|
||||
return DictObject(apikey='a2fddeaa-c31c-4cbe-aacb-732318408dac')
|
||||
|
||||
if apiname == 'tianqi':
|
||||
return DictObject(apikey='94b72c37e62e49f796502d29955447ab', secretkey='afcac498e0a74302bec06d22dcdff213')
|
||||
|
||||
print(f'{user=} not have apikey for {apiname=}')
|
||||
return DictObject()
|
||||
|
||||
g = ServerEnv()
|
||||
g.get_llm_user_apikey = get_llm_user_apikey
|
@ -1,11 +0,0 @@
|
||||
import itchat
|
||||
from appPublic.worker import awaitify
|
||||
from appPublic.dictObject import DictObject
|
||||
from appPublic.background import Background
|
||||
from ahserver.globalEnv import GlobalEnv
|
||||
|
||||
def wechat_login(login_callback, qr_callback):
|
||||
Background(itchat.login, login_callback=login_callback,
|
||||
qr_callback=qr_callback)
|
||||
g = GlobalEnv()
|
||||
g.wechat_login = wechat_login
|
0
wwwroot/README.md
Normal file
0
wwwroot/README.md
Normal file
Loading…
Reference in New Issue
Block a user