diff --git a/utils/__pycache__/content_generator.cpython-312.pyc b/utils/__pycache__/content_generator.cpython-312.pyc index 255275b..216907b 100644 Binary files a/utils/__pycache__/content_generator.cpython-312.pyc and b/utils/__pycache__/content_generator.cpython-312.pyc differ diff --git a/utils/content_generator.py b/utils/content_generator.py index 9a2d0ed..2941166 100644 --- a/utils/content_generator.py +++ b/utils/content_generator.py @@ -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():