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.5.0.tar.gz (5.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

llama_index_llms_lmstudio-0.5.0-py3-none-any.whl (4.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: llama_index_llms_lmstudio-0.5.0.tar.gz
  • Upload date:
  • Size: 5.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.9 {"installer":{"name":"uv","version":"0.10.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for llama_index_llms_lmstudio-0.5.0.tar.gz
Algorithm Hash digest
SHA256 0e8dcc2a98d1abc5c0c578b5b11ee38cb6bb7e1b389b36b1a94b34d0f1e2d548
MD5 2c54c1c27e34be1b9a4f4e72f0a14080
BLAKE2b-256 823211c457889fc5610db72e35319cd5608d3b3579e9c833f09032049e6011f1

See more details on using hashes here.

File details

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

File metadata

  • Download URL: llama_index_llms_lmstudio-0.5.0-py3-none-any.whl
  • Upload date:
  • Size: 4.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.9 {"installer":{"name":"uv","version":"0.10.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for llama_index_llms_lmstudio-0.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 5af1b91e6de7092cab1b52b3eb6ba362ca1c34d7eb59ba8f52b4b7e474ebc86c
MD5 dea0fc106e85b7b87657ec66d4c46454
BLAKE2b-256 efeeea3260e18706109fe2189b19aae166ef55970aa3799407bba27dd18d03f2

See more details on using hashes here.

Supported by

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