Skip to content

📚 [Feature]: Proposal for Configurable Backend Integration #213

Open
@sebastienfi

Description

@sebastienfi

Description

Hello wonderful OpenCommit family! 🌈 Before diving in, I must express my admiration for the code owners and contributors of OpenCommit. You folks rock! 🎸 Now, I have another proposal aimed at amplifying OpenCommit's flexibility and interoperability. 📈

OpenCommit is currently restricted to using OpenAI as the backend. Allowing configuration for alternative backends would greatly increase the project's scope and applicability. 🌐

#150

Suggested Solution

Implement a configuration mechanism that allows users to connect to any backend.

  1. Define a configuration schema with fields like backend_url, api_key, and request_format.
  2. Store this configuration in a file (e.g., backend-config.json) in ~/.opencommit/.
  3. Read the configuration at startup to determine the backend.
  4. Create an abstract BackendInterface in TypeScript for backend integrations.
  5. Develop specific backend classes that implement this interface.
  6. Use dependency injection to use the correct backend based on the configuration (?).

Alternatives

  • Hardcoding multiple backend options, but this lacks scalability.
  • Providing only a few select backends as options, but this limits the choice for users. (Self-hosted LLMs...)

Additional Context

This proposal opens up OpenCommit to a wider audience by supporting a variety of backend services. Users can connect to the backend that best fits their needs or preferences.

💡 I am excited to know what you think! Your feedback and ideas are invaluable. 💌

Thank you, OpenCommit family! 🎉

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions