Skip to main content

A client library for interacting with the LM Studio API

Project description

LM Studio Wrapper

Overview

The LM Studio Wrapper 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-wrapper

From source

git clone <repository-url>
cd lmstudio-wrapper
pip install -e .

Usage

Here is a simple example of how to use the LMStudioClient:

from lmstudio_wrapper 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.

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

lmstudio_wrapper-0.1.2.tar.gz (5.6 kB view details)

Uploaded Source

Built Distribution

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

lmstudio_wrapper-0.1.2-py3-none-any.whl (6.0 kB view details)

Uploaded Python 3

File details

Details for the file lmstudio_wrapper-0.1.2.tar.gz.

File metadata

  • Download URL: lmstudio_wrapper-0.1.2.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

Hashes for lmstudio_wrapper-0.1.2.tar.gz
Algorithm Hash digest
SHA256 5ab3fe310ae637c718a7aa930a2501bd78df86e0cf3a110b5e28697605c4541b
MD5 b8bd989c0bf90c748579792968c3d8cc
BLAKE2b-256 0e6b07093074b8a3c4fe823d5c3619452eb2b8c4fc633393cedc3b6cbb16447f

See more details on using hashes here.

File details

Details for the file lmstudio_wrapper-0.1.2-py3-none-any.whl.

File metadata

File hashes

Hashes for lmstudio_wrapper-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 66daf3121a415c38603cf7c1980ed18fa5852402938e524bb09e1b8fcb0051eb
MD5 d1019170f295c5e4d57ecaa53c81022c
BLAKE2b-256 c743a6dee906398435ab8b93ed0f9533c5834543aab88e27cfe946160d556ddf

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