修复了Poster content generator的生成
This commit is contained in:
parent
d684323aa6
commit
35a6bd5dfc
Binary file not shown.
@ -195,11 +195,14 @@ class ContentGenerator:
|
||||
poster_num,
|
||||
content_data_list,
|
||||
system_prompt=None,
|
||||
api_url=None,
|
||||
model_name=None,
|
||||
api_key=None,
|
||||
timeout=60,
|
||||
max_retries=3):
|
||||
"""
|
||||
生成海报内容
|
||||
|
||||
|
||||
参数:
|
||||
poster_num: 海报数量
|
||||
content_data_list: 内容数据列表(字典或字符串)
|
||||
@ -319,7 +322,7 @@ class ContentGenerator:
|
||||
full_response = ""
|
||||
try:
|
||||
# 使用AI_Agent的non-streaming方法
|
||||
self.logger.info(f"调用AI生成海报配置,模型: {model_name}")
|
||||
self.logger.info(f"调用AI生成海报配置,模型: {self.model_name}")
|
||||
full_response, tokens, time_cost = ai_agent.work(
|
||||
system_prompt,
|
||||
user_content,
|
||||
@ -570,7 +573,7 @@ class ContentGenerator:
|
||||
model_name,
|
||||
api_key,
|
||||
timeout=timeout,
|
||||
)
|
||||
)
|
||||
|
||||
# 检查生成是否失败
|
||||
if not isinstance(full_response, str) or not full_response.strip():
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user