Update app.py
Browse files
app.py
CHANGED
@@ -103,7 +103,8 @@ async def generate(gen:GenModel):
|
|
103 |
],
|
104 |
temperature = gen.temperature,
|
105 |
seed= gen.seed,
|
106 |
-
stream=True
|
|
|
107 |
)
|
108 |
for chunk in output:
|
109 |
delta = chunk['choices'][0]['delta']
|
@@ -111,7 +112,7 @@ async def generate(gen:GenModel):
|
|
111 |
print(delta['role'], end=': ')
|
112 |
elif 'content' in delta:
|
113 |
print(delta['content'], end='')
|
114 |
-
print(chunk)
|
115 |
et = time()
|
116 |
output["time"] = et - st
|
117 |
return output
|
|
|
103 |
],
|
104 |
temperature = gen.temperature,
|
105 |
seed= gen.seed,
|
106 |
+
stream=True,
|
107 |
+
echo = True
|
108 |
)
|
109 |
for chunk in output:
|
110 |
delta = chunk['choices'][0]['delta']
|
|
|
112 |
print(delta['role'], end=': ')
|
113 |
elif 'content' in delta:
|
114 |
print(delta['content'], end='')
|
115 |
+
#print(chunk)
|
116 |
et = time()
|
117 |
output["time"] = et - st
|
118 |
return output
|