llama-index llms lmstudio integration
Project description
LlamaIndex Llms Integration: Lmstudio
pip install llama-index-llms-lmstudio
Usage Steps
- Open LM Studio App and go to the Local Server Tab
- In the Configuration settings, enable Apply Prompt Formatting
- Load the model of your choice
- Start your server
from llama_index.llms.lmstudio import LMStudio
llm = LMStudio(
model_name="Hermes-2-Pro-Llama-3-8B",
base_url="http://localhost:1234/v1",
temperature=0.7,
)
messages = [
ChatMessage(
role=MessageRole.SYSTEM,
content="You an expert AI assistant. Help User with their queries.",
),
ChatMessage(
role=MessageRole.USER,
content="What is the significance of the number 42?",
),
]
response = llm.chat(messages=messages)
print(str(response))
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
File details
Details for the file llama_index_llms_lmstudio-0.3.0.tar.gz
.
File metadata
- Download URL: llama_index_llms_lmstudio-0.3.0.tar.gz
- Upload date:
- Size: 3.8 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 | 1abd9e68862d6bd9083e5fee05def6d67e5be9b663718587524d922286d8aa06 |
|
MD5 | 26a4138d37d5d1a6b16a10af3c93c473 |
|
BLAKE2b-256 | 9f301e9d651cb00a62f4f4733e2076af489791faa3e76fb8187f51f9df50d8f0 |
File details
Details for the file llama_index_llms_lmstudio-0.3.0-py3-none-any.whl
.
File metadata
- Download URL: llama_index_llms_lmstudio-0.3.0-py3-none-any.whl
- Upload date:
- Size: 4.1 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 | 09c71ad49bd63c75630dabd0daebecb11b824ed23016a394a4e5f6f25f189ab7 |
|
MD5 | ad05cce01a7bf1c0d3a326d09e824996 |
|
BLAKE2b-256 | 8192a0524bc8deaf29fd3ac21a98426d1ea5c8ce2fdeb97112730bdeeecda177 |