llama-index llms netmind integration
Project description
LlamaIndex Llms Integration: Netmind
Installation
To install the required package, run:
pip install llama-index-llms-netmind
Setup
- Set your Netmind API key as an environment variable. Visit https://www.netmind.ai/ and sign up to get an API key.
import os
os.environ["NETMIND_API_KEY"] = "you_api_key"
Basic Usage
Generate Completions
from llama_index.llms.netmind import NetmindLLM
llm = NetmindLLM(
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)
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
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_netmind-0.2.0.tar.gz.
File metadata
- Download URL: llama_index_llms_netmind-0.2.0.tar.gz
- Upload date:
- Size: 3.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.7.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4d640ab9757a908e816d716afa526a15f1f0928e1789ff62d4f8589888b63265
|
|
| MD5 |
d67fc91c9b5048989c1aea540b3b7e3e
|
|
| BLAKE2b-256 |
9cfdec5304ad44b05e9249a7726f4ce93ed36a2f6a83e11aa3d5fa544d63773f
|
File details
Details for the file llama_index_llms_netmind-0.2.0-py3-none-any.whl.
File metadata
- Download URL: llama_index_llms_netmind-0.2.0-py3-none-any.whl
- Upload date:
- Size: 3.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.7.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7cc2496d93ae37bfd9d933c512814160d2d4674ed01f6043d3e318e79412bf08
|
|
| MD5 |
1a96d9bcba21ce3e15d623d59483833d
|
|
| BLAKE2b-256 |
c9f24ee7e5b4c6efab1c58685c8432490af1debbb02fcb231f7779403627a9ef
|