Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Redesigned architecture to support multiple LLM services in Co-op Translator #63

Merged
merged 10 commits into from
Dec 20, 2024

Conversation

skytin1004
Copy link
Collaborator

@skytin1004 skytin1004 commented Dec 19, 2024

This redesign allows for easier integration of new language and vision models while maintaining clean separation of concerns.

Solved #56

Purpose

This redesign aims to make the codebase more extensible and maintainable by:

  • Creating a flexible architecture that supports multiple LLM and Vision providers
  • Separating provider-specific implementations from core business logic
  • Establishing interfaces for adding new language and vision models
  • Organizing utilities and configurations in a more logical structure

Description

Major changes include:

  1. Configuration System Restructuring

    • Moved provider-specific configs to dedicated modules
    • Created abstract base classes for configuration management
    • Implemented provider discovery and initialization logic
  2. Service Layer Reorganization

    • Separated LLM and Vision services into provider-specific modules
    • Created abstract base classes for each service type
  3. Utility Reorganization

    • Moved common utilities to utils/common
    • Grouped LLM-specific utilities under utils/llm
    • Grouped Vision-specific utilities under utils/vision

Related Issue

N/A - Architecture improvement initiative

Does this introduce a breaking change?

  • Yes
  • No

Type of change

  • Bugfix
  • Feature
  • Code style update (e.g., formatting, local variables)
  • Refactoring (no functional or API changes)
  • Documentation content changes
  • Other

Checklist

Before submitting your pull request, please confirm the following:

  • I have thoroughly tested my changes: All core functionality remains intact with the new architecture
  • All existing tests pass: Verified that existing tests work with the new structure
  • I have followed the Co-op Translators coding conventions: Maintained consistent naming and structure
  • I have documented my changes: Updated import paths and added inline documentation where necessary

Additional context

This refactoring sets the foundation for:

  • Easy integration of new LLM providers (e.g., Anthropic, Google)
  • Easy integration of new vision services (e.g., Google Cloud Vision)
  • Better separation of concerns for future maintenance
  • Clearer extension points for contributors

Functional testing complete. OpenAI model confirmed to work correctly. Test code will be added later.

…gration

- Restructure configuration system for modular provider management
- Separate provider-specific implementations into dedicated modules
- Implement abstract base classes for LLM and Vision services
- Move common utilities to appropriate subdirectories
- Update import paths to reflect new architecture

This redesign allows for easier integration of new language and vision
models while maintaining clean separation of concerns.
@skytin1004 skytin1004 added the enhancement New feature or request label Dec 19, 2024
@skytin1004 skytin1004 self-assigned this Dec 19, 2024
@github-actions github-actions bot added translator Related to any changes in the translation-related source files tests labels Dec 19, 2024
@skytin1004 skytin1004 linked an issue Dec 19, 2024 that may be closed by this pull request
2 tasks
@skytin1004 skytin1004 changed the title Redesign architecture for flexible LLM/Vision providers Redesign architecture for support for multiple LLM services in Co-op Translator Dec 19, 2024
@skytin1004 skytin1004 changed the title Redesign architecture for support for multiple LLM services in Co-op Translator Redesigned architecture to support multiple LLM services in Co-op Translator Dec 19, 2024
@skytin1004 skytin1004 marked this pull request as draft December 19, 2024 10:49
@skytin1004 skytin1004 marked this pull request as ready for review December 19, 2024 15:11
@github-actions github-actions bot added the documentation Improvements or additions to documentation label Dec 19, 2024
@github-actions github-actions bot added the build Related to the build process, dependency management, and CI/CD configurations label Dec 20, 2024
@skytin1004
Copy link
Collaborator Author

I have reviewed the changes and everything looks good.

@skytin1004 skytin1004 merged commit 93d3bc2 into Azure:main Dec 20, 2024
2 checks passed
@skytin1004 skytin1004 deleted the support-llm2 branch December 20, 2024 01:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build Related to the build process, dependency management, and CI/CD configurations documentation Improvements or additions to documentation enhancement New feature or request tests translator Related to any changes in the translation-related source files
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support for multiple LLM services in Co-op Translator
1 participant