fix: anthropic sdk删除proxies导致无法启动 (#962, #960)

This commit is contained in:
Junyan Qin
2024-12-23 21:35:16 +08:00
parent 6606c671b2
commit 535c4a8a11
3 changed files with 14 additions and 7 deletions

View File

@@ -2,7 +2,7 @@ import aiohttp
async def get_myip() -> str:
try:
async with aiohttp.ClientSession() as session:
async with aiohttp.ClientSession(timeout=aiohttp.ClientTimeout(total=10)) as session:
async with session.get("https://ip.useragentinfo.com/myip") as response:
return await response.text()
except Exception as e: