Spaces:
Sleeping
Sleeping
test v2.2
Browse files
main.py
CHANGED
|
@@ -296,12 +296,12 @@ async def stream_generator2(response, prompt, info_memoire):
|
|
| 296 |
try:
|
| 297 |
async for chunk in response:
|
| 298 |
if isinstance(chunk, bytes):
|
| 299 |
-
yield chunk
|
| 300 |
except asyncio.TimeoutError:
|
| 301 |
raise HTTPException(status_code=504, detail="Stream timed out")
|
| 302 |
|
| 303 |
@app.post("/v2/generate-answer/")
|
| 304 |
-
def
|
| 305 |
try:
|
| 306 |
print(user_input)
|
| 307 |
|
|
|
|
| 296 |
try:
|
| 297 |
async for chunk in response:
|
| 298 |
if isinstance(chunk, bytes):
|
| 299 |
+
yield chunk
|
| 300 |
except asyncio.TimeoutError:
|
| 301 |
raise HTTPException(status_code=504, detail="Stream timed out")
|
| 302 |
|
| 303 |
@app.post("/v2/generate-answer/")
|
| 304 |
+
def generate_answer2(user_input: UserInput):
|
| 305 |
try:
|
| 306 |
print(user_input)
|
| 307 |
|