This commit is contained in:
parent
cef75b21bd
commit
85b2fffef3
|
|
@ -36,11 +36,13 @@ class PDFGenerator:
|
|||
root_dir = os.path.dirname(os.path.dirname(os.path.dirname(os.path.dirname(current_file))))
|
||||
|
||||
# Try Noto Serif TC first (best Chinese support)
|
||||
# Use static font instead of variable font for better ReportLab compatibility
|
||||
noto_font_path = os.path.join(
|
||||
root_dir,
|
||||
'Cactus_Classical_Serif,Noto_Serif_TC',
|
||||
'Noto_Serif_TC',
|
||||
'NotoSerifTC-VariableFont_wght.ttf'
|
||||
'static',
|
||||
'NotoSerifTC-Regular.ttf' # Use static Regular instead of Variable font
|
||||
)
|
||||
|
||||
print(f"Attempting to load Noto Serif TC from: {noto_font_path}")
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@ def get_stock_news_openai(query, start_date, end_date):
|
|||
"search_context_size": "low",
|
||||
}
|
||||
],
|
||||
temperature=0.7, # Reduced from 1.0 to prevent character errors like '煉' and stabilize output
|
||||
temperature=0.5, # Reduced to 0.5 for maximum accuracy and consistency
|
||||
max_output_tokens=4096,
|
||||
top_p=1,
|
||||
store=True,
|
||||
|
|
@ -90,7 +90,7 @@ def get_global_news_openai(curr_date, look_back_days=7, limit=5):
|
|||
"search_context_size": "low",
|
||||
}
|
||||
],
|
||||
temperature=0.7, # Reduced from 1.0 to prevent character errors and stabilize output
|
||||
temperature=0.5, # Reduced to 0.5 for maximum accuracy and consistency
|
||||
max_output_tokens=4096,
|
||||
top_p=1,
|
||||
store=True,
|
||||
|
|
@ -137,7 +137,7 @@ def get_fundamentals_openai(ticker, curr_date):
|
|||
"search_context_size": "low",
|
||||
}
|
||||
],
|
||||
temperature=0.7, # Reduced from 1.0 to prevent character errors and stabilize output
|
||||
temperature=0.5, # Reduced to 0.5 for maximum accuracy and consistency
|
||||
max_output_tokens=4096,
|
||||
top_p=1,
|
||||
store=True,
|
||||
|
|
|
|||
Loading…
Reference in New Issue