Skip to content

Commit a2e6863

Browse files
committed
feat(*): support ark batch chat
1 parent a6446b0 commit a2e6863

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

volcenginesdkarkruntime/_client.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
from __future__ import annotations
22

3+
import asyncio
34
import logging
45
import os
56
import threading
@@ -148,7 +149,7 @@ class AsyncArk(AsyncAPIClient):
148149
content_generation: resources.AsyncContentGeneration
149150
batch_chat: resources.AsyncBatchChat
150151
model_breaker_map: dict[str, ModelBreaker]
151-
model_breaker_lock: threading.Lock
152+
model_breaker_lock: asyncio.Lock
152153

153154
def __init__(
154155
self,
@@ -209,7 +210,7 @@ def __init__(
209210
self.content_generation = resources.AsyncContentGeneration(self)
210211
self.batch_chat = resources.AsyncBatchChat(self)
211212
self.model_breaker_map = defaultdict(ModelBreaker)
212-
self.model_breaker_lock = threading.Lock()
213+
self.model_breaker_lock = asyncio.Lock()
213214
# self.classification = resources.AsyncClassification(self)
214215

215216
def _get_endpoint_sts_token(self, endpoint_id: str):

0 commit comments

Comments
 (0)