h2o-helium


Nameh2o-helium JSON
Version 0.8.2 PyPI version JSON
download
home_page
SummaryClient library for H2O Helium
upload_time2023-09-25 18:15:16
maintainer
docs_urlNone
author
requires_python>=3.8
license
keywords information-retrieval llm large-language-models question-answering search semantic-search analytical-search lexical-search document-search natural-language-querying
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # H2O Helium Python Client

## Install

```bash
pip install h2o-helium
```

## Usage

```python
from h2o_helium import Helium

helium = Helium(address='https://helium.h2o.ai', api_key='sk-xxxxxx')

# Create a new collection
collection_id = helium.create_collection(name='Contracts', description='Paper clip supply contracts')

# Upload documents
with open('/path/to/dunder_mifflin.pdf', 'rb') as f:
    dunder_mifflin = helium.upload('Dunder Mifflin.pdf', f)
with open('/path/to/wernham_hogg.pdf', 'rb') as f:
    initech = helium.upload('Wernham Hogg.pdf', f)

# Ingest documents
helium.ingest_uploads(collection_id, [dunder_mifflin, initech])

# Create a chat session
chat_session_id = helium.create_chat_session(collection_id)

# Query the collection
with helium.connect(chat_session_id) as session:
    reply = session.query('How many paper clips were shipped to Scranton?', timeout=10)
    print(reply.content)
    
    reply = session.query('Did David Brent co-sign the contract with Initech?', timeout=10)
    print(reply.content)
```


            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "h2o-helium",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": "",
    "keywords": "information-retrieval,LLM,large-language-models,question-answering,search,semantic-search,analytical-search,lexical-search,document-search,natural-language-querying",
    "author": "",
    "author_email": "Prithvi Prabhu <prithvi.prabhu@gmail.com>",
    "download_url": "",
    "platform": null,
    "description": "# H2O Helium Python Client\n\n## Install\n\n```bash\npip install h2o-helium\n```\n\n## Usage\n\n```python\nfrom h2o_helium import Helium\n\nhelium = Helium(address='https://helium.h2o.ai', api_key='sk-xxxxxx')\n\n# Create a new collection\ncollection_id = helium.create_collection(name='Contracts', description='Paper clip supply contracts')\n\n# Upload documents\nwith open('/path/to/dunder_mifflin.pdf', 'rb') as f:\n    dunder_mifflin = helium.upload('Dunder Mifflin.pdf', f)\nwith open('/path/to/wernham_hogg.pdf', 'rb') as f:\n    initech = helium.upload('Wernham Hogg.pdf', f)\n\n# Ingest documents\nhelium.ingest_uploads(collection_id, [dunder_mifflin, initech])\n\n# Create a chat session\nchat_session_id = helium.create_chat_session(collection_id)\n\n# Query the collection\nwith helium.connect(chat_session_id) as session:\n    reply = session.query('How many paper clips were shipped to Scranton?', timeout=10)\n    print(reply.content)\n    \n    reply = session.query('Did David Brent co-sign the contract with Initech?', timeout=10)\n    print(reply.content)\n```\n\n",
    "bugtrack_url": null,
    "license": "",
    "summary": "Client library for H2O Helium",
    "version": "0.8.2",
    "project_urls": {
        "Documentation": "https://github.com/h2oai/helium/wiki",
        "Issues": "https://github.com/h2oai/helium/issues",
        "Source": "https://github.com/h2oai/helium"
    },
    "split_keywords": [
        "information-retrieval",
        "llm",
        "large-language-models",
        "question-answering",
        "search",
        "semantic-search",
        "analytical-search",
        "lexical-search",
        "document-search",
        "natural-language-querying"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "519636e656a406eee09f6234af6f9d5b6133d19e8d26caf3b0c9cf99a2fafade",
                "md5": "0c53a0c02918893a1605e57df686f379",
                "sha256": "7190f4c6218bf17b5ffb12ae8e545d9c918556d2c409ec7be8db78da7c19b697"
            },
            "downloads": -1,
            "filename": "h2o_helium-0.8.2-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "0c53a0c02918893a1605e57df686f379",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 5750,
            "upload_time": "2023-09-25T18:15:16",
            "upload_time_iso_8601": "2023-09-25T18:15:16.273788Z",
            "url": "https://files.pythonhosted.org/packages/51/96/36e656a406eee09f6234af6f9d5b6133d19e8d26caf3b0c9cf99a2fafade/h2o_helium-0.8.2-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-09-25 18:15:16",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "h2oai",
    "github_project": "helium",
    "github_not_found": true,
    "lcname": "h2o-helium"
}
        
Elapsed time: 0.12068s