Update main.py
Browse files
main.py
CHANGED
@@ -205,7 +205,7 @@ async def chat_completions(
|
|
205 |
async def generate():
|
206 |
async with httpx.AsyncClient() as client:
|
207 |
try:
|
208 |
-
async with client.stream('POST', 'https://sider.ai/api/
|
209 |
response.raise_for_status()
|
210 |
async for line in response.aiter_lines():
|
211 |
if line and ("[DONE]" not in line):
|
|
|
205 |
async def generate():
|
206 |
async with httpx.AsyncClient() as client:
|
207 |
try:
|
208 |
+
async with client.stream('POST', 'https://sider.ai/api/v3/completion/text', headers=headers, json=json_data, timeout=120.0) as response:
|
209 |
response.raise_for_status()
|
210 |
async for line in response.aiter_lines():
|
211 |
if line and ("[DONE]" not in line):
|