# lollms_client
[![Python Version](https://img.shields.io/pypi/pyversions/lollms-client)](https://pypi.org/project/lollms-client/) [![PyPI Downloads](https://img.shields.io/pypi/dw/lollms-client)](https://pypi.org/project/lollms-client/) [![Apache License](https://img.shields.io/apachie/2.0)](https://www.apache.org/licenses/LICENSE-2.0)
Welcome to the lollms_client repository! This library is built by [ParisNeo](https://github.com/ParisNeo) and provides a convenient way to interact with the lollms (Lord Of Large Language Models) API. It is available on [PyPI](https://pypi.org/project/lollms-client/) and distributed under the Apache 2.0 License.
## Installation
To install the library from PyPI using `pip`, run:
```
pip install lollms-client
```
## Usage
To use the lollms_client, first import the necessary classes:
```python
from lollms_client import LollmsClient
# Initialize the LollmsClient instance
lc = LollmsClient("http://localhost:9600")
```
### Text Generation
Use `generate_text()` for generating text from the lollms API.
```python
response = lc.generate_text(prompt="Once upon a time", stream=False, temperature=0.5)
print(response)
```
### Completion
Use `generate_completion()` for getting a completion of the prompt from the lollms API.
```python
response = lc.generate_completion(prompt="What is the capital of France", stream=False, temperature=0.5)
print(response)
```
### List Mounted Personalities
List mounted personalities of the lollms API with the `listMountedPersonalities()` method.
```python
response = lc.listMountedPersonalities()
print(response)
```
### List Models
List available models of the lollms API with the `listModels()` method.
```python
response = lc.listModels()
print(response)
```
## Complete Example
```python
from lollms_client import LollmsClient
# Initialize the LollmsClient instance
lc = LollmsClient("http://localhost:9600")
# Generate Text
response = lc.generate_text(prompt="Once upon a time", stream=False, temperature=0.5)
print(response)
# Generate Completion
response = lc.generate_completion(prompt="What is the capital of France", stream=False, temperature=0.5)
print(response)
# List Mounted Personalities
response = lc.listMountedPersonalities()
print(response)
# List Models
response = lc.listModels()
print(response)
```
Feel free to contribute to the project by submitting issues or pull requests. Follow [ParisNeo](https://github.com/ParisNeo) on [GitHub](https://github.com/ParisNeo), [Twitter](https://twitter.com/ParisNeo_AI), [Discord](https://discord.gg/BDxacQmv), [Sub-Reddit](r/lollms), and [Instagram](https://www.instagram.com/spacenerduino/) for updates and news.
Happy coding!
Raw data
{
"_id": null,
"home_page": "https://github.com/ParisNeo/lollms_client",
"name": "lollms-client",
"maintainer": null,
"docs_url": null,
"requires_python": null,
"maintainer_email": null,
"keywords": null,
"author": "ParisNeo",
"author_email": "parisneoai@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/ff/86/25da6ca3d425905f9d3c4b014265e32cd1dbc586bd16cbbe05ab8303b10d/lollms_client-0.7.7.tar.gz",
"platform": null,
"description": "# lollms_client\r\n\r\n[![Python Version](https://img.shields.io/pypi/pyversions/lollms-client)](https://pypi.org/project/lollms-client/) [![PyPI Downloads](https://img.shields.io/pypi/dw/lollms-client)](https://pypi.org/project/lollms-client/) [![Apache License](https://img.shields.io/apachie/2.0)](https://www.apache.org/licenses/LICENSE-2.0)\r\n\r\nWelcome to the lollms_client repository! This library is built by [ParisNeo](https://github.com/ParisNeo) and provides a convenient way to interact with the lollms (Lord Of Large Language Models) API. It is available on [PyPI](https://pypi.org/project/lollms-client/) and distributed under the Apache 2.0 License.\r\n\r\n## Installation\r\n\r\nTo install the library from PyPI using `pip`, run:\r\n\r\n```\r\npip install lollms-client\r\n``` \r\n\r\n## Usage\r\n\r\nTo use the lollms_client, first import the necessary classes:\r\n\r\n```python\r\nfrom lollms_client import LollmsClient\r\n\r\n# Initialize the LollmsClient instance\r\nlc = LollmsClient(\"http://localhost:9600\")\r\n```\r\n\r\n### Text Generation\r\n\r\nUse `generate_text()` for generating text from the lollms API.\r\n\r\n```python\r\nresponse = lc.generate_text(prompt=\"Once upon a time\", stream=False, temperature=0.5)\r\nprint(response)\r\n```\r\n\r\n### Completion\r\n\r\nUse `generate_completion()` for getting a completion of the prompt from the lollms API.\r\n\r\n```python\r\nresponse = lc.generate_completion(prompt=\"What is the capital of France\", stream=False, temperature=0.5)\r\nprint(response)\r\n```\r\n\r\n### List Mounted Personalities\r\n\r\nList mounted personalities of the lollms API with the `listMountedPersonalities()` method.\r\n\r\n```python\r\nresponse = lc.listMountedPersonalities()\r\nprint(response)\r\n```\r\n\r\n### List Models\r\n\r\nList available models of the lollms API with the `listModels()` method.\r\n\r\n```python\r\nresponse = lc.listModels()\r\nprint(response)\r\n```\r\n\r\n## Complete Example\r\n\r\n```python\r\nfrom lollms_client import LollmsClient\r\n\r\n# Initialize the LollmsClient instance\r\nlc = LollmsClient(\"http://localhost:9600\")\r\n\r\n# Generate Text\r\nresponse = lc.generate_text(prompt=\"Once upon a time\", stream=False, temperature=0.5)\r\nprint(response)\r\n\r\n# Generate Completion\r\nresponse = lc.generate_completion(prompt=\"What is the capital of France\", stream=False, temperature=0.5)\r\nprint(response)\r\n\r\n# List Mounted Personalities\r\nresponse = lc.listMountedPersonalities()\r\nprint(response)\r\n\r\n# List Models\r\nresponse = lc.listModels()\r\nprint(response)\r\n```\r\n\r\nFeel free to contribute to the project by submitting issues or pull requests. Follow [ParisNeo](https://github.com/ParisNeo) on [GitHub](https://github.com/ParisNeo), [Twitter](https://twitter.com/ParisNeo_AI), [Discord](https://discord.gg/BDxacQmv), [Sub-Reddit](r/lollms), and [Instagram](https://www.instagram.com/spacenerduino/) for updates and news.\r\n\r\nHappy coding!\r\n",
"bugtrack_url": null,
"license": null,
"summary": "A client library for LoLLMs generate endpoint",
"version": "0.7.7",
"project_urls": {
"Homepage": "https://github.com/ParisNeo/lollms_client"
},
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "ff09565ab317d41029262ee59b84839388858c7277c152e2f9bc7225b3fe6eb5",
"md5": "77669ca086cfddc06df56784d25e3b3b",
"sha256": "b990c04d60b02a48b4968b0373ad8f7729d1ee84b607dd9b1fa4b731ddd92cf2"
},
"downloads": -1,
"filename": "lollms_client-0.7.7-py3-none-any.whl",
"has_sig": false,
"md5_digest": "77669ca086cfddc06df56784d25e3b3b",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 56905,
"upload_time": "2024-11-20T20:23:36",
"upload_time_iso_8601": "2024-11-20T20:23:36.325971Z",
"url": "https://files.pythonhosted.org/packages/ff/09/565ab317d41029262ee59b84839388858c7277c152e2f9bc7225b3fe6eb5/lollms_client-0.7.7-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "ff8625da6ca3d425905f9d3c4b014265e32cd1dbc586bd16cbbe05ab8303b10d",
"md5": "c05eaf33b932d7f92fa16241b981390f",
"sha256": "c8493a94fd9d500a3f460b1672ac0c7bfe3295dcbe59a0e19bdccfc430d7f8c9"
},
"downloads": -1,
"filename": "lollms_client-0.7.7.tar.gz",
"has_sig": false,
"md5_digest": "c05eaf33b932d7f92fa16241b981390f",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 51784,
"upload_time": "2024-11-20T20:23:38",
"upload_time_iso_8601": "2024-11-20T20:23:38.204520Z",
"url": "https://files.pythonhosted.org/packages/ff/86/25da6ca3d425905f9d3c4b014265e32cd1dbc586bd16cbbe05ab8303b10d/lollms_client-0.7.7.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-11-20 20:23:38",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "ParisNeo",
"github_project": "lollms_client",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"requirements": [],
"lcname": "lollms-client"
}