Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Add Support for Local Whisper Models and Integrate llmR for Summarization #23

Merged
merged 9 commits into from
Oct 11, 2024

Conversation

bakaburg1
Copy link
Owner

@bakaburg1 bakaburg1 commented Oct 11, 2024

Enhancements

  • Support for Local Whisper Models: Added functions use_whisper_local_stt and use_mlx_whisper_local_stt to support local Whisper models via Python with reticulate, with the second being optimized for Mac OS with Apple Silicon (Commit: 69e4f5e).
  • Integration with llmR: Refactored the code to rely on the llmR package for LLM interactions, removing redundant LLM-related functions (Commit: 2331b46).
  • Enhanced Speech-to-Text Workflow: Updated perform_speech_to_text to use whisper_local as the default model and enhanced speech_to_summary_workflow to display the selected speech-to-text model (Commit: 69e4f5e).

Fixes

  • Dependency Management: Replaced custom dependency check function with rlang::check_installed for better package management (Commit: 3227b0d).

Documentation

  • Updated README: Revised README to describe the use of llmR for summarization and the addition of new local models for speech-to-text (Commit: 8bff883).

Summary

This pull request introduces significant enhancements to the minutemaker package by adding support for local Whisper models, integrating the llmR package for LLM interactions, and improving the speech-to-text workflow. Additionally, it fixes dependency management issues and updates the documentation to reflect these changes.


In the realm of code so bright,
Local models take their flight.
With llmR we now align,
Summaries are more divine.
Dependencies fixed with care,
Documentation now laid bare.

Summary by CodeRabbit

  • New Features

    • Introduced support for local Whisper models with new functions: use_whisper_local_stt and use_mlx_whisper_local_stt.
    • Enhanced speech-to-text capabilities with default model options.
    • Added streamlined workflow function: speech_to_summary_workflow.
  • Bug Fixes

    • Improved error handling and logging for API calls and file checks.
  • Documentation

    • Updated README and documentation files to clarify usage and setup for new features and dependencies, particularly with the llmR package.
  • Chores

    • Incremented package version to 0.12.0 and updated metadata.

Removed the llm related functions since they will be provided by the llmR package
- Added `use_whisper_local_stt` function to support local Whisper models via Python with reticulate.
- Added `use_mlx_whisper_local_stt` function for MLX Whisper models, optimized for Mac OS with Apple Silicon.
- Updated `perform_speech_to_text` to use `whisper_local` as the default model.
- Enhanced `speech_to_summary_workflow` to display the selected speech-to-text model.
- Updated documentation and NAMESPACE to export the new functions.
- Added `reticulate` to the Suggests field in DESCRIPTION for Python integration.
Update README to describe the use of llmR for summarisation and the addition of the new local models for stt.
Copy link
Contributor

coderabbitai bot commented Oct 11, 2024

Caution

Review failed

The pull request is closed.

Walkthrough

The changes in the pull request involve updates to the minutemaker package's metadata, including an increment in the version number from 0.10.0 to 0.12.0, and the addition of a new dependency on the llmR package. The NAMESPACE file has been modified to export two new functions while removing one. Additionally, various functions have been updated or added across multiple R scripts to enhance functionality, particularly for local speech-to-text models and LLM integrations. Documentation has also been updated to reflect these changes.

Changes

File/Path Change Summary
DESCRIPTION Version updated to 0.12.0, added llmR (>= 1.1.0) to Imports, added remote for llmR, updated RoxygenNote, added reticulate (>= 1.38.0) to Suggests.
NAMESPACE Added use_mlx_whisper_local_stt and use_whisper_local_stt, removed prompt_llm.
NEWS.md Documented version 0.12.0 updates, including new functions and dependency management improvements.
R/LLM_calls.R Deleted file containing functions for LLM interactions.
R/NLP_operations.R Updated dependency checks to use rlang::check_installed.
R/data_management.R Updated llm_provider option, improved logging, error handling, and summarization logic in speech_to_summary_workflow.
R/speech_to_text.R Updated function signatures and added use_whisper_local_stt and use_mlx_whisper_local_stt.
R/summarization.R Updated documentation and function signatures to use llmR::prompt_llm.
R/utils.R Removed check_and_install_dependencies function.
README.Rmd Enhanced documentation for API setup, examples, workflow, and summarization methods.
README.md Updated installation and usage instructions, clarified API configuration, and added examples.
man/*.Rd Various updates to documentation for functions, including changes in parameters and removal of obsolete documentation.

Poem

In the garden where the code does play,
New functions hop and dance today.
With whispers local and models bright,
The minutemaker shines with delight!
Dependencies checked, all errors tamed,
A joyful update, the rabbit proclaimed! 🐇✨


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@bakaburg1 bakaburg1 merged commit d44d409 into main Oct 11, 2024
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant