JSAV commited on
Commit
cdd1ca4
1 Parent(s): 25bbf66

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -1
app.py CHANGED
@@ -8,12 +8,14 @@ import uuid
8
  import json
9
  conversation_id = str(uuid.uuid4())
10
  print(conversation_id)
 
 
11
 
12
  def res(prompt, historial):
13
  # Preparar historial
14
  #historial=json.loads(historial)
15
  if historial==[]:
16
- historial=sysPrompt
17
  historial.append({'role':'user', 'content':prompt})
18
 
19
  # Compleción
 
8
  import json
9
  conversation_id = str(uuid.uuid4())
10
  print(conversation_id)
11
+ import copy
12
+
13
 
14
  def res(prompt, historial):
15
  # Preparar historial
16
  #historial=json.loads(historial)
17
  if historial==[]:
18
+ historial=copy.deepcopy(sysPrompt)
19
  historial.append({'role':'user', 'content':prompt})
20
 
21
  # Compleción