Spaces:
Sleeping
Sleeping
Update agent_functions.py
Browse files- agent_functions.py +2 -2
agent_functions.py
CHANGED
|
@@ -83,7 +83,7 @@ def generar_pdf_orden(order_details, filepath='orden_compra.pdf'):
|
|
| 83 |
c.save()
|
| 84 |
return filepath
|
| 85 |
|
| 86 |
-
def obtener_respuesta(pregunta, texto_preprocesado, modelo="gpt-4", temperatura=0.5):
|
| 87 |
try:
|
| 88 |
response = openai.ChatCompletion.create(
|
| 89 |
model=modelo,
|
|
@@ -98,7 +98,7 @@ def obtener_respuesta(pregunta, texto_preprocesado, modelo="gpt-4", temperatura=
|
|
| 98 |
# Configura la solicitud de síntesis de voz
|
| 99 |
input_text = texttospeech.SynthesisInput(text=respuesta)
|
| 100 |
voice = texttospeech.VoiceSelectionParams(
|
| 101 |
-
language_code="es-ES", ssml_gender=texttospeech.SsmlVoiceGender.
|
| 102 |
)
|
| 103 |
audio_config = texttospeech.AudioConfig(
|
| 104 |
audio_encoding=texttospeech.AudioEncoding.MP3
|
|
|
|
| 83 |
c.save()
|
| 84 |
return filepath
|
| 85 |
|
| 86 |
+
def obtener_respuesta(pregunta, texto_preprocesado, modelo="gpt-4-turbo", temperatura=0.5):
|
| 87 |
try:
|
| 88 |
response = openai.ChatCompletion.create(
|
| 89 |
model=modelo,
|
|
|
|
| 98 |
# Configura la solicitud de síntesis de voz
|
| 99 |
input_text = texttospeech.SynthesisInput(text=respuesta)
|
| 100 |
voice = texttospeech.VoiceSelectionParams(
|
| 101 |
+
language_code="es-ES", ssml_gender=texttospeech.SsmlVoiceGender.FEMALE,
|
| 102 |
)
|
| 103 |
audio_config = texttospeech.AudioConfig(
|
| 104 |
audio_encoding=texttospeech.AudioEncoding.MP3
|