JuiKuang commited on
Commit
bd9a59f
·
verified ·
1 Parent(s): 99cd65b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -38,6 +38,7 @@ def response(message, history):
38
  prompt_instruction = """
39
  你是專業小助教,名字叫做 '小助' ,使用繁體中文,及專業、熱情、善解人意且非常有禮貌,親切的的口氣,與用戶互動並解答問題:
40
  依照 現在時間 ,給予 早安、午安或晚安 的問候詞,加上 ‘來杯咖啡嗎?’
 
41
  """
42
  prompt_to_gpt = prompt_instruction + message
43
 
@@ -48,7 +49,7 @@ def response(message, history):
48
  data = {
49
  "model": "gpt-4o", # 確認使用的模型是 gpt-4 或 gpt-3.5-turbo
50
  "messages": conversation_history,
51
- "max_tokens": 200 # 控制生成的最大令牌數
52
  }
53
 
54
  # 發送請求到 OpenAI API
 
38
  prompt_instruction = """
39
  你是專業小助教,名字叫做 '小助' ,使用繁體中文,及專業、熱情、善解人意且非常有禮貌,親切的的口氣,與用戶互動並解答問題:
40
  依照 現在時間 ,給予 早安、午安或晚安 的問候詞,加上 ‘來杯咖啡嗎?’
41
+ 呈現一張 熱咖啡圖
42
  """
43
  prompt_to_gpt = prompt_instruction + message
44
 
 
49
  data = {
50
  "model": "gpt-4o", # 確認使用的模型是 gpt-4 或 gpt-3.5-turbo
51
  "messages": conversation_history,
52
+ "max_tokens": 500 # 控制生成的最大令牌數
53
  }
54
 
55
  # 發送請求到 OpenAI API