{"id":15175477,"url":"https://github.com/bigsk1/llm-adapter","last_synced_at":"2026-03-08T15:37:22.943Z","repository":{"id":246149168,"uuid":"820242031","full_name":"bigsk1/llm-adapter","owner":"bigsk1","description":"UniversalLLMAdapter class initializes the appropriate client based on the specified provider.","archived":false,"fork":false,"pushed_at":"2024-06-26T05:11:01.000Z","size":6,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-01-16T09:27:09.829Z","etag":null,"topics":["ai21","alpha-model","amazon-bedrock","anthropic","azure","claude","cohere","gemini","huggingface-models","ollama","openai","replicate"],"latest_commit_sha":null,"homepage":"https://bigsk1.com","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bigsk1.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-06-26T05:01:08.000Z","updated_at":"2024-12-20T17:45:40.000Z","dependencies_parsed_at":"2024-06-26T06:28:26.526Z","dependency_job_id":"f56eb7f5-b20e-4468-8912-ac9e6ec5aec3","html_url":"https://github.com/bigsk1/llm-adapter","commit_stats":null,"previous_names":["bigsk1/llm-adapter"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bigsk1%2Fllm-adapter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bigsk1%2Fllm-adapter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bigsk1%2Fllm-adapter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bigsk1%2Fllm-adapter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bigsk1","download_url":"https://codeload.github.com/bigsk1/llm-adapter/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":234863996,"owners_count":18898608,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ai21","alpha-model","amazon-bedrock","anthropic","azure","claude","cohere","gemini","huggingface-models","ollama","openai","replicate"],"created_at":"2024-09-27T12:39:15.007Z","updated_at":"2025-10-06T10:31:33.960Z","avatar_url":"https://github.com/bigsk1.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Universal LLM Adapter\n\n## Overview\n\nThe Universal LLM Adapter is a Python-based tool that provides a unified interface for interacting with various Large Language Models (LLMs) from different providers. It simplifies the process of using multiple LLM APIs by abstracting away the differences in their implementations and offering a consistent way to send requests and receive responses.\n\n\n![llm-adapter](https://imagedelivery.net/WfhVb8dSNAAvdXUdMfBuPQ/695bc126-614d-4571-908d-5a5173127100/public)\n\n\n## Features\n\n- Support for multiple LLM providers:\n  - NVIDIA\n  - OpenAI\n  - Anthropic\n  - Google\n  - Ollama (local models)\n  - Cohere\n  - AI21 Labs\n  - Hugging Face\n  - Aleph Alpha\n  - Replicate\n  - Azure OpenAI\n  - Amazon Bedrock\n- Streaming support for real-time responses\n- Easy configuration through environment variables\n- Flexible model selection\n- Unified chat interface for all providers\n\n## Prerequisites\n\n- Python 3.10 or higher\n- pip (Python package installer)\n\n## Installation\n\n1. Clone the repository:\n   ```\n   git clone https://github.com/bigsk1/universal-llm-adapter.git\n   cd universal-llm-adapter\n   ```\n\n2. Create a virtual environment (optional but recommended):\n   ```\n   python -m venv venv\n   source venv/bin/activate  # On Windows, use `venv\\Scripts\\activate`\n   ```\n\n3. Install the required dependencies:\n   ```\n   pip install -r requirements.txt\n   ```\n\n## Configuration\n\n1. Copy the `.env.sample` file to `.env`:\n   ```\n   cp .env.sample .env\n   ```\n\n2. Edit the `.env` file and set your desired configuration:\n   - Set the `MODEL_NAME` to the specific model you want to use\n   - Set the `PROVIDER` to the corresponding LLM provider\n   - Add your API keys for the providers you plan to use\n   - Adjust other parameters like `TEMPERATURE`, `TOP_P`, and `MAX_TOKENS` as needed\n\n## Usage\n\nTo start the chat interface:\n\n```\npython chat_interface.py\n```\n\nThis will initialize the Universal LLM Adapter with the configured provider and model, and start an interactive chat session in your terminal.\n\n## Adding New Providers\n\nTo add support for a new LLM provider:\n\n1. Update the `UniversalLLMAdapter` class in `llm_adapter.py`:\n   - Add a new condition in the `_initialize_client` method to initialize the client for the new provider\n   - Implement the request sending logic in the `send_request` method\n\n2. Add any necessary API keys or configuration options to the `.env` file\n\n3. Update the `requirements.txt` file if the new provider requires additional dependencies\n\n## Contributing\n\nContributions to the Universal LLM Adapter are welcome! Please feel free to submit pull requests, create issues, or suggest new features.\n\n## License\n\nThis project is licensed under the MIT License\n\n## Acknowledgments\n\n- Thanks to all the LLM providers for their APIs and documentation\n- Special thanks to the open-source community for the various libraries used in this project\n\n## Disclaimer\n\nThis tool is for educational and research purposes. Ensure you comply with the terms of service of each LLM provider when using their APIs.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbigsk1%2Fllm-adapter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbigsk1%2Fllm-adapter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbigsk1%2Fllm-adapter/lists"}