Welcome to the LLM Factory project! This open-source project aims to provide a single, unified API to work with Large Language Models (LLMs) from various providers, different models, and diverse cloud offerings.
The LLM Factory simplifies the integration and utilization of multiple LLMs, allowing developers to access various models and cloud platforms through a single API interface. This project abstracts the complexities involved in dealing with different providers and their APIs, providing a seamless experience for end-users.
- Unified API Interface: Interact with multiple LLMs using a single API.
- Multi-Provider Support: Compatible with various LLM providers such as OpenAI, Google, Microsoft, and more.
- Cloud Agnostic: Works with different cloud platforms including AWS, Azure, and GCP.
- Model Flexibility: Easily switch between different LLM models without changing your codebase.
- Extensible and Modular: Designed to be extended with new providers and models.
- Node.js 14 or higher
- API keys for the LLM providers you intend to use
-
Clone the repository:
git clone https://github.com/semanttic/llm-factory.git cd llm-factory -
Install the required dependencies:
npm install
-
Import the LLM Factory in your project:
import LLMFactory from "@semanttic/llm-factory";
-
Initialize the client
this.llmFactory = LLMFactory.createLLMs();
-
Use the API to interact with LLMs:
const resp = await llmFactory.createChatCompletion(data.provider, data); console.info(resp);
We welcome contributions to the LLM Factory project! To contribute:
- Fork the repository.
- Create a new branch (
git checkout -b feature/your-feature). - Commit your changes (
git commit -am 'Add new feature'). - Push to the branch (
git push origin feature/your-feature). - Create a new Pull Request.
Please ensure your code follows the project's coding standards and includes appropriate tests.
This project is licensed under the APACHE 2.0 License. See the LICENSE file for details.
For questions, suggestions, or feedback, please contact us at support@semanttic.com.
Thank you for using the LLM Factory - Universal LLM API! We hope this project helps you seamlessly integrate and work with multiple LLMs.