A client library for interacting with the LM Studio API
Project description
LM Studio Client
Overview
The LM Studio Client is a Python module designed to simplify interactions with the LM Studio API. It provides an easy-to-use interface for generating summaries and notes from video content, making it ideal for developers and researchers working with video analysis.
Features
- Generate Summaries: Quickly create concise summaries of video content.
- Detailed Notes: Generate organized notes with key points and observations.
- Error Handling: Custom exceptions for robust error management.
- Utility Functions: Helper functions for formatting and processing API responses.
Installation
From PyPI (recommended)
pip install lmstudio-client
From source
git clone <repository-url>
cd lmstudio-client
pip install -e .
Usage
Here is a simple example of how to use the LMStudioClient:
from lmstudio_client import LMStudioClient
# Initialize the client (API key not required for local LM Studio servers)
client = LMStudioClient(base_url="http://localhost:1234/v1")
# Video information
video_info = {
'filename': 'example_video.mp4',
'total_duration': 120.0,
'scenes_detected': 5,
'scenes': [
{'scene_index': 0, 'start_time': 0.0, 'end_time': 30.0, 'text_content': 'Introduction'},
{'scene_index': 1, 'start_time': 30.0, 'end_time': 60.0, 'text_content': 'Main Content'},
# Add more scenes as needed
]
}
# Generate summary
summary = client.generate_summary(video_info)
print(summary)
# List available models
models = client.list_models()
print("Available models:", models)
Contributing
Contributions are welcome! Please submit a pull request or open an issue for any enhancements or bug fixes.
License
This project is licensed under the MIT License. See the LICENSE file for more details.
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 lmstudio_wrapper-0.1.1.tar.gz.
File metadata
- Download URL: lmstudio_wrapper-0.1.1.tar.gz
- Upload date:
- Size: 5.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a88b5e3e3ba2d6f4dc3066575cec5b882915beb9199a3d06409f65e4cabb5b01
|
|
| MD5 |
4093afa147eac77e4b3117b309fe7ee0
|
|
| BLAKE2b-256 |
8acf014025e1da5d167ae26f653e1476785833f682a6fcd17de9aa648aab19a4
|
File details
Details for the file lmstudio_wrapper-0.1.1-py3-none-any.whl.
File metadata
- Download URL: lmstudio_wrapper-0.1.1-py3-none-any.whl
- Upload date:
- Size: 6.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
562b533cc84ba6600cccdd9a78c48d5c82e03023092159d6416e1fae1744d0d8
|
|
| MD5 |
f10444272b8e1118747e8fb4312829e8
|
|
| BLAKE2b-256 |
8af55dd362b76cd96f851cc09248f9664980125ba5ecee61441ab8e740a0ec38
|