Shrees0507 commited on
Commit
b508c99
·
verified ·
1 Parent(s): 7300c08

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -4
app.py CHANGED
@@ -34,8 +34,7 @@ def chatbot(input, history):
34
  try:
35
  # Call your chatbot function here
36
  message = [{"role": "user", "content": input}]
37
- history = [{"role": "system", "content": "You are a helpful assistant."}]
38
- messages = history + message
39
 
40
  output = client.chat_completion(
41
  messages=messages,
@@ -43,8 +42,6 @@ def chatbot(input, history):
43
  temperature=0.7
44
  )
45
 
46
- history = history + [{"role": "assistant", "content": output.choices[0].message.content}]
47
-
48
  return output.choices[0].message.content
49
 
50
  except Exception as e:
 
34
  try:
35
  # Call your chatbot function here
36
  message = [{"role": "user", "content": input}]
37
+ messages = message
 
38
 
39
  output = client.chat_completion(
40
  messages=messages,
 
42
  temperature=0.7
43
  )
44
 
 
 
45
  return output.choices[0].message.content
46
 
47
  except Exception as e: