Delete api
Browse files1234567891011121314151617import httpx
import logging
async def process_non_streaming_response(request):
try:
async with httpx.AsyncClient() as client:
# 通过Cloudflare Worker访问
response = await client.post(
"https://hfblackbox.1224435936.workers.dev/api/v1/chat/completions",
json=await request.json(),
headers=dict(request.headers)
)
response.raise_for_status()
return response.json()
except Exception as e:
logging.error(f"请求失败: {str(e)}")
raiseapi/utils.pyDeleted-17