add first commit
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
from typing import Optional
|
||||
from volcenginesdkarkruntime import AsyncArk
|
||||
|
||||
_ark_client: Optional[AsyncArk] = None
|
||||
|
||||
def set_ark_client(client: AsyncArk):
|
||||
global _ark_client
|
||||
_ark_client = client
|
||||
|
||||
def get_ark_client() -> Optional[AsyncArk]:
|
||||
return _ark_client
|
||||
|
||||
def cleanup_ark_client():
|
||||
global _ark_client
|
||||
if _ark_client:
|
||||
# AsyncArk 无显式 close,但可设为 None
|
||||
_ark_client = None
|
||||
Reference in New Issue
Block a user