npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@plimver/sdk

v1.0.0

Published

Official TypeScript SDK for Plimver AI Platform - Unified LLM, RAG, and Memory API

Downloads

111

Readme

@plimver/sdk

Official TypeScript SDK for the Plimver AI Platform - Unified LLM, RAG, and Memory API.

Installation

npm install @plimver/sdk
# or
pnpm add @plimver/sdk
# or
yarn add @plimver/sdk

Quick Start

import { Plimver } from '@plimver/sdk';
// or: import { PlimverClient } from '@plimver/sdk';

const plimver = new Plimver({
  apiKey: 'pk_live_your_api_key',
  workspaceId: 'ws_your_workspace_id'
});

// Simple chat
const response = await plimver.chat('What is machine learning?');
console.log(response.text);

Features

  • Type-safe - Full TypeScript support with auto-completion
  • Streaming - Async generator for real-time responses
  • Multimodal - Images, audio, and video support
  • RAG - Document upload and vector search
  • Memory - Conversation history management
  • Retries - Built-in retry with exponential backoff
  • 22+ LLM Providers - OpenAI, Anthropic, Google, Groq, and more

Usage Examples

Basic Chat

// Simple message
const response = await plimver.chat('Hello!');
console.log(response.text);

// With options
const response = await plimver.chat('Explain quantum computing', {
  mode: 'chat_and_rag',  // Use RAG for context
  model: 'gpt-4o',       // Specific model
  temperature: 0.5,
  userId: 'user-123'     // Isolate conversation
});

Conversation History

const response = await plimver.chatWithMessages([
  { role: 'user', content: 'My name is Alice' },
  { role: 'assistant', content: 'Nice to meet you, Alice!' },
  { role: 'user', content: 'What is my name?' }
]);

console.log(response.text); // "Your name is Alice"

Streaming

// Stream response token by token
for await (const chunk of plimver.stream('Tell me a story')) {
  process.stdout.write(chunk.content || '');
}

// With options
for await (const chunk of plimver.stream('Write a poem', { 
  mode: 'chat_only',
  model: 'claude-3-5-sonnet'
})) {
  if (chunk.done) {
    console.log('\n\nTokens used:', chunk.usage?.total_tokens);
  } else {
    process.stdout.write(chunk.content || '');
  }
}

Vision (Images)

// Analyze an image
const response = await plimver.vision(
  'What do you see in this image?',
  'https://example.com/photo.jpg'
);

// With base64
const response = await plimver.vision(
  'Describe this diagram',
  'data:image/png;base64,iVBORw0KGgo...'
);

Audio

// Transcribe or analyze audio (requires Gemini 1.5 Pro+)
const response = await plimver.audio(
  'Transcribe this audio and summarize it',
  'https://example.com/audio.mp3',
  { model: 'gemini-1.5-pro' }
);

Video

// Analyze video (requires Gemini 1.5 Pro+)
const response = await plimver.video(
  'What happens in this video?',
  'https://example.com/video.mp4',
  { model: 'gemini-1.5-pro' }
);

RAG Documents

// Upload a document
await plimver.documents.upload(
  'Plimver is an AI platform that provides unified LLM access...',
  { source: 'about-plimver.txt' }
);

// Upload a file (Node.js)
import { readFileSync } from 'fs';
const file = readFileSync('document.pdf');
await plimver.documents.uploadFile(file, 'document.pdf');

// List documents
const docs = await plimver.documents.list();
console.log(`${docs.length} documents indexed`);

// Search documents
const results = await plimver.documents.search('what is plimver', 5);
results.forEach(r => console.log(r.source, r.score));

// Delete a document
await plimver.documents.delete('about-plimver.txt');

Memory Management

// Get conversation history for a user
const messages = await plimver.memory.get('user-123', 50);

// Clear user's history
await plimver.memory.clear('user-123');

// Clear all history (danger!)
await plimver.memory.clearAll();

Routing Modes

// Auto (smart routing based on query)
await plimver.chat('Hello', { mode: 'auto' });

// Chat only (no RAG, no memory)
await plimver.chat('Hello', { mode: 'chat_only' });

// RAG only (search documents, no memory)
await plimver.chat('What is in my docs?', { mode: 'rag_only' });

// Chat + RAG (full context)
await plimver.chat('Summarize my documents', { mode: 'chat_and_rag' });

Error Handling

import { Plimver, PlimverError } from '@plimver/sdk';

try {
  const response = await plimver.chat('Hello');
} catch (error) {
  if (error instanceof PlimverError) {
    console.error(`API Error ${error.status}: ${error.message}`);
  } else {
    throw error;
  }
}

Configuration

const plimver = new Plimver({
  // Required
  apiKey: 'pk_live_...',
  workspaceId: 'ws_...',
  
  // Optional
  baseUrl: 'https://api.plimvr.tech',  // Custom API URL
  timeout: 30000,                       // Request timeout (ms)
  maxRetries: 2,                        // Retry on failure
});

Supported Models

The SDK works with any model configured in your workspace:

| Provider | Models | |----------|--------| | OpenAI | gpt-4o, gpt-4o-mini, gpt-4-turbo | | Anthropic | claude-3-5-sonnet, claude-3-opus | | Google | gemini-2.0-flash, gemini-1.5-pro | | Groq | llama-3.1-70b, mixtral-8x7b | | DeepSeek | deepseek-chat, deepseek-coder | | xAI | grok-beta | | + 15 more... | |

License

MIT © Plimver Team