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
)
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
File details
Details for the file llama_index_llms_huggingface_api-0.3.0.tar.gz
.
File metadata
- Download URL: llama_index_llms_huggingface_api-0.3.0.tar.gz
- Upload date:
- Size: 4.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.3 CPython/3.11.10 Darwin/22.3.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d0cabc8fd872aac71cb68586127d6cee3aea6ceaa0bc7ef6ef0e7ca4bf4cecfd |
|
MD5 | 0b93379a063165bf7e30f7f3dc576df3 |
|
BLAKE2b-256 | ab8c86e4704d65648368c222abac1968c25fe3bb3477da2fa6a8ecd4eb1d1fdc |
File details
Details for the file llama_index_llms_huggingface_api-0.3.0-py3-none-any.whl
.
File metadata
- Download URL: llama_index_llms_huggingface_api-0.3.0-py3-none-any.whl
- Upload date:
- Size: 5.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.3 CPython/3.11.10 Darwin/22.3.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | aa835acc8132118f014559d96bb74944f0314fd0ac0363e87547a548b4b05aca |
|
MD5 | b27e481b68bb94c5545a319653cbb48c |
|
BLAKE2b-256 | 6829487fe384abe3e81d47867fcb5a5e958b8ee68b6cbb10a303c32f087406f3 |