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

coe-ai

v1.0.0

Published

COE AI LLM Inference Client - A TypeScript/JavaScript client for the COE AI LLM API

Downloads

5

Readme

COE AI - NPM Package

A TypeScript/JavaScript client for the COE AI LLM inference API.

Note: This API is only accessible from UPES's internal network (UPESNET).

Installation

npm install coe-ai

Quick Start

import { LLMinfer } from 'coe-ai';

// Initialize the client
const llm = new LLMinfer({
  apiKey: 'your-api-key', // Get from https://coeai.ddn.upes.ac.in
  host: 'http://10.9.6.165:8000' // optional, this is the default
});

// Generate text
const response = await llm.generate({
  model: 'tinyllama:latest',
  prompt: 'Explain machine learning in simple terms'
});

console.log(response.choices?.[0]?.message?.content);

API Reference

LLMinfer

The main client class.

Constructor

new LLMinfer({
  apiKey: string,    // Required: Your API key
  host?: string      // Optional: Server URL (default: http://10.9.6.165:8000)
})

Methods

generate(options: GenerateOptions): Promise<GenerateResponse>

Generate text from a prompt or messages.

const response = await llm.generate({
  model: 'tinyllama:latest',
  prompt: 'Hello!',
  maxTokens: 512,        // optional
  temperature: 0.7,      // optional
  topP: 1.0,             // optional
  contextWindow: 2048,   // optional
  stream: false          // optional
});
chat(messages: Message[], model: string, options?): Promise<GenerateResponse>

Convenience method for chat-style interactions.

const response = await llm.chat(
  [
    { role: 'system', content: 'You are a helpful assistant.' },
    { role: 'user', content: 'What is AI?' }
  ],
  'tinyllama:latest'
);
list_models(): Promise<string[]>

Get list of available models.

const models = await llm.list_models();
console.log('Available models:', models);

Error Handling

import { LLMinfer, AuthenticationError, ModelNotFoundError, InferenceError } from 'coe-ai';

try {
  const response = await llm.generate({ model: 'invalid', prompt: 'test' });
} catch (error) {
  if (error instanceof AuthenticationError) {
    console.error('Invalid API key');
  } else if (error instanceof ModelNotFoundError) {
    console.error('Model not found');
  } else if (error instanceof InferenceError) {
    console.error('Inference failed:', error.message);
  }
}

Available Models

Use llm.list_models() to get the current list of available models.

Common models include:

  • tinyllama:latest - Fast, lightweight
  • llama4:16x17b - Vision-capable
  • llama3.2-vision:11b - Vision-capable

Requirements

  • Node.js >= 16.0.0
  • Access to UPES internal network (UPESNET)

License

MIT