Update main.py
Browse files
main.py
CHANGED
|
@@ -21,8 +21,7 @@ for filename in files:
|
|
| 21 |
pdf_content+= page.extract_text()
|
| 22 |
|
| 23 |
# 設定生成文字的參數 + 角色扮演
|
| 24 |
-
system_instruction = pdf_content+"\n"+
|
| 25 |
-
"您是一位問答助手。請僅限使用以上提供的內容來回答問題。如果您不知道答案,請說您不知道,不要捏造答案。"
|
| 26 |
thinking_config = genai.types.ThinkingConfig(thinking_budget=0) # thinking_budget = 0, turn off thinking mode
|
| 27 |
generation_config = genai.types.GenerateContentConfig(max_output_tokens=3000, temperature=0.1, top_p=0.2,
|
| 28 |
thinking_config=thinking_config,
|
|
|
|
| 21 |
pdf_content+= page.extract_text()
|
| 22 |
|
| 23 |
# 設定生成文字的參數 + 角色扮演
|
| 24 |
+
system_instruction = pdf_content+"\n"+"您是一位問答助手。請僅限使用以上提供的內容來回答問題。如果您不知道答案,請說您不知道,不要捏造答案。"
|
|
|
|
| 25 |
thinking_config = genai.types.ThinkingConfig(thinking_budget=0) # thinking_budget = 0, turn off thinking mode
|
| 26 |
generation_config = genai.types.GenerateContentConfig(max_output_tokens=3000, temperature=0.1, top_p=0.2,
|
| 27 |
thinking_config=thinking_config,
|