lazyc commited on
Commit
e0d1d0f
·
verified ·
1 Parent(s): 8b8cac2

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -154,7 +154,8 @@ def chat_with_retry(history_messages, max_retries=MAX_RETRIES):
154
  response = client.chat_completions_create(
155
  model=model,
156
  messages=history_messages,
157
- stream=True
 
158
  )
159
 
160
  return response
@@ -246,7 +247,7 @@ DEFAULT_THEME = {
246
  def format_history(history):
247
  messages = [{
248
  "role": "system",
249
- "content": "You are a helpful assistant",
250
  }]
251
  for item in history:
252
  if item["role"] == "user":
 
154
  response = client.chat_completions_create(
155
  model=model,
156
  messages=history_messages,
157
+ stream=True,
158
+ temperature = 0.7, top_p = 0.8
159
  )
160
 
161
  return response
 
247
  def format_history(history):
248
  messages = [{
249
  "role": "system",
250
+ "content": "You are a helpful assistant.",
251
  }]
252
  for item in history:
253
  if item["role"] == "user":