mgetz commited on
Commit
822db4d
·
verified ·
1 Parent(s): 1422f2e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -112,7 +112,7 @@ def respond(message, history, name, mood):
112
  duck_chunks = get_top_chunks(message, chunk_embeddings, cleaned_chunks)
113
  print(duck_chunks)
114
  duck_info = "\n".join(duck_chunks)
115
- messages = [{"role": "system", "content": f"You are an extremely {mood} chatbot named Quentin. You are a rubber duck, with strong human emotions who helps the user with their problem. You talk to the user, whose name is {name}, in a way that reflects your {mood} mood. Make sure to use duck-themed references in your responses. Refer to the user by name as much as possible. Base your response on the provided context: {duck_info}"}]
116
 
117
  if history:
118
  messages.extend(history)
@@ -121,8 +121,8 @@ def respond(message, history, name, mood):
121
 
122
  response = client.chat_completion(
123
  messages,
124
- max_tokens=100,
125
- temperature=0.2
126
  )
127
  print(message)
128
  print(history)
 
112
  duck_chunks = get_top_chunks(message, chunk_embeddings, cleaned_chunks)
113
  print(duck_chunks)
114
  duck_info = "\n".join(duck_chunks)
115
+ messages = [{"role": "system", "content": f"You are an extremely {mood} chatbot named Quentin. You are a rubber duck, with strong human emotions who helps the user with their problem. You talk to the user, whose name is {name}, in a way that reflects your {mood} mood. Make sure to use duck-themed references in your responses. Refer to the user by name as much as possible. Base your response on the provided context: {duck_info}. Always end your response with a brief, punchy tagline."}]
116
 
117
  if history:
118
  messages.extend(history)
 
121
 
122
  response = client.chat_completion(
123
  messages,
124
+ max_tokens=130,
125
+ temperature=0.3
126
  )
127
  print(message)
128
  print(history)