lmstudio-js  by lmstudio-ai

TypeScript SDK for local LLM interaction

created 1 year ago
1,256 stars

Top 32.1% on sourcepulse

GitHubView on GitHub
1 Expert Loves This Project
Project Summary

This project provides the official JavaScript/TypeScript client SDK for LM Studio, enabling developers to integrate locally run Large Language Models (LLMs) into their applications. It offers features specifically tailored for local LLM management, such as model loading/unloading, configuration of parameters like GPU offload, and support for tool-defined functions to create autonomous agents.

How It Works

The SDK interacts with the LM Studio backend, abstracting the complexities of local LLM deployment. It allows for direct model inference, text completion, and embedding generation. Key advantages over generic SDKs like OpenAI's include granular control over model loading parameters, memory management, and access to model-specific information crucial for local execution environments.

Quick Start & Requirements

  • Primary install: npm install @lmstudio/sdk --save
  • Prerequisites: Node.js environment (browser or server-side).
  • Documentation: lmstudio-js docs

Highlighted Details

  • Enables local LLM autonomy via tool-defined functions.
  • Manages model loading, unloading, and configuration (context length, GPU offload).
  • Supports text completion and embedding generation.
  • Designed for ease of use in TypeScript/JavaScript environments.

Maintenance & Community

Licensing & Compatibility

  • License: Not explicitly stated in the README.
  • Compatibility: Designed for Node.js and browser environments.

Limitations & Caveats

The README does not specify the project's license, which may impact commercial use or closed-source integration.

Health Check
Last commit

1 day ago

Responsiveness

1 day

Pull Requests (30d)
16
Issues (30d)
8
Star History
209 stars in the last 90 days

Explore Similar Projects

Feedback? Help us improve.