fix(llm-proxy): get_userorgid 是 async,补 await(否则 coroutine str 化超长 DataError 1406)
This commit is contained in:
parent
7c57550277
commit
717651f4ab
@ -16,7 +16,7 @@ ttl_hours = p.get('ttl_hours', 8)
|
|||||||
max_calls = p.get('max_calls', 500)
|
max_calls = p.get('max_calls', 500)
|
||||||
|
|
||||||
# 机构隔离:token 的 org_id 一律取当前登录用户所属机构,不接受前端传入
|
# 机构隔离:token 的 org_id 一律取当前登录用户所属机构,不接受前端传入
|
||||||
org_id = get_userorgid()
|
org_id = await get_userorgid()
|
||||||
if not org_id:
|
if not org_id:
|
||||||
org_id = '0'
|
org_id = '0'
|
||||||
|
|
||||||
|
|||||||
@ -9,7 +9,7 @@ project_id = (p.get('project_id', '') or '').strip()
|
|||||||
status = (p.get('status', '') or '').strip()
|
status = (p.get('status', '') or '').strip()
|
||||||
|
|
||||||
# 机构隔离:只看本机构签发的 token
|
# 机构隔离:只看本机构签发的 token
|
||||||
org_id = get_userorgid() or '0'
|
org_id = (await get_userorgid()) or '0'
|
||||||
|
|
||||||
rows = await list_llm_tokens(org_id=org_id, project_id=project_id or None,
|
rows = await list_llm_tokens(org_id=org_id, project_id=project_id or None,
|
||||||
status=status or None)
|
status=status or None)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user