Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -32,15 +32,16 @@ def llm_infer(endpoint_id, messages, ak, sk, agent_network_output=True):
|
|
32 |
def respond(message, history, ep, sp, ak, sk,intimacy_stage):
|
33 |
if intimacy_stage is not None:
|
34 |
stage, define=intimacy_stage.split('##')
|
|
|
|
|
|
|
|
|
35 |
else:
|
36 |
"", history
|
37 |
messages = [
|
38 |
{
|
39 |
'role':'system',
|
40 |
-
'content':
|
41 |
-
stage=stage,
|
42 |
-
define=define
|
43 |
-
)
|
44 |
},
|
45 |
]
|
46 |
for part in history:
|
|
|
32 |
def respond(message, history, ep, sp, ak, sk,intimacy_stage):
|
33 |
if intimacy_stage is not None:
|
34 |
stage, define=intimacy_stage.split('##')
|
35 |
+
_sp=sp.format(
|
36 |
+
stage=stage,
|
37 |
+
define=define
|
38 |
+
)
|
39 |
else:
|
40 |
"", history
|
41 |
messages = [
|
42 |
{
|
43 |
'role':'system',
|
44 |
+
'content':_sp
|
|
|
|
|
|
|
45 |
},
|
46 |
]
|
47 |
for part in history:
|