Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
代码变更
fucker.py
ExamCtx
类:用于完成 AI 课程的课后测试Openai
类:用于使用 AI 生成答案PptToTxt
类:用于将 PPT 的文字提取出来,为 AI 提供参考。提取文本的api使用月之暗面提供的免费api,参考文档:https://platform.moonshot.cn/docs/api/fileszd_utils.py
AI_KEY
配置变更
添加了 AI 相关配置项:
配置说明:
enabled
: 是否使用 AI 生成答案,否则使用随机答案use_zhidao_ai
: 是否使用知道的 AI 对话生成答案,否则使用 OpenAIppt_processing
: 控制将 PPT 提供给 AI 的行为use_stream
: AI 回答是否使用流式回答,可提高获取答案的速度命令行参数
在
main.py
中添加了新的启动参数: