llama-index llms huggingface api integration
Project description
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.
Installation
pip install llama-index-llms-huggingface-api
Usage
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
provider="hf-inference", # Optional
)
response = llm.complete("Hello, how are you?")
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file llama_index_llms_huggingface_api-0.7.0.tar.gz.
File metadata
- Download URL: llama_index_llms_huggingface_api-0.7.0.tar.gz
- Upload date:
- Size: 7.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.10.9 {"installer":{"name":"uv","version":"0.10.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
deafb0bf50a5995c2c85e986f1e17c292208aceb8ad860607822636ce2b89d8f
|
|
| MD5 |
9425a3c5eb89007933d3512840ae84cc
|
|
| BLAKE2b-256 |
803943209dc7ca4de97b4dc6fdd4a5e8148b1212b2cb5d55177213625f259428
|
File details
Details for the file llama_index_llms_huggingface_api-0.7.0-py3-none-any.whl.
File metadata
- Download URL: llama_index_llms_huggingface_api-0.7.0-py3-none-any.whl
- Upload date:
- Size: 7.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.10.9 {"installer":{"name":"uv","version":"0.10.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c1797abe45699fe48b73ca0417ffec04d0055a9809f3e8c670983e8c874b243f
|
|
| MD5 |
fdf7b917fc8d0ab8c4deac05604a18a7
|
|
| BLAKE2b-256 |
ca7710d8f2e51caea22b58e123ebf1bd5f4961d38d6cff0a5c03916ecc412a43
|