Skip to main content

llama-index llms lmstudio integration

Project description

LlamaIndex Llms Integration: Lmstudio

pip install llama-index-llms-lmstudio

Usage Steps

  1. Open LM Studio App and go to the Local Server Tab
  2. In the Configuration settings, enable Apply Prompt Formatting
  3. Load the model of your choice
  4. 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

llama_index_llms_lmstudio-0.2.1.tar.gz (3.7 kB view details)

Uploaded Source

Built Distribution

File details

Details for the file llama_index_llms_lmstudio-0.2.1.tar.gz.

File metadata

  • Download URL: llama_index_llms_lmstudio-0.2.1.tar.gz
  • Upload date:
  • Size: 3.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.10.12 Linux/6.5.0-1025-azure

File hashes

Hashes for llama_index_llms_lmstudio-0.2.1.tar.gz
Algorithm Hash digest
SHA256 a46f5a84e1bc2e2013df9c839c90e8d51069ac66f443e7ca162cd790ac537768
MD5 d5e6671956e5fd85ec5bfb33ffea6f83
BLAKE2b-256 99da9d2e6d9a7424ff0be8bbdd2767fd0e7b7f1a7fbc4bca94504db974da35a1

See more details on using hashes here.

File details

Details for the file llama_index_llms_lmstudio-0.2.1-py3-none-any.whl.

File metadata

File hashes

Hashes for llama_index_llms_lmstudio-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 0926874e714c289aed26ad04bde797e0c87bbe1e575651f01f808f009d69aa6d
MD5 3bcb75a3541f89118a61801bff5b2962
BLAKE2b-256 2b8dc0e6083d6894f5d2d5cd5ccee8c1e4619046d07721d9f629b7b1d6a1d657

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page