Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -17,10 +17,10 @@ def res(prompt, historial):
|
|
17 |
historial.append({'role':'user', 'content':prompt})
|
18 |
|
19 |
# Compleción
|
20 |
-
|
21 |
-
|
22 |
response_choices0 = get_completion_from_messages(historial)
|
23 |
-
|
24 |
|
25 |
# Tratamos extraer la respuesta
|
26 |
respuesta = response_choices0.message.content
|
|
|
17 |
historial.append({'role':'user', 'content':prompt})
|
18 |
|
19 |
# Compleción
|
20 |
+
context=get_docs(prompt)
|
21 |
+
historial.append({'role':'system', 'content':template(context)})
|
22 |
response_choices0 = get_completion_from_messages(historial)
|
23 |
+
historial.pop() # delete the context prompt
|
24 |
|
25 |
# Tratamos extraer la respuesta
|
26 |
respuesta = response_choices0.message.content
|