mirror of
https://github.com/NovaOSS/nova-api.git
synced 2024-11-25 20:33:58 +01:00
Auto-trigger - Production server started
This commit is contained in:
parent
44c7a19f97
commit
c4137a9eab
|
@ -119,6 +119,7 @@ async def stream(
|
||||||
raise ValueError(f'Proxy {response.text()} is transparent!')
|
raise ValueError(f'Proxy {response.text()} is transparent!')
|
||||||
|
|
||||||
except Exception as exc:
|
except Exception as exc:
|
||||||
|
print(f'[!] proxy {proxies.get_proxy()} error - ({type(exc)} {exc})')
|
||||||
continue
|
continue
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
@ -162,7 +163,6 @@ async def stream(
|
||||||
model=model,
|
model=model,
|
||||||
target_request=target_request
|
target_request=target_request
|
||||||
):
|
):
|
||||||
print(f'[STREAM] {chunk}')
|
|
||||||
yield chunk
|
yield chunk
|
||||||
|
|
||||||
break
|
break
|
||||||
|
@ -175,8 +175,6 @@ async def stream(
|
||||||
print('[!] aiohttp came up with a dumb excuse to not work again ("cOnNeCtIoN rEsEt")')
|
print('[!] aiohttp came up with a dumb excuse to not work again ("cOnNeCtIoN rEsEt")')
|
||||||
continue
|
continue
|
||||||
|
|
||||||
print(f'[STREAM] {json_response}')
|
|
||||||
|
|
||||||
if is_chat and is_stream:
|
if is_chat and is_stream:
|
||||||
yield await chat.create_chat_chunk(chat_id=chat_id, model=model, content=chat.CompletionStop)
|
yield await chat.create_chat_chunk(chat_id=chat_id, model=model, content=chat.CompletionStop)
|
||||||
yield 'data: [DONE]\n\n'
|
yield 'data: [DONE]\n\n'
|
||||||
|
|
Loading…
Reference in a new issue