Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/lunary-ai/lunary-js
Lunary AI JS Client (analytics and logging for AI apps) 📈
https://github.com/lunary-ai/lunary-js
ai analytics langchain-js logging openai
Last synced: 3 months ago
JSON representation
Lunary AI JS Client (analytics and logging for AI apps) 📈
- Host: GitHub
- URL: https://github.com/lunary-ai/lunary-js
- Owner: lunary-ai
- Created: 2023-05-13T13:34:47.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-09-08T14:30:19.000Z (5 months ago)
- Last Synced: 2024-09-08T16:35:22.456Z (5 months ago)
- Topics: ai, analytics, langchain-js, logging, openai
- Language: TypeScript
- Homepage: https://lunary.ai/docs/js
- Size: 840 KB
- Stars: 7
- Watchers: 1
- Forks: 1
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
![]()
Lunary JS SDK
**📈 JavaScript monitoring for AI apps and agent**
[website](https://lunary.ai) - [docs](https://lunary.ai/docs/js/) - [demo](https://app.lunary.ai/demo) - [![npm version](https://badge.fury.io/js/lunary.svg)](https://badge.fury.io/js/lunary)
---
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](https://lunary.ai).
## 🛠️ Installation
```bash
npm install lunary
```## 🚀 Basic Usage with OpenAI
```javascript
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](https://lunary.ai/docs/js).