# Lime
Lime is the MaaS proxy for anonymously access with OpenAI API.
* Compatible with multiple OpenAI API endpoints.
* Allow anonymous access for unregistered users.
* Configurable for free MaaS services and models.
## Install
Install with `pip`.
```
pip install orchard-lime
```
## Setup
Prepare a configuration file named `lime.yaml` with the following content. Change MaaS and API KEY if needed.
```
maas:
base_url: "https://api.siliconflow.cn/v1"
api_key: ""
default_model: ""
models:
- "Qwen/Qwen2-7B-Instruct"
- "Qwen/Qwen2-1.5B-Instruct"
- "Qwen/Qwen1.5-7B-Chat"
- "THUDM/glm-4-9b-chat"
- "THUDM/chatglm3-6b"
- "01-ai/Yi-1.5-9B-Chat-16K"
- "01-ai/Yi-1.5-6B-Chat"
- "google/gemma-2-9b-it"
- "internlm/internlm2_5-7b-chat"
- "meta-llama/Meta-Llama-3-8B-Instruct"
- "meta-llama/Meta-Llama-3.1-8B-Instruct"
- "mistralai/Mistral-7B-Instruct-v0.2"
```
Start with `uvicorn`.
```
uvicorn lime.main:app --reload --port 10000
```
## Usage
Use HTTP API with curl.
```
curl -X POST "http://127.0.0.1:10000/v1/chat/completions" -H "Content-Type: application/json" -d '{
"model": "Qwen/Qwen2-7B-Instruct",
"messages": [{"role": "user", "content": "Who are you?"}]
}'
```
Use [bascket](https://github.com/OrchardUniverse/basket) command.
```
basket maas use Lime
basket model use Qwen/Qwen2-7B-Instruct
basket chat "what is the meaning of life?"
```
Raw data
{
"_id": null,
"home_page": "https://github.com/OrchardUniverse/lime",
"name": "orchard-lime",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.6",
"maintainer_email": null,
"keywords": null,
"author": "Orchard Universe",
"author_email": null,
"download_url": "https://files.pythonhosted.org/packages/13/29/5389c8fb900584bed1dbd7499fe8322e2620ffe3a8d486965dc429c307d9/orchard_lime-0.1.0.tar.gz",
"platform": null,
"description": "# Lime\n\nLime is the MaaS proxy for anonymously access with OpenAI API.\n\n* Compatible with multiple OpenAI API endpoints.\n* Allow anonymous access for unregistered users.\n* Configurable for free MaaS services and models.\n\n## Install\n\nInstall with `pip`.\n\n```\npip install orchard-lime\n```\n\n## Setup\n\nPrepare a configuration file named `lime.yaml` with the following content. Change MaaS and API KEY if needed.\n\n```\nmaas:\n base_url: \"https://api.siliconflow.cn/v1\"\n api_key: \"\"\n default_model: \"\"\n models:\n - \"Qwen/Qwen2-7B-Instruct\"\n - \"Qwen/Qwen2-1.5B-Instruct\"\n - \"Qwen/Qwen1.5-7B-Chat\"\n - \"THUDM/glm-4-9b-chat\"\n - \"THUDM/chatglm3-6b\"\n - \"01-ai/Yi-1.5-9B-Chat-16K\"\n - \"01-ai/Yi-1.5-6B-Chat\"\n - \"google/gemma-2-9b-it\"\n - \"internlm/internlm2_5-7b-chat\"\n - \"meta-llama/Meta-Llama-3-8B-Instruct\"\n - \"meta-llama/Meta-Llama-3.1-8B-Instruct\"\n - \"mistralai/Mistral-7B-Instruct-v0.2\"\n```\n\nStart with `uvicorn`.\n\n```\nuvicorn lime.main:app --reload --port 10000\n```\n\n## Usage\n\nUse HTTP API with curl.\n\n```\ncurl -X POST \"http://127.0.0.1:10000/v1/chat/completions\" -H \"Content-Type: application/json\" -d '{\n \"model\": \"Qwen/Qwen2-7B-Instruct\",\n \"messages\": [{\"role\": \"user\", \"content\": \"Who are you?\"}]\n}'\n```\n\nUse [bascket](https://github.com/OrchardUniverse/basket) command.\n\n```\nbasket maas use Lime\n\nbasket model use Qwen/Qwen2-7B-Instruct\n\nbasket chat \"what is the meaning of life?\"\n```\n",
"bugtrack_url": null,
"license": null,
"summary": "Lime is the MaaS proxy for anonymously access with OpenAI API.",
"version": "0.1.0",
"project_urls": {
"Homepage": "https://github.com/OrchardUniverse/lime"
},
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "7be2e821b3fa28b6c9925af6e0c823fdb3dbca64f4a559b73a1b5913866de13a",
"md5": "cca243355243879c72c72a84250f3d49",
"sha256": "fcb2c8f3fa95d432f3c493d91119f30e37f892f1d0a20c70d2c921ff79df0311"
},
"downloads": -1,
"filename": "orchard_lime-0.1.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "cca243355243879c72c72a84250f3d49",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.6",
"size": 7807,
"upload_time": "2024-07-27T03:29:07",
"upload_time_iso_8601": "2024-07-27T03:29:07.095603Z",
"url": "https://files.pythonhosted.org/packages/7b/e2/e821b3fa28b6c9925af6e0c823fdb3dbca64f4a559b73a1b5913866de13a/orchard_lime-0.1.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "13295389c8fb900584bed1dbd7499fe8322e2620ffe3a8d486965dc429c307d9",
"md5": "85fabdec3700608c20940a2a455b8883",
"sha256": "64719ef4dae8b61b3844d178bcec31b6a65abb6a58934bc07375a28ffa016199"
},
"downloads": -1,
"filename": "orchard_lime-0.1.0.tar.gz",
"has_sig": false,
"md5_digest": "85fabdec3700608c20940a2a455b8883",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.6",
"size": 7236,
"upload_time": "2024-07-27T03:29:08",
"upload_time_iso_8601": "2024-07-27T03:29:08.775837Z",
"url": "https://files.pythonhosted.org/packages/13/29/5389c8fb900584bed1dbd7499fe8322e2620ffe3a8d486965dc429c307d9/orchard_lime-0.1.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-07-27 03:29:08",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "OrchardUniverse",
"github_project": "lime",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"requirements": [],
"lcname": "orchard-lime"
}