Skip to content

Commit

Permalink
Merge pull request #30 from bruceunx/fix/workflow
Browse files Browse the repository at this point in the history
Fix/workflow
  • Loading branch information
bruceunx authored Jan 4, 2025
2 parents abe3f3a + 09e81ff commit 8910728
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ pnpm tauri dev

## TODO

- [ ] save selected lang in db for better ux
- [x] add workflow to github
- [x] add Timeline to prompt for better Summarization
- [x] develop youtube parser to replace yt-dlp
Expand Down
3 changes: 2 additions & 1 deletion lefthook.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ pre-commit:
cargo-check:
glob: "*.rs"
run: cargo check --all-targets --all-features
# cargo-test:
cargo-test:
run: cargo test -p videomaestro
# glob: "*.rs"
# run: cargo test --all-features
# cargo-deny:
Expand Down
5 changes: 3 additions & 2 deletions src-tauri/src/whisper.rs
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ pub struct Segment {
//
//
//

fn get_system_prompt(language: &str) -> String {
let prompt = match language {
"zh" => {
Expand All @@ -122,7 +123,7 @@ fn get_system_prompt(language: &str) -> String {
指导原则:
- 根据主题或内容的变化将字幕分组为章节。
- 使用文本中的逻辑过渡点识别新章节的开始位置。
- 总结应为3-5句话,概括关键内容, 不要分段, 不要重复。
- 总结应为3-5句话,概括关键内容, 不要分段, 不要重复, 不要以`总结:`,`展开:`之类多余的文字开头
- 可以适当使用emoji.
并对根据各章节内容判断是否需要展开介绍,展开介绍在总结结束后。
指导原则:
Expand Down Expand Up @@ -293,7 +294,7 @@ fn get_system_prompt(language: &str) -> String {
Guiding principles:
- Group subtitles into chapters based on changes in topic or content.
- Use logical transition points in the text to identify the start of new chapters.
- Summaries should be 3-5 sentences, summarizing the key content.
- Summaries should be 3-5 sentences, summarizing the key content, do not repeat or start with redundant words like `summary:`, `detailed:` etc.
- Use emojis where appropriate.
Based on each chapter's content, determine if a more detailed explanation is needed.
Guiding principles:
Expand Down

0 comments on commit 8910728

Please sign in to comment.