# log10js

> ⚡ Unified LLM data management ⚡

Latest version **0.0.3** (published 2023-05-03) · MIT license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install log10js
pnpm add log10js
yarn add log10js
bun add log10js
```

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 0.0.3 |
| Published | 2023-05-03 |
| First published | 2023-05-03 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 7 |
| Unpacked size | 11.1 KB |
| Known vulnerabilities | 0 (+2 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 11 |
| Author | team@log10.io |
| Maintainers | nqnielsen |
| Keywords | OpenAI, LLMs, Tracing, LangChain |

## Links

- npm: https://www.npmjs.com/package/log10js
- Repository: https://github.com/log10-io/log10js
- Homepage: https://github.com/log10-io/log10js#readme
- Issues: https://github.com/log10-io/log10js/issues
- npm.io page: https://npm.io/package/log10js

## Dependencies (7)

- [axios](https://npm.io/package/axios.md) ^1.3.6
- [dotenv](https://npm.io/package/dotenv.md) ^16.0.3
- [openai](https://npm.io/package/openai.md) ^3.2.1
- [loglevel](https://npm.io/package/loglevel.md) ^1.8.1
- [langchain](https://npm.io/package/langchain.md) ^0.0.66
- [perf_hooks](https://npm.io/package/perf_hooks.md) ^0.0.1
- [stack-trace](https://npm.io/package/stack-trace.md) ^1.0.0-pre2

## Recent versions

- 0.0.3 (latest) — 2023-05-03
- 0.0.2 — 2023-05-03
- 0.0.1 — 2023-05-03

## README

# log10

⚡ Unified LLM data management ⚡

<!-- [![pypi](https://github.com/log10-io/log10/actions/workflows/release.yml/badge.svg)](https://github.com/log10-io/log10/actions/workflows/release.yml) -->
[![](https://dcbadge.vercel.app/api/server/CZQvnuRV94?compact=true&style=flat)](https://discord.gg/CZQvnuRV94)

## Quick Install

``` bash
npm install log10js
yarn add log10js
```

## 🤔 What is this?

A JavaScript integration to manage your LLM data.

```javascript
const { Configuration, OpenAIApi } = require("openai");
const log10 = require("log10js");

const configuration = new Configuration({
  apiKey: process.env.OPENAI_API_KEY,
});

const log10_OpenAIApi = log10(OpenAIApi);
const openai = new log10_OpenAIApi(configuration);
```

Access your LLM data at [log10.io](https://log10.io)

[See full example](./examples/completions.js)


## 🚀 What can this help with?

**🔍🐞 Prompt chain debugging**

Prompt chains such as those in [Langchain](https://github.com/hwchase17/langchain) can be difficult to debug. Log10 provides prompt provenance, session tracking and call stack functionality to help debug chains.

```javascript
const { OpenAI } = require("langchain/llms/openai");
const { Configuration, OpenAIApi } = require("openai");
const log10 = require("log10js");

const log10_OpenAIApi = log10(OpenAIApi);
const openai = new log10_OpenAIApi(
  new Configuration({
    apiKey: process.env.OPENAI_API_KEY,
  })
);
let model = new OpenAI();
model.client = openai;

// Run any chain here...
```

[See full example](./examples/langchain_summarize.js)

**📝📊 Logging**

Log all your OpenAI calls to compare and find the best prompts, store feedback, collect latency and usage metrics, and perform analytics and compliance monitoring of LLM powered features.

**🧠🔁 Readiness for RLHF & self hosting**

Use your data and feedback from users to fine-tune custom models with RLHF with the option of building and deploying more reliable, accurate and efficient self-hosted models. 

**👥🤝 Collaboration**

Create flexible groups to share and collaborate over all of the above features

## ⚙️ Setup

Create a free account at [log10.io](https://log10.io) to get a `LOG10_TOKEN` and a `LOG10_ORG_ID`. Please add these to your environment along with `LOG10_URL=https://log10.io`. 

## 💬 Community

We welcome community participation and feedback. Please leave an issue, submit a PR or join our [Discord](https://discord.gg/CZQvnuRV94).

---
_Source: https://npm.io/package/log10js · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
