tshift-llm


Nametshift-llm JSON
Version 0.2.2 PyPI version JSON
download
home_pageNone
SummaryA flexible LLM manager that shifts between multiple models
upload_time2024-08-13 21:04:10
maintainerNone
docs_urlNone
authorNone
requires_python>=3.10
license# LICENSE MIT License Copyright (c) [year] [fullname] Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
keywords llm ai nlp language model
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # ThinkShift_LLM
ThinkShift_LLM is a flexible LLM manager that shifts between multiple language models to ensure robust and uninterrupted AI-powered conversations.

## Features

- Manages multiple LiteLLM clients
- Shifts between models when errors occur
- Supports both streaming and non-streaming completions
- Detailed logging of all interactions
- Round-robin client selection

## Installation

You can install tShift_LLM using pip:

```
pip install tshift-llm
```

## Usage

Here's a quick example of how to use tShift_LLM:

```python
from tshift_llm import tShift_LLM, LiteLLMClient

clients = [
    LiteLLMClient("gpt-3.5-turbo", "your-openai-key"),
    LiteLLMClient("claude-2", "your-anthropic-key"),
    LiteLLMClient("command-nightly", "your-cohere-key")
]

tshift_llm = tShift_LLM(clients)

response = tshift_llm.completion(
    messages=[{"role": "user", "content": "Hello, how are you?"}]
)
print(response.choices[0].message.content)
```

For more detailed usage instructions, please refer to the documentation.

## License

This project is licensed under the MIT License - see the LICENSE file for details.

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "tshift-llm",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.10",
    "maintainer_email": null,
    "keywords": "llm, ai, nlp, language model",
    "author": null,
    "author_email": "Ryan Saleh <hello@ryansaleh.com>",
    "download_url": "https://files.pythonhosted.org/packages/92/7f/1694bd4c17716228c98bad2ac88607d82c7a7ed7137132ba769ceb6c3e80/tshift_llm-0.2.2.tar.gz",
    "platform": null,
    "description": "# ThinkShift_LLM\nThinkShift_LLM is a flexible LLM manager that shifts between multiple language models to ensure robust and uninterrupted AI-powered conversations.\n\n## Features\n\n- Manages multiple LiteLLM clients\n- Shifts between models when errors occur\n- Supports both streaming and non-streaming completions\n- Detailed logging of all interactions\n- Round-robin client selection\n\n## Installation\n\nYou can install tShift_LLM using pip:\n\n```\npip install tshift-llm\n```\n\n## Usage\n\nHere's a quick example of how to use tShift_LLM:\n\n```python\nfrom tshift_llm import tShift_LLM, LiteLLMClient\n\nclients = [\n    LiteLLMClient(\"gpt-3.5-turbo\", \"your-openai-key\"),\n    LiteLLMClient(\"claude-2\", \"your-anthropic-key\"),\n    LiteLLMClient(\"command-nightly\", \"your-cohere-key\")\n]\n\ntshift_llm = tShift_LLM(clients)\n\nresponse = tshift_llm.completion(\n    messages=[{\"role\": \"user\", \"content\": \"Hello, how are you?\"}]\n)\nprint(response.choices[0].message.content)\n```\n\nFor more detailed usage instructions, please refer to the documentation.\n\n## License\n\nThis project is licensed under the MIT License - see the LICENSE file for details.\n",
    "bugtrack_url": null,
    "license": "# LICENSE MIT License  Copyright (c) [year] [fullname]  Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:  The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ",
    "summary": "A flexible LLM manager that shifts between multiple models",
    "version": "0.2.2",
    "project_urls": {
        "Homepage": "https://github.com/MohdSaleh/tshift-llm"
    },
    "split_keywords": [
        "llm",
        " ai",
        " nlp",
        " language model"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "da17d6b97a53f567fb55ed622c8db9ad09ce96938a6680929c1839684aa1ed08",
                "md5": "edacbda523c03d7e50a17345651fe542",
                "sha256": "05e0121d255fbf5b8217dae69848aec86fc8aba1c37f32b0f3d27c4cf156302c"
            },
            "downloads": -1,
            "filename": "tshift_llm-0.2.2-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "edacbda523c03d7e50a17345651fe542",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.10",
            "size": 4680,
            "upload_time": "2024-08-13T21:04:08",
            "upload_time_iso_8601": "2024-08-13T21:04:08.801886Z",
            "url": "https://files.pythonhosted.org/packages/da/17/d6b97a53f567fb55ed622c8db9ad09ce96938a6680929c1839684aa1ed08/tshift_llm-0.2.2-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "927f1694bd4c17716228c98bad2ac88607d82c7a7ed7137132ba769ceb6c3e80",
                "md5": "bd61f6b6a6640f893f400c96ba0c71d1",
                "sha256": "c95ac657631336dd5c990ba0844a7bdcf6e75f0e6ff60aa964f2f756c58bcd64"
            },
            "downloads": -1,
            "filename": "tshift_llm-0.2.2.tar.gz",
            "has_sig": false,
            "md5_digest": "bd61f6b6a6640f893f400c96ba0c71d1",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.10",
            "size": 4339,
            "upload_time": "2024-08-13T21:04:10",
            "upload_time_iso_8601": "2024-08-13T21:04:10.141329Z",
            "url": "https://files.pythonhosted.org/packages/92/7f/1694bd4c17716228c98bad2ac88607d82c7a7ed7137132ba769ceb6c3e80/tshift_llm-0.2.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-08-13 21:04:10",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "MohdSaleh",
    "github_project": "tshift-llm",
    "github_not_found": true,
    "lcname": "tshift-llm"
}
        
Elapsed time: 0.74172s