lunary
TypeScript icon, indicating that this package has built-in type declarations

0.7.8 • Public • Published

Lunary JS SDK

📈 JavaScript monitoring for AI apps and agent

website - docs - demo - npm version


Use it with any LLM model and custom agents (not limited to OpenAI).

This is a typed JS library compatible with Node.js, Deno, Vercel Edge functions and Cloudflare Workers.

It is compatible with Langchain JS, AutoGPT and other libraries.

To get started, get a project ID by registering here.

🛠️ Installation

npm install lunary

🚀 Basic Usage with OpenAI

import { monitorOpenAI } from "lunary/openai"

// This extends the openai object with the monitor
const openai = monitorOpenAI(new OpenAI())

// Use OpenAI as usual
const result = await openai.chat.completions.create({
  messages: [
    {
      role: "user",
      content: "Hello!",
    },
  ],
})

console.log(result.choices[0])

📖 Documentation

Full docs are available here.

Readme

Keywords

none

Package Sidebar

Install

npm i lunary

Weekly Downloads

6,696

Version

0.7.8

License

Apache-2.0

Unpacked Size

1.08 MB

Total Files

46

Last publish

Collaborators

  • vincelwt
  • hughcrt