llama-index-llms-huggingface-api


Namellama-index-llms-huggingface-api JSON
Version 0.2.0 PyPI version JSON
download
home_pageNone
Summaryllama-index llms huggingface api integration
upload_time2024-08-22 04:44:32
maintainerNone
docs_urlNone
authorYour Name
requires_python<4.0,>=3.8.1
licenseMIT
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # LlamaIndex Llms Integration: Huggingface API

Integration with Hugging Face's Inference API for generating text.

For more information on Hugging Face's Inference API, visit [Hugging Face's Inference API documentation](https://huggingface.co/docs/api-inference/quicktour).

## Installation

```shell
pip install llama-index-llms-huggingface-api
```

## Usage

```python
from llama_index.llms.huggingface_api import HuggingFaceInferenceAPI

llm = HuggingFaceInferenceAPI(
    model_name="openai-community/gpt2",
    temperature=0.7,
    max_tokens=100,
    token="<your-token>",  # Optional
)

response = llm.complete("Hello, how are you?")
```

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "llama-index-llms-huggingface-api",
    "maintainer": null,
    "docs_url": null,
    "requires_python": "<4.0,>=3.8.1",
    "maintainer_email": null,
    "keywords": null,
    "author": "Your Name",
    "author_email": "you@example.com",
    "download_url": "https://files.pythonhosted.org/packages/12/6a/5b6d40f1481496444b59228f5c9426601802b7f9826512f0bb0ee48adc44/llama_index_llms_huggingface_api-0.2.0.tar.gz",
    "platform": null,
    "description": "# LlamaIndex Llms Integration: Huggingface API\n\nIntegration with Hugging Face's Inference API for generating text.\n\nFor more information on Hugging Face's Inference API, visit [Hugging Face's Inference API documentation](https://huggingface.co/docs/api-inference/quicktour).\n\n## Installation\n\n```shell\npip install llama-index-llms-huggingface-api\n```\n\n## Usage\n\n```python\nfrom llama_index.llms.huggingface_api import HuggingFaceInferenceAPI\n\nllm = HuggingFaceInferenceAPI(\n    model_name=\"openai-community/gpt2\",\n    temperature=0.7,\n    max_tokens=100,\n    token=\"<your-token>\",  # Optional\n)\n\nresponse = llm.complete(\"Hello, how are you?\")\n```\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "llama-index llms huggingface api integration",
    "version": "0.2.0",
    "project_urls": null,
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "13e25cdc0134c26834e26e9769c21cfa75d3041dd8041deea01817768656df63",
                "md5": "31c4d507a07b8b6dd2735ab59c9a4329",
                "sha256": "ed12bcf6986becee1dc5f7644ff22aa96070de3b463add22c3b6ceabc2bd2f43"
            },
            "downloads": -1,
            "filename": "llama_index_llms_huggingface_api-0.2.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "31c4d507a07b8b6dd2735ab59c9a4329",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<4.0,>=3.8.1",
            "size": 5026,
            "upload_time": "2024-08-22T04:44:30",
            "upload_time_iso_8601": "2024-08-22T04:44:30.999296Z",
            "url": "https://files.pythonhosted.org/packages/13/e2/5cdc0134c26834e26e9769c21cfa75d3041dd8041deea01817768656df63/llama_index_llms_huggingface_api-0.2.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "126a5b6d40f1481496444b59228f5c9426601802b7f9826512f0bb0ee48adc44",
                "md5": "7ece13b8374072ef0fd499f4d8dcfad9",
                "sha256": "37c866071e2ebd668e4714ccaf69811c7be3891e07546a513b0aaf78259112fb"
            },
            "downloads": -1,
            "filename": "llama_index_llms_huggingface_api-0.2.0.tar.gz",
            "has_sig": false,
            "md5_digest": "7ece13b8374072ef0fd499f4d8dcfad9",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<4.0,>=3.8.1",
            "size": 4718,
            "upload_time": "2024-08-22T04:44:32",
            "upload_time_iso_8601": "2024-08-22T04:44:32.327593Z",
            "url": "https://files.pythonhosted.org/packages/12/6a/5b6d40f1481496444b59228f5c9426601802b7f9826512f0bb0ee48adc44/llama_index_llms_huggingface_api-0.2.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-08-22 04:44:32",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "llama-index-llms-huggingface-api"
}
        
Elapsed time: 0.61499s