llama-index llms nvidia api catalog integration
Project description
NVIDIA's LLM connector
Install the connector,
pip install llama-index-llms-nvidia
With this connector, you'll be able to connect to and generate from compatible models available as hosted NVIDIA NIMs, such as:
- Google's gemma-7b
- Mistal AI's mistral-7b-instruct-v0.2
- And more!
First, get a free API key. Go to https://build.nvidia.com, select a model, click "Get API Key".
Store this key in your environment as NVIDIA_API_KEY
.
Then, try it out.
from llama_index.llms.nvidia import NVIDIA
from llama_index.core.llms import ChatMessage, MessageRole
llm = NVIDIA()
messages = [
ChatMessage(
role=MessageRole.SYSTEM, content=("You are a helpful assistant.")
),
ChatMessage(
role=MessageRole.USER,
content=("What are the most popular house pets in North America?"),
),
]
llm.chat(messages)
Project details
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
Close
Hashes for llama_index_llms_nvidia-0.1.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | f753feabe0d3a7c53236a899bc7cceaa30223f5c9694688f1f918f7e2066fc10 |
|
MD5 | d3d43b14333de682cf773607215f6fdd |
|
BLAKE2b-256 | 8c9b4c1456ad284b4bfc5127b45d654fed88cad0cc4095a650c3b6ffe7c7a84e |
Close
Hashes for llama_index_llms_nvidia-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | acd5c7165983e4559d4797839f93272df174a5b41857aa1b34f13f3694b5a418 |
|
MD5 | ac16e17318bdd2436311fb79cf854283 |
|
BLAKE2b-256 | edb3c9b712daae6d7a8321caa09b174620adc892c00b0bcf530ef147797c6ec4 |