Update app.py
Browse files
app.py
CHANGED
|
@@ -30,8 +30,8 @@ def generacion_llm(texto_input):
|
|
| 30 |
|
| 31 |
# Call OpenAI API
|
| 32 |
try:
|
| 33 |
-
response =
|
| 34 |
-
model=
|
| 35 |
messages=[
|
| 36 |
{"role": "system", "content": mensaje_sistema},
|
| 37 |
{"role": "user", "content": mensaje_usuario}
|
|
@@ -39,10 +39,9 @@ def generacion_llm(texto_input):
|
|
| 39 |
temperature=0.8,
|
| 40 |
max_tokens=300,
|
| 41 |
top_p=1,
|
| 42 |
-
|
| 43 |
-
presence_penalty=0
|
| 44 |
)
|
| 45 |
-
|
| 46 |
# Extract the generated text from the response
|
| 47 |
texto_respuesta = response["choices"][0]["message"]["content"]
|
| 48 |
|
|
|
|
| 30 |
|
| 31 |
# Call OpenAI API
|
| 32 |
try:
|
| 33 |
+
response = client.chat.completions.create(
|
| 34 |
+
model=modelox,
|
| 35 |
messages=[
|
| 36 |
{"role": "system", "content": mensaje_sistema},
|
| 37 |
{"role": "user", "content": mensaje_usuario}
|
|
|
|
| 39 |
temperature=0.8,
|
| 40 |
max_tokens=300,
|
| 41 |
top_p=1,
|
| 42 |
+
|
|
|
|
| 43 |
)
|
| 44 |
+
|
| 45 |
# Extract the generated text from the response
|
| 46 |
texto_respuesta = response["choices"][0]["message"]["content"]
|
| 47 |
|