Spaces:
Sleeping
Sleeping
Update main.py
Browse files
main.py
CHANGED
|
@@ -302,13 +302,13 @@ async def call_ki_fusion(messages, model, max_tokens=1024, temperature=0.7, stre
|
|
| 302 |
timeout = httpx.Timeout(None, connect=6.0, read=90.0, write=10.0, pool=5.0)
|
| 303 |
async with httpx.AsyncClient(timeout=timeout, verify=False) as client:
|
| 304 |
if stream:
|
| 305 |
-
async with client.stream("POST", f"{KF_BASE}/chat/completions",
|
| 306 |
headers=headers, json=payload) as resp:
|
| 307 |
resp.raise_for_status()
|
| 308 |
async for chunk in resp.aiter_bytes():
|
| 309 |
yield chunk
|
| 310 |
else:
|
| 311 |
-
r = await client.post(f"{KF_BASE}/chat/completions",
|
| 312 |
headers=headers, json=payload)
|
| 313 |
r.raise_for_status()
|
| 314 |
yield r.json()
|
|
|
|
| 302 |
timeout = httpx.Timeout(None, connect=6.0, read=90.0, write=10.0, pool=5.0)
|
| 303 |
async with httpx.AsyncClient(timeout=timeout, verify=False) as client:
|
| 304 |
if stream:
|
| 305 |
+
async with client.stream("POST", f"{KF_BASE}/chat/completions/",
|
| 306 |
headers=headers, json=payload) as resp:
|
| 307 |
resp.raise_for_status()
|
| 308 |
async for chunk in resp.aiter_bytes():
|
| 309 |
yield chunk
|
| 310 |
else:
|
| 311 |
+
r = await client.post(f"{KF_BASE}/chat/completions/",
|
| 312 |
headers=headers, json=payload)
|
| 313 |
r.raise_for_status()
|
| 314 |
yield r.json()
|