Python SDK for LM Studio local LLM management
Top 56.3% on sourcepulse
This Python SDK provides a convenient interface for interacting with the LM Studio application, enabling developers to easily integrate local large language models (LLMs) into their Python applications. It simplifies tasks such as text completion and chat interactions, abstracting away the complexities of underlying WebSocket connections.
How It Works
The SDK offers a synchronous Client
for direct control over connections and a higher-level convenience API for interactive use. This convenience API implicitly manages a default client instance. For chat functionalities, a Chat
helper class manages conversation history, allowing seamless integration with the LLM's response prediction.
Quick Start & Requirements
pip install lmstudio
Highlighted Details
Chat
helper class for managing conversation history.pdm
, tox
, and tox-pdm
.Maintenance & Community
tox
for formatting, linting, and testing.ruff
and mypy
.pytest
and can be run across multiple Python versions via tox
.sync-sdk-schema.py
.Licensing & Compatibility
Limitations & Caveats
1 day ago
1 day