skyl / corpora

Corpora is a self-building corpus that can help build other arbitrary corpora
GNU Affero General Public License v3.0
2 stars 0 forks source link

Implement a Second LLM Provider to Validate Interface Abstraction #36

Open skyl opened 1 week ago

skyl commented 1 week ago

Problem:

Currently, the corpora_ai module only has an implementation for the OpenAI backend (i.e., corpora_ai_openai). Without a second provider, it's difficult to test if the corpora_ai interface is truly provider-agnostic and not too tightly coupled with OpenAI-specific implementations.

Goal:

Integrate a second Large Language Model (LLM) provider to demonstrate and validate the abstraction layer in corpora_ai. Possible alternatives include:

  1. Anthropic/Caude: These can be considered if they meet the operational requirements and are accessible.
  2. Self-Hosted Solution: Utilizing models available from Hugging Face that can be hosted locally to ensure variety in LLM providers without dependency on external APIs.

Requirements:

Benefits:

Further Considerations:

By completing this task, we will have a better-designed interface that is extensible and adaptable for multiple LLM providers, enhancing the versatility of corpora_ai. This will facilitate easier integration of new technologies as they become available, without extensive refactoring.

Avoid reliance solely on OpenAI's API to ensure a versatile infrastructure that anticipates scalability and integration across diverse platforms.