jcmachicao commited on
Commit
13b8afd
verified
1 Parent(s): 5e9d7c9

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -5
app.py CHANGED
@@ -30,8 +30,8 @@ def generacion_llm(texto_input):
30
 
31
  # Call OpenAI API
32
  try:
33
- response = openai.ChatCompletion.create(
34
- model="gpt-3.5-turbo",
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
- frequency_penalty=0,
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