ChatALL icon indicating copy to clipboard operation
ChatALL copied to clipboard

Add GitHub Models API bots

Open eddieai opened this issue 10 months ago • 1 comments

Add Github Models API of some LLM, which are free to use with rate limit. More about Github Models

This pull request includes the Github Models API of following LLM:

  • GPT-4o
  • GPT-4o Mini
  • Llama3-18b
  • Llama3-70b
  • Llama3-405b
  • Mistral Large
  • Mistral Nemo

Summary by CodeRabbit

  • New Features

    • Introduced GitHub Models API integration with a range of bot options, offering advanced model selections.
    • Added a dedicated settings interface to configure GitHub API parameters including API key, response temperature, and interaction history.
    • Enhanced localization support with expanded language entries for both GitHub and DeepSeek APIs.
  • Chores

    • Updated system state management to support GitHub API configurations seamlessly.

eddieai avatar Feb 16 '25 10:02 eddieai

Walkthrough

The changes add a series of new GitHub API bot classes that extend a common base bot. Each bot class is configured with specific model identifiers, logos, and settings. A new Vue component for GitHub API bot settings is introduced, integrating with a shared settings component and triggering model setup updates. Updates also include modifications to the main bot registry, expansion of localization files for multiple languages, and Vuex store enhancements to manage GitHub API settings.

Changes

File(s) Change Summary
src/bots/github/GitHubAPIBot.js, GitHubAPIGPT4oBot.js, GitHubAPIGPT4oMiniBot.js, GitHubAPILlama31405bBot.js, GitHubAPILlama3170bBot.js, GitHubAPILlama318bBot.js, GitHubAPIMistralLargeBot.js, GitHubAPIMistralNemoBot.js New GitHub API bot classes added, each extending a base bot, defining static properties and methods for model configuration and past rounds retrieval.
src/bots/index.js Added imports and registrations for the new GitHub API bots into the bot registry and categorized arrays.
src/components/BotSettings/GitHubAPIBotSettings.vue New Vue component for managing GitHub API bot settings using the CommonBotSettings component; includes data properties and a watcher method to trigger model setup.
src/components/SettingsModal.vue Imported the GitHubAPIBotSettings component and updated the bot settings array to support the GitHub API bot.
src/i18n/locales/*.{de,en,es,fr,it,ja,ko,ru,vi,zh,zhtw}.json Added new localization sections for gitHubApi (and deepSeekApi in some files) with key-value pairs for model names and API identifiers.
src/store/index.js Added a new gitHubApi state with properties (apiKey, temperature, pastRounds) and a mutation (setGitHubApi) for managing GitHub API configurations.

Sequence Diagram(s)

sequenceDiagram
  participant User
  participant SettingsModal
  participant GitHubAPIBotSettings
  participant GitHubAPIBot
  participant Store
  participant ChatOpenAI

  User->>SettingsModal: Select GitHub API settings tab
  SettingsModal->>GitHubAPIBotSettings: Render GitHub API settings component
  User->>GitHubAPIBotSettings: Update API key, temperature, pastRounds
  GitHubAPIBotSettings->>Store: Commit changes via setGitHubApi mutation
  Store-->>GitHubAPIBotSettings: Return updated state
  GitHubAPIBotSettings->>GitHubAPIBot: Invoke watcher to setup model
  GitHubAPIBot->>ChatOpenAI: Initialize ChatOpenAI instance with config
  ChatOpenAI-->>GitHubAPIBot: Return configured chat model

Suggested reviewers

  • PeterDaveHello
  • sunner

Poem

I'm a coding bunny hopping with glee,
New bots and settings sprout from my spree.
GitHub API hops into the mix,
With keys, models, and clever tricks.
In code and rhyme, I bounce with delight –
A fluffy coder by day and night!
🐇✨

✨ Finishing Touches
  • [ ] 📝 Generate Docstrings (Beta)

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 generate docstrings to generate docstrings for this PR. (Beta)
  • @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.

coderabbitai[bot] avatar Feb 16 '25 10:02 coderabbitai[bot]