feat: add API integration for external proofreading service#28
Open
nathanredblur wants to merge 4 commits intoonderceylan:mainfrom
Open
feat: add API integration for external proofreading service#28nathanredblur wants to merge 4 commits intoonderceylan:mainfrom
nathanredblur wants to merge 4 commits intoonderceylan:mainfrom
Conversation
* Introduced API configuration options in the settings, allowing users to connect to an external AI proofreading service. * Implemented functionality to test API connection and fetch available models. * Updated storage management to handle API configuration and model source selection. * Enhanced the background service to support API-based proofreading requests. * Added UI elements for API configuration in the options page.
* Added support for Gemini and OpenAI-compatible APIs in the configuration options. * Enhanced the API configuration UI to include new options for selecting API types. * Implemented functionality to handle API-specific connection testing and model fetching. * Updated the proofreading logic to accommodate different API response formats and correction handling. * Refactored utility functions for improved code organization and reusability.
* Updated model readiness logic to check the model source before ensuring the proofreader model is ready. * Refactored the isModelReady function to include model source in its checks. * Improved consistency in handling model readiness across different modules (main, options, sidepanel).
* Added retrieval of model source from storage to update the model source cache during badge listener registration. * Modified the API request structure to include the system prompt in the user message for improved context during proofreading.
Open
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
(just claudeAPI protocol compatible for now)
Inspired on how Grammit extension works.