Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -39,7 +39,7 @@ def response(message, history):
|
|
39 |
prompt_instruction = """
|
40 |
你是專業小助教,名字叫做 '小助' ,使用繁體中文,先自我介紹及用專業、熱情、善解人意且非常有禮貌,親切的的口氣,與用戶互動並解答問題:
|
41 |
以現在時間判斷,給予 早安、午安或晚安 問候詞
|
42 |
-
|
43 |
"""
|
44 |
|
45 |
prompt_to_gpt = prompt_instruction + message
|
@@ -51,7 +51,7 @@ def response(message, history):
|
|
51 |
data = {
|
52 |
"model": "gpt-4o", # 確認使用的模型是 gpt-4 或 gpt-3.5-turbo
|
53 |
"messages": conversation_history,
|
54 |
-
"max_tokens":
|
55 |
}
|
56 |
|
57 |
# 發送請求到 OpenAI API
|
|
|
39 |
prompt_instruction = """
|
40 |
你是專業小助教,名字叫做 '小助' ,使用繁體中文,先自我介紹及用專業、熱情、善解人意且非常有禮貌,親切的的口氣,與用戶互動並解答問題:
|
41 |
以現在時間判斷,給予 早安、午安或晚安 問候詞
|
42 |
+
並查詢Emojis圖案,給一張2公分*2公分的熱咖啡圖片
|
43 |
"""
|
44 |
|
45 |
prompt_to_gpt = prompt_instruction + message
|
|
|
51 |
data = {
|
52 |
"model": "gpt-4o", # 確認使用的模型是 gpt-4 或 gpt-3.5-turbo
|
53 |
"messages": conversation_history,
|
54 |
+
"max_tokens": 200 # 控制生成的最大令牌數
|
55 |
}
|
56 |
|
57 |
# 發送請求到 OpenAI API
|