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.3.tar.gz (7.3 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.3-py3-none-any.whl (7.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: lmstudio_wrapper-0.1.3.tar.gz
  • Upload date:
  • Size: 7.3 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.3.tar.gz
Algorithm Hash digest
SHA256 b50dc496bde46c55e7eff31f2ff29890c3686107db2664e0cfe5d9de8de7d1ba
MD5 ee98553d302f07d0dfe348ca609529a3
BLAKE2b-256 1995fa457c3bad32b25cb18889d425dbee10087eaad505011c24f8e72d903350

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lmstudio_wrapper-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 2f8ccef37cc2cf5dda18db5316fd9ae0e8d12aa60747537fd6a921f90323d3f3
MD5 2c845886a20b703e287329664f03a829
BLAKE2b-256 5e6f3791f8929df3d42e5c82ca59b3419c0cf32bb6c7856f91fb1e40ebc8f073

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