lmstudio-js  by lmstudio-ai

TypeScript SDK for local LLM interaction

Created 2 years ago
1,336 stars

Top 30.0% on SourcePulse

GitHubView on GitHub
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)
27
Issues (30d)
3
Star History
49 stars in the last 30 days

Explore Similar Projects

Feedback? Help us improve.