Spaces:
Running
Running
eberhenriquez94
commited on
app.py
CHANGED
@@ -34,11 +34,12 @@ def llama_response(message, history):
|
|
34 |
stream=False
|
35 |
)
|
36 |
|
37 |
-
# Procesamos la respuesta
|
38 |
response_text = ""
|
39 |
-
|
40 |
-
|
41 |
-
|
|
|
42 |
return response_text
|
43 |
|
44 |
# Configuramos la interfaz de Gradio
|
|
|
34 |
stream=False
|
35 |
)
|
36 |
|
37 |
+
# Procesamos la respuesta seg煤n el formato proporcionado
|
38 |
response_text = ""
|
39 |
+
if completion and isinstance(completion, list) and "choices" in completion[0]:
|
40 |
+
# Accedemos al mensaje contenido en la primera elecci贸n
|
41 |
+
response_text = completion[0]["choices"][0]["message"]["content"]
|
42 |
+
|
43 |
return response_text
|
44 |
|
45 |
# Configuramos la interfaz de Gradio
|