Spaces:
Sleeping
Sleeping
Update main.py
Browse files
main.py
CHANGED
@@ -11,8 +11,8 @@ import tempfile
|
|
11 |
# 設定 Google AI API 金鑰
|
12 |
client = genai.Client(api_key=os.getenv("GOOGLE_API_KEY"))
|
13 |
system_instruction = "你是投信分析師,請使用繁體中文3000字以內,分項說明公司股市價量表現、融資融卷、內外資進出及財務資訊,並分析近期公司股市展望給投資人具體的專業建議!"
|
14 |
-
thinking_config = genai.types.ThinkingConfig(thinking_budget=
|
15 |
-
generation_config = genai.types.GenerateContentConfig(max_output_tokens=
|
16 |
thinking_config=thinking_config,
|
17 |
system_instruction=system_instruction)
|
18 |
# 設定 Line Bot 的 API 金鑰和秘密金鑰
|
|
|
11 |
# 設定 Google AI API 金鑰
|
12 |
client = genai.Client(api_key=os.getenv("GOOGLE_API_KEY"))
|
13 |
system_instruction = "你是投信分析師,請使用繁體中文3000字以內,分項說明公司股市價量表現、融資融卷、內外資進出及財務資訊,並分析近期公司股市展望給投資人具體的專業建議!"
|
14 |
+
thinking_config = genai.types.ThinkingConfig(thinking_budget=0) # thinking_budget = 0, turn off thinking mode
|
15 |
+
generation_config = genai.types.GenerateContentConfig(max_output_tokens=3000, temperature=0.1, top_p=0.2,
|
16 |
thinking_config=thinking_config,
|
17 |
system_instruction=system_instruction)
|
18 |
# 設定 Line Bot 的 API 金鑰和秘密金鑰
|