New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
小说推文AgentExample #935
base: main
Are you sure you want to change the base?
The head ref may contain hidden characters: "\u5C0F\u8BF4\u63A8\u6587by\u5B8F\u4F1F"
小说推文AgentExample #935
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## main #935 +/- ##
=======================================
Coverage 81.19% 81.19%
=======================================
Files 226 226
Lines 12477 12477
=======================================
Hits 10131 10131
Misses 2346 2346 ☔ View full report in Codecov by Sentry. |
self.title = title | ||
self.content = content | ||
|
||
def GetNovelById(nid): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
函数命名需要改成snake case命名,比如get_novel_by_id
,单词之间用下划线 _ 分隔,并且所有字母都是小写的
|
||
def GetNovelById(nid): | ||
# return Novel.query.get(nid) #此处可以对接到数据库 | ||
print('nid:', nid) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
日志用metagpt.logs的logger来打印。
from metagpt.logs import logger
logger.debug("xxx")
logger.info("xxx")
logger.warning("xxx")
return resp | ||
|
||
|
||
async def main(): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
用单元测试代替这个main()
|
||
|
||
# SD_t2i SD文生图 | ||
class SD_t2i(Action): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
类名用驼峰方式
print('segment resp:', resp) | ||
# 更新总分镜个数 | ||
self.total_storyboard.append(len(resp)) | ||
print('length', self.total_storyboard[self.current_chapter_number]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
print换成logger.debug/info
@@ -0,0 +1,33 @@ | |||
# -*- coding: utf-8 -*- |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
文件名采用snake case方式: file_tools.py
Features
小说转视频Agent工作步骤
1、获取小说(示例中直接贴小说到代码里,可外接数据库Or从文档获取)
2、改写
3、分段/分镜
4、生成SD提示词
5、TTS语言合成
6、SD文生图
7、合成视频
Feature Docs
Influence
Result
Other