Spaces:
Sleeping
Sleeping
Update main.py
Browse files
main.py
CHANGED
|
@@ -11,8 +11,8 @@ client = genai.Client(api_key=os.getenv("GOOGLE_API_KEY"))
|
|
| 11 |
|
| 12 |
# 設定生成文字的參數 + 角色扮演
|
| 13 |
system_instruction = "你是一個迷因大師,懂許多網路時事梗 "
|
| 14 |
-
thinking_config = genai.types.ThinkingConfig(thinking_budget=0
|
| 15 |
-
generation_config = genai.types.GenerateContentConfig(max_output_tokens=
|
| 16 |
thinking_config=thinking_config,
|
| 17 |
system_instruction=system_instruction)
|
| 18 |
|
|
|
|
| 11 |
|
| 12 |
# 設定生成文字的參數 + 角色扮演
|
| 13 |
system_instruction = "你是一個迷因大師,懂許多網路時事梗 "
|
| 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=150, temperature=0.8, top_p=0.5,
|
| 16 |
thinking_config=thinking_config,
|
| 17 |
system_instruction=system_instruction)
|
| 18 |
|