plato-client


Nameplato-client JSON
Version 1.0.0 PyPI version JSON
download
home_page
SummaryPlato Client
upload_time2023-08-25 19:12:17
maintainer
docs_urlNone
authorVaibhav Singh
requires_python>=3.10,<4.0
license
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Plato Client
Plato Client is a Python library that provides an interface to interact with the Plato Core API. It allows users to manage documents, generate content, and train models.

## Features
### Current
- Make calls to OpenAi Text Creation, Chat, and Image geenration endpoints without needing to manage API keys

### Coming Soon...
- Authentication with the Plato Core using the Oauth2 Client Credentials flow
- Document management abstraction (upload, download, find, and delete)
- User Management (via a Fastapi router you can add)
- Session Management (via a Fastapi router you can add)
- Content generation abstraction with various options (e.g., image generation, multihop, cache, moderation)
- Model training abstraction
- Centralized logging (routes to Datadog)

Please see https://bainco.atlassian.net/wiki/spaces/aagplato/pages/16918315581/Plato+Core#%F0%9F%92%80-Code-Skeletons for additonal information.

## Usage

Here are some examples of what you can do with the Plato Client:


```python
from plato_client.client import PlatoClient
client = PlatoClient(endpoint="http://127.0.0.1:8080")

# Generate text
print(client.text_completion("Roses are blue", model="gpt-4"))

# Chat
pprint(client.chat_completion(messages=[{"role": "user", "content": "Hello!"}]))

# Generate Image
print( client.create_images(prompt="Draw image of a dog playing by the pool", n=2, size="512x512"))
````

## Requirements
- Python 3.10.10 or later
- Poetry (Python Package Manager)
- Pip


## Installation
To install the Plato Client, you can run

```bash
make install
```

After installing the venv, source it (with source .venv/bin/activate) and the initialize pre-commit with pre-commit install. This will add pre-commits locally, such that code quality checks are run before each commit. To disable it, just add --no-verify after the commit (example: git commit -a -m "<commit-message>" --no-verify)
            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "plato-client",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.10,<4.0",
    "maintainer_email": "",
    "keywords": "",
    "author": "Vaibhav Singh",
    "author_email": "vaibhav.singh@bain.com",
    "download_url": "https://files.pythonhosted.org/packages/f2/ef/cb4efad0c5b2df686f9785193dbdfe27d36702c4099d79fe336ee992a22d/plato_client-1.0.0.tar.gz",
    "platform": null,
    "description": "# Plato Client\nPlato Client is a Python library that provides an interface to interact with the Plato Core API. It allows users to manage documents, generate content, and train models.\n\n## Features\n### Current\n- Make calls to OpenAi Text Creation, Chat, and Image geenration endpoints without needing to manage API keys\n\n### Coming Soon...\n- Authentication with the Plato Core using the Oauth2 Client Credentials flow\n- Document management abstraction (upload, download, find, and delete)\n- User Management (via a Fastapi router you can add)\n- Session Management (via a Fastapi router you can add)\n- Content generation abstraction with various options (e.g., image generation, multihop, cache, moderation)\n- Model training abstraction\n- Centralized logging (routes to Datadog)\n\nPlease see https://bainco.atlassian.net/wiki/spaces/aagplato/pages/16918315581/Plato+Core#%F0%9F%92%80-Code-Skeletons for additonal information.\n\n## Usage\n\nHere are some examples of what you can do with the Plato Client:\n\n\n```python\nfrom plato_client.client import PlatoClient\nclient = PlatoClient(endpoint=\"http://127.0.0.1:8080\")\n\n# Generate text\nprint(client.text_completion(\"Roses are blue\", model=\"gpt-4\"))\n\n# Chat\npprint(client.chat_completion(messages=[{\"role\": \"user\", \"content\": \"Hello!\"}]))\n\n# Generate Image\nprint( client.create_images(prompt=\"Draw image of a dog playing by the pool\", n=2, size=\"512x512\"))\n````\n\n## Requirements\n- Python 3.10.10 or later\n- Poetry (Python Package Manager)\n- Pip\n\n\n## Installation\nTo install the Plato Client, you can run\n\n```bash\nmake install\n```\n\nAfter installing the venv, source it (with source .venv/bin/activate) and the initialize pre-commit with pre-commit install. This will add pre-commits locally, such that code quality checks are run before each commit. To disable it, just add --no-verify after the commit (example: git commit -a -m \"<commit-message>\" --no-verify)",
    "bugtrack_url": null,
    "license": "",
    "summary": "Plato Client",
    "version": "1.0.0",
    "project_urls": null,
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "feb3ffc4e0eb7d2c0edf49d965f1409b2645ccc5bd7c619665b98bd08ec6da3f",
                "md5": "bc1355e14ff98cb0868162fa641b9be4",
                "sha256": "eaece135bd45537ddf7ab049817f27192d67a9cb73f80bdb6f122805ec706405"
            },
            "downloads": -1,
            "filename": "plato_client-1.0.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "bc1355e14ff98cb0868162fa641b9be4",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.10,<4.0",
            "size": 28239,
            "upload_time": "2023-08-25T19:12:16",
            "upload_time_iso_8601": "2023-08-25T19:12:16.188736Z",
            "url": "https://files.pythonhosted.org/packages/fe/b3/ffc4e0eb7d2c0edf49d965f1409b2645ccc5bd7c619665b98bd08ec6da3f/plato_client-1.0.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "f2efcb4efad0c5b2df686f9785193dbdfe27d36702c4099d79fe336ee992a22d",
                "md5": "221b1dcf8b7a0628cf2dbadf83771fb0",
                "sha256": "8a1efd7c3890db39d710d9d62bc6e81c67b4d843927d8763d1b682ba2a2f346e"
            },
            "downloads": -1,
            "filename": "plato_client-1.0.0.tar.gz",
            "has_sig": false,
            "md5_digest": "221b1dcf8b7a0628cf2dbadf83771fb0",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.10,<4.0",
            "size": 23413,
            "upload_time": "2023-08-25T19:12:17",
            "upload_time_iso_8601": "2023-08-25T19:12:17.717533Z",
            "url": "https://files.pythonhosted.org/packages/f2/ef/cb4efad0c5b2df686f9785193dbdfe27d36702c4099d79fe336ee992a22d/plato_client-1.0.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-08-25 19:12:17",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "plato-client"
}
        
Elapsed time: 1.70857s