修改了部分调用
This commit is contained in:
parent
e3d466353d
commit
8b6d68b2b0
Binary file not shown.
@ -259,7 +259,17 @@ def prepare_topic_generation(
|
|||||||
# 创建AI Agent (still create agent here for the topic generation phase)
|
# 创建AI Agent (still create agent here for the topic generation phase)
|
||||||
try:
|
try:
|
||||||
print("Initializing AI Agent for topic generation...")
|
print("Initializing AI Agent for topic generation...")
|
||||||
ai_agent = AI_Agent(config["api_url"], config["model"], config["api_key"])
|
# --- Read timeout/retry from config ---
|
||||||
|
request_timeout = config.get("request_timeout", 30) # Default 30 seconds
|
||||||
|
max_retries = config.get("max_retries", 3) # Default 3 retries
|
||||||
|
# --- Pass values to AI_Agent ---
|
||||||
|
ai_agent = AI_Agent(
|
||||||
|
config["api_url"],
|
||||||
|
config["model"],
|
||||||
|
config["api_key"],
|
||||||
|
timeout=request_timeout,
|
||||||
|
max_retries=max_retries
|
||||||
|
)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
print(f"Error initializing AI Agent for topic generation: {e}")
|
print(f"Error initializing AI Agent for topic generation: {e}")
|
||||||
traceback.print_exc()
|
traceback.print_exc()
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user