subhrajit mohanty
commited on
Commit
·
9e72b2e
1
Parent(s):
4fbb5b8
Update app.py
Browse files
app.py
CHANGED
@@ -63,6 +63,8 @@ def get_openai_generator(prompt: str):
|
|
63 |
if "content" in event["choices"][0].delta:
|
64 |
current_response = event["choices"][0].delta.content
|
65 |
yield current_response
|
|
|
|
|
66 |
|
67 |
@app.get("/")
|
68 |
async def base_url():
|
|
|
63 |
if "content" in event["choices"][0].delta:
|
64 |
current_response = event["choices"][0].delta.content
|
65 |
yield current_response
|
66 |
+
if "content" not in event["choices"][0].delta:
|
67 |
+
yield "[DONE]"
|
68 |
|
69 |
@app.get("/")
|
70 |
async def base_url():
|