Skip to content

Commit

Permalink
Add License
Browse files Browse the repository at this point in the history
  • Loading branch information
Vince Lwt committed Jul 29, 2023
1 parent 7deca60 commit 4110709
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 20 deletions.
24 changes: 11 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<div align="center">

# 🤖 LLMonitor
# ![](https://llmonitor.com/logo.png | width=50) LLMonitor

**Monitoring for <span style="background-color: rgb(219, 234, 254);">AI apps and agent</span>**
**Monitoring for AI apps and agent**

[website](https://llmonitor.com) - [docs](https://llmonitor.com/docs) - [demo](https://app.llmonitor.com/demo) - [![npm version](https://badge.fury.io/js/llmonitor.svg)](https://badge.fury.io/js/llmonitor)

Expand All @@ -23,15 +23,13 @@ Currently, a [JS client](https://github.com/llmonitor/llmonitor-js) is available

## Todo

- [x] Analytics dashboard
- [ ] Demo dashboard
- [ ] Agent debugger
- [ ] Add search on agent and LLM pages
- [ ] Update `setup-dump.sql` to latest
- [ ] Users support
- [ ] Embedding models analytics
- [ ] Tools views
- [ ] Agents alert
- [x] Sidebar layout
- [x] Agent view
- [x] Generations view
- [ ] Search on agent and LLM pages
- [ ] Date filtering on agent and LLM pages
- [ ] Users Tracking
- [ ] Embeddings analytics
- [ ] Tools views

## License

This project is licensed under the Apache 2.0 License.
13 changes: 12 additions & 1 deletion components/StatusBadge.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,19 @@
import { Badge, ThemeIcon } from "@mantine/core"
import { IconCheck, IconCross, IconX } from "@tabler/icons-react"

const getColor = (status) => {
switch (status) {
case "success":
return "green"
case "error":
return "red"
default:
return "blue"
}
}

export default function StatusBadge({ status, minimal = false }) {
const color = status === "success" ? "green" : "red"
const color = getColor(status)

if (minimal)
return (
Expand Down
17 changes: 11 additions & 6 deletions pages/api/report.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,15 @@ export interface Event {
// convo?: string
timestamp: string
input?: any
tags?: string[]
name?: string
output?: any
message?: string
extra?: any
promptTokens?: number
completionTokens?: number
tokensUsage?: {
prompt: number
completion: number
}
error?: {
message: string
stack?: string
Expand Down Expand Up @@ -51,10 +54,10 @@ const registerRunEvent = async (event: Event): Promise<void> => {
runId,
parentRunId,
input,
tags,
output,
name,
promptTokens,
completionTokens,
tokensUsage,
extra,
error,
} = event
Expand All @@ -69,7 +72,9 @@ const registerRunEvent = async (event: Event): Promise<void> => {
id: runId,
created_at: timestamp,
app,
tags: tags.length ? tags : null,
name,
status: "started",
params: extra,
parent_run: parentRunId,
input,
Expand All @@ -84,8 +89,8 @@ const registerRunEvent = async (event: Event): Promise<void> => {
ended_at: timestamp,
output,
status: "success",
prompt_tokens: promptTokens,
completion_tokens: completionTokens,
prompt_tokens: tokensUsage?.prompt,
completion_tokens: tokensUsage?.completion,
})
.match({ id: runId })

Expand Down

1 comment on commit 4110709

@vercel
Copy link

@vercel vercel bot commented on 4110709 Jul 29, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.