LlamaIndex Llms Integration: Featherless AI
Installation
To install the required package, run:
pip install llama-index-llms-featherlessai
Setup
- Set your Featherless AI API key as an environment variable. Visit https://www.featherless.ai/ and sign up to get an API key.
import os
os.environ["FEATHERLESS_API_KEY"] = "you_api_key"
Basic Usage
Generate Completions
from llama_index.llms.featherlessai import FeatherlessLLM
llm = FeatherlessLLM(
model="meta-llama/Llama-3.3-70B-Instruct", api_key="your api key"
)
resp = llm.complete("Is 9.9 or 9.11 bigger?")
print(resp)
Chat Responses
To send a chat message and receive a response, create a list of ChatMessage instances and use the chat method:
from llama_index.core.llms import ChatMessage
messages = [
ChatMessage(
role="system", content="You are a pirate with a colorful personality"
),
ChatMessage(role="user", content="What is your name"),
]
resp = llm.chat(messages)
print(resp)
Metadata
Release files for llama-index-llms-featherlessai 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| llama_index_llms_featherlessai-0.1.0.tar.gz | 3.9 kB | Without provenance | Details for llama_index_llms_featherlessai-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| llama_index_llms_featherlessai-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for llama_index_llms_featherlessai-0.1.0-py3-none-any.whl |
Total release size: 7.5 kB
Release files / llama_index_llms_featherlessai-0.1.0.tar.gz
| Download URL | llama_index_llms_featherlessai-0.1.0.tar.gz |
|---|---|
| Size | 3.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
552a0acec33efe311fee02946e550455b30c6fa1eccee096f4e8e77f351a66e4
|
|
BLAKE2b-256 checksum How to use checksums |
f04ba1da3117461d5a29d2738713c5945292fe17965001f769f2a0120414aed2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.1.3 CPython/3.11.3 Windows/10
|
Release files / llama_index_llms_featherlessai-0.1.0-py3-none-any.whl
| Download URL | llama_index_llms_featherlessai-0.1.0-py3-none-any.whl |
|---|---|
| Size | 3.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
2d7a1d8d7b8f110a5b3eb47d2141abc816eaa3da4859ba041e4f679f193c0874
|
|
BLAKE2b-256 checksum How to use checksums |
fd326414b700f674e9c28ab7d69a059ab5c3348e9533b7f92e3bf8a9edc51ca3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.1.3 CPython/3.11.3 Windows/10
|
Security for llama-index-llms-featherlessai 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.