forked from phoenix/litellm-mirror
fix(anthropic_text.py): add support for async text completion calls
This commit is contained in:
parent
bdf7f6d13c
commit
26286a54b8
6 changed files with 324 additions and 98 deletions
|
@ -58,13 +58,16 @@ class AsyncHTTPHandler:
|
|||
|
||||
|
||||
class HTTPHandler:
|
||||
def __init__(self, concurrent_limit=1000):
|
||||
def __init__(
|
||||
self, timeout: httpx.Timeout = _DEFAULT_TIMEOUT, concurrent_limit=1000
|
||||
):
|
||||
# Create a client with a connection pool
|
||||
self.client = httpx.Client(
|
||||
timeout=timeout,
|
||||
limits=httpx.Limits(
|
||||
max_connections=concurrent_limit,
|
||||
max_keepalive_connections=concurrent_limit,
|
||||
)
|
||||
),
|
||||
)
|
||||
|
||||
def close(self):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue