From 51ef09f4364dc6a2cde76efd3ade3ed8eac8206e Mon Sep 17 00:00:00 2001
From: darshit-s3 <119623510+darshit-s3@users.noreply.github.com>
Date: Mon, 1 Apr 2024 21:25:44 +0530
Subject: [PATCH] docs: add local setup instructions, cleanup files (#10)
---
.dockerignore | 4 +-
.env | 29 ++++
.github/workflows/build-cli.yaml | 40 ------
.github/workflows/build-image.yaml | 70 +++++-----
Dockerfile | 18 +--
README.md | 160 +++++++++++++++++++---
components/.gitignore | 36 -----
docker-compose.yaml | 65 +++++++++
lib/constants.ts | 2 +-
lib/services/trace_service.ts | 17 +--
package.json | 212 +++++++++++++++--------------
11 files changed, 392 insertions(+), 261 deletions(-)
create mode 100644 .env
delete mode 100644 .github/workflows/build-cli.yaml
delete mode 100644 components/.gitignore
create mode 100644 docker-compose.yaml
diff --git a/.dockerignore b/.dockerignore
index 9d52f7a4..5a7834f2 100644
--- a/.dockerignore
+++ b/.dockerignore
@@ -3,7 +3,9 @@ docker-compose.yml
docker-compose.yaml
.env
node_modules/
-cli/
.next/
.dockerignore
.gitignore
+.github/
+README.md
+SECURITY.md
diff --git a/.env b/.env
new file mode 100644
index 00000000..6fcf36da
--- /dev/null
+++ b/.env
@@ -0,0 +1,29 @@
+# Postgres Variables
+POSTGRES_HOST="langtrace-postgres:5432"
+POSTGRES_USER="ltuser"
+POSTGRES_PASSWORD="ltpasswd"
+POSTGRES_DATABASE="langtrace"
+POSTGRES_DB="${POSTGRES_DATABASE}"
+POSTGRES_URL="postgres://${POSTGRES_USER}:${POSTGRES_PASSWORD}@${POSTGRES_HOST}/${POSTGRES_DATABASE}"
+POSTGRES_PRISMA_URL="${POSTGRES_URL}?pgbouncer=true&connect_timeout=15"
+POSTGRES_URL_NO_SSL="${POSTGRES_URL}"
+POSTGRES_URL_NON_POOLING="${POSTGRES_URL}"
+
+# Application Variables
+NEXT_PUBLIC_APP_NAME="Langtrace"
+NEXT_PUBLIC_ENVIRONMENT="development"
+NEXT_PUBLIC_HOST="http://localhost:3000"
+NEXTAUTH_SECRET="difficultsecret"
+NEXTAUTH_URL="${NEXT_PUBLIC_HOST}"
+NEXTAUTH_URL_INTERNAL="${NEXT_PUBLIC_HOST}"
+
+# Clickhouse Variables
+CLICK_HOUSE_HOST="http://langtrace-clickhouse:8123"
+CLICK_HOUSE_USER="default"
+CLICK_HOUSE_PASSWORD=""
+CLICK_HOUSE_DATABASE_NAME="langtrace_dev"
+
+# Admin login
+ADMIN_EMAIL="admin@langtrace.ai"
+ADMIN_PASSWORD="langtraceadminpw"
+NEXT_PUBLIC_ENABLE_ADMIN_LOGIN="true"
diff --git a/.github/workflows/build-cli.yaml b/.github/workflows/build-cli.yaml
deleted file mode 100644
index d5d010c1..00000000
--- a/.github/workflows/build-cli.yaml
+++ /dev/null
@@ -1,40 +0,0 @@
-name: "Build Langtrace CLI"
-on:
- workflow_dispatch:
- inputs:
- RegistryEnv:
- type: environment
- description: "Select Env"
- required: true
-
-jobs:
- build:
- strategy:
- fail-fast: false
- matrix:
- os: [ubuntu-latest, windows-latest, macos-latest]
- runs-on: ${{ matrix.os }}
-
- steps:
- - name: GitHub Checkout
- uses: actions/checkout@v2
-
- - uses: actions/setup-python@v2
- with:
- python-version: 3.12
-
- - name: Install dependencies
- run: pip install -r requirements.txt pyinstaller
- working-directory: cli/
-
- - name: Build CLI for ${{ matrix.os }}
- run: pyinstaller --onefile fynetune-cli.py
- working-directory: cli/
-
- - name: Smoke test
- run: ./dist/fynetune-cli --version
- working-directory: cli/
-
- - uses: actions/upload-artifact@v2
- with:
- path: dist/*
diff --git a/.github/workflows/build-image.yaml b/.github/workflows/build-image.yaml
index c0fac23f..157e5781 100644
--- a/.github/workflows/build-image.yaml
+++ b/.github/workflows/build-image.yaml
@@ -1,47 +1,55 @@
name: "Build Docker Image"
+run-name: "Version: ${{ inputs.imageTag }} --> Latest: ${{ inputs.isLatest }}"
+
on:
workflow_dispatch:
inputs:
- RegistryEnv:
- type: environment
- description: "Select Env"
- required: true
imageTag:
- description: "Release version"
+ description: Release version
required: true
- default: "latest"
+ default: example
+ isLatest:
+ description: Is this the latest version?
+ type: boolean
+ required: true
+ default: false
jobs:
docker-build:
- environment: ${{ inputs.RegistryEnv }}
runs-on: ubuntu-latest
+ env:
+ DOCKER_REGISTRY: scale3labs/langtrace-client
steps:
- - name: "Github Checkout"
- uses: actions/checkout@v3
+ - name: Github Checkout
+ # v4.1.1
+ uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
- - name: "Login via Azure CLI"
- uses: azure/login@v1
+ - name: Log in to Docker Hub
+ # v3.1.0
+ uses: docker/login-action@e92390c5fb421da1463c202d546fed0ec5c39f20
with:
- creds: ${{ secrets.AZURE_CREDENTIALS }}
+ username: ${{ secrets.DOCKER_USERNAME }}
+ password: ${{ secrets.DOCKER_PASSWORD }}
- - name: "Build and push image"
- uses: azure/docker-login@v1
+ - name: Build and push Docker image with latest tag
+ # v5.3.0
+ uses: docker/build-push-action@2cdde995de11925a030ce8070c3d77a52ffcf1c0
with:
- login-server: ${{ vars.REGISTRY_LOGIN_SERVER }}
- username: ${{ vars.REGISTRY_USERNAME }}
- password: ${{ secrets.REGISTRY_PASSWORD }}
- - run: |
- docker build . -t ${{ vars.REGISTRY_LOGIN_SERVER }}/sampleapp:${{ vars.imageTag }}
- docker push ${{ vars.REGISTRY_LOGIN_SERVER }}/sampleapp:${{ vars.imageTag }}
+ context: .
+ file: ./Dockerfile
+ push: true
+ tags: |
+ ${{ env.DOCKER_REGISTRY }}:${{ inputs.imageTag }}
+ ${{ env.DOCKER_REGISTRY }}:latest
+ labels: ${{ inputs.imageTag }}
+ if: ${{ inputs.isLatest }}
- # - name: "Deploy to Azure Container Instances"
- # uses: "azure/aci-deploy@v1"
- # with:
- # resource-group: ${{ vars.RESOURCE_GROUP }}
- # dns-name-label: ${{ vars.RESOURCE_GROUP }}${{ github.run_number }}
- # image: ${{ vars.REGISTRY_LOGIN_SERVER }}/sampleapp:${{ github.sha }}
- # registry-login-server: ${{ vars.REGISTRY_LOGIN_SERVER }}
- # registry-username: ${{ vars.REGISTRY_USERNAME }}
- # registry-password: ${{ secrets.REGISTRY_PASSWORD }}
- # name: aci-sampleapp
- # location: "west us"
+ - name: Build and push Docker image without latest tag
+ # v5.3.0
+ uses: docker/build-push-action@2cdde995de11925a030ce8070c3d77a52ffcf1c0
+ with:
+ context: .
+ file: ./Dockerfile
+ push: true
+ tags: ${{ env.DOCKER_REGISTRY }}:${{ inputs.imageTag }}
+ if: ${{ !inputs.isLatest }}
diff --git a/Dockerfile b/Dockerfile
index 71e83520..151f223d 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -1,24 +1,10 @@
# Debian based node 21.6 image
-FROM node:21.6-bookworm as builder
+FROM node:21.6-bookworm
WORKDIR /app
COPY . .
RUN npm install
-RUN AZURE_OPENAI_API_KEY="" npm run build
-FROM node:21.6-alpine3.19
-
-WORKDIR /app
-
-# Copy only the necessary files
-COPY --from=builder /app/prisma ./prisma
-COPY --from=builder /app/.next ./.next
-COPY --from=builder /app/package.json .
-COPY --from=builder /app/prisma ./prisma
-
-# Install only production dependencies
-RUN npm install --only=production --omit=dev
-
-CMD ["npm", "start"]
+EXPOSE 3000
diff --git a/README.md b/README.md
index 5130fb66..3da27c99 100644
--- a/README.md
+++ b/README.md
@@ -1,6 +1,5 @@
# [Langtrace](https://www.langtrace.ai)
-
## Open Source & Open Telemetry(OTEL) Observability for LLM applications.
![Static Badge](https://img.shields.io/badge/License-AGPL--3.0-blue) ![Static Badge](https://img.shields.io/badge/npm_@langtrase/typescript--sdk-1.2.9-green) ![Static Badge](https://img.shields.io/badge/pip_langtrace--python--sdk-1.2.8-green) ![Static Badge](https://img.shields.io/badge/Development_status-Active-green)
@@ -18,15 +17,17 @@ The traces generated by Langtrace adhere to [Open Telemetry Standards(OTEL)](htt
## Getting Started
### Langtrace Cloud ☁️
+
To use the managed SaaS version of Langtrace, follow the steps below:
+
1. Sign up by going to [this link](www.langtrace.ai).
2. Create a new Project after signing up. Projects are containers for storing traces and metrics generated by your application. If you have only one application, creating 1 project will do.
3. Generate an API key by going inside the project.
4. In your application, install the Langtrace SDK and initialize it with the API key you generated in the step 3.
5. The code for installing and setting up the SDK is shown below:
-
If your application is built using **typescript/javascript**:
+
```
npm i @langtrase/typescript-sdk
```
@@ -36,8 +37,8 @@ import { init } from '@langtrace-init/init';
init({ api_key: process.env.LANGTRACE_API_KEY });
```
-
If your application is built using **python**:
+
```
pip install langtrace-python-sdk
```
@@ -49,21 +50,131 @@ langtrace.init(api_key=process.env.LANGTRACE_API_KEY)
### Langtrace self hosted
-Langtrace UI is built using [NextJS](https://nextjs.org/). To self-host and use langtrace, you can use our Docker container:
-```
-# Clone the repository
-git clone git@github.com:Scale3-Labs/langtrace.git
-cd langtrace
+To run the Langtrace locally, you have to run three services:
+
+- Next.js app
+- Postgres database
+- Clickhouse database
+
+Requirements:
+
+- Docker
+- Docker Compose
+
+#### The .env file
-# ⭐ Don't forget to star this repository ⭐
+Feel free to modify the `.env` file to suit your needs.
-# Run the application and the databases locally
+#### Starting the servers
+
+```bash
docker compose up
```
+The application will be available at `http://localhost:3000`.
+
+> [!NOTE]
+> if you wish to build the docker image locally and use it, run the docker compose up command with the `--build` flag.
+
+> [!TIP]
+> to manually pull the docker image from docker hub, run the following command:
+>
+> ```bash
+> docker pull scale3labs/langtrace-client:latest
+> ```
+
+#### Take down the setup
+
+````bash
+
+To delete containers and volumes
+
+```bash
+docker compose down -v
+````
+
+`-v` flag is used to delete volumes
+
+#### Useful Ops Commands
+
+The following are some commands that may come handy during setup and debugging.
+
+
+ Connecting to postgres db
+
+ ```bash
+ docker exec -it langtrace-postgres psql --dbname=langtrace --username=ltuser --password
+ ```
+
+
+
+
+ Connecting to clickhouse server
+
+ ```bash
+ docker exec -it langtrace-clickhouse clickhouse-client
+ ```
+
+
+
+ Checking langtrace client app logs
+
+ ```bash
+ docker logs langtrace
+ ```
+ If you want to follow the logs
+ ```bash
+ docker logs -f langtrace
+ ```
+
+
+
+ Running prisma schema apply command
+
+ ```bash
+ docker exec -it langtrace npm run create-tables
+ ```
+
+
+#### Common issues for local setup
+
+
+ Table not found error OR Column not found error
+ Its likely that schema is not applied to the database or the schema is not in sync with the database. To fix this, run the following command:
+
+ ```bash
+ docker exec -it langtrace npm run create-tables
+ ```
+
+
+
+ Prisma schema not in sync with database
+ If you have made changes to the prisma schema and want to apply the changes to the database, run the following command:
+
+ ```bash
+ docker exec -it langtrace npm run create-tables
+ ```
+
+
+
+ Docker compose failing to setup with `Additional property required is not allowed` errors
+ Its likely that you are using an older version of docker-compose. Update docker-compose to the latest version.
+
+ Certain docker compose schema used in this project are only supported in newer versions of docker-compose.
+
+Either you **update the docker compose version** OR **remove the depends_on property** that is causing the error.
+
+
+
+
+ Clickhouse server not starting
+ If clickhouse server is not starting, it is likely that the port 8123 is already in use. You can change the port in the docker-compose file.
+
+
Install the langtrace SDK in your application by following the same instructions under the Langtrace Cloud section above for sending traces to your self hosted setup.
---
+
## SDK Repositories
- [Langtrace Typescript SDK](https://github.com/Scale3-Labs/langtrace-typescript-sdk)
@@ -71,44 +182,51 @@ Install the langtrace SDK in your application by following the same instructions
- [Semantic Span Attributes](https://github.com/Scale3-Labs/langtrace-trace-attributes)
---
+
## Supported integrations
Langtrace automatically captures traces from the following vendors:
-| Vendor | Type | Typescript SDK | Python SDK
-| ------ | ------ | ------ | ------ |
-| OpenAI | LLM | :white_check_mark: | :white_check_mark: |
-| Anthropic | LLM | :white_check_mark: | :white_check_mark: |
-| Azure OpenAI | LLM | :white_check_mark: | :white_check_mark: |
-| Langchain | Framework | :x: | :white_check_mark: |
-| LlamaIndex | Framework | :white_check_mark: | :white_check_mark: |
-| Pinecone | Vector Database | :white_check_mark: | :white_check_mark: |
-| ChromaDB | Vector Database | :white_check_mark: | :white_check_mark: |
+| Vendor | Type | Typescript SDK | Python SDK |
+| ------------ | --------------- | ------------------ | ------------------ |
+| OpenAI | LLM | :white_check_mark: | :white_check_mark: |
+| Anthropic | LLM | :white_check_mark: | :white_check_mark: |
+| Azure OpenAI | LLM | :white_check_mark: | :white_check_mark: |
+| Langchain | Framework | :x: | :white_check_mark: |
+| LlamaIndex | Framework | :white_check_mark: | :white_check_mark: |
+| Pinecone | Vector Database | :white_check_mark: | :white_check_mark: |
+| ChromaDB | Vector Database | :white_check_mark: | :white_check_mark: |
---
+
## Feature Requests and Issues
+
- To request for features, head over [here to start a discussion](https://github.com/Scale3-Labs/langtrace/discussions/categories/feature-requests).
- To raise an issue, head over [here and create an issue](https://github.com/Scale3-Labs/langtrace/issues).
-
---
+
## Contributions
We welcome contributions to this project. To get started, fork this repository and start developing. To get involved, join our Slack workspace.
---
+
## Security
To report security vulnerabilites, email us at security@scale3labs.com. You can read more on security [here](https://github.com/Scale3-Labs/langtrace/blob/development/SECURITY.md).
---
+
## License
- Langtrace application(this repository) is [licensed](https://github.com/Scale3-Labs/langtrace/blob/development/LICENSE) under the AGPL 3.0 License. You can read about this license [here](https://www.gnu.org/licenses/agpl-3.0.en.html).
- Langtrace SDKs are licensed under the Apache 2.0 License. You can read about this license [here](https://www.apache.org/licenses/LICENSE-2.0).
---
+
## Frequently Asked Questions
+
**1. Can I self host and run Langtrace in my own cloud?**
Yes, you can absolutely do that. Follow the self hosting setup instructions laid out above.
@@ -125,4 +243,4 @@ Absolutely! We love developers and welcome contributions. Get involved early by
Programming Languages: Typescript and Python.
Framework knowledge: NextJS.
Database: Postgres and Prisma ORM.
-Nice to haves: Opentelemetry instrumentation framework, experience with distributed tracing.
\ No newline at end of file
+Nice to haves: Opentelemetry instrumentation framework, experience with distributed tracing.
diff --git a/components/.gitignore b/components/.gitignore
deleted file mode 100644
index fd3dbb57..00000000
--- a/components/.gitignore
+++ /dev/null
@@ -1,36 +0,0 @@
-# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
-
-# dependencies
-/node_modules
-/.pnp
-.pnp.js
-.yarn/install-state.gz
-
-# testing
-/coverage
-
-# next.js
-/.next/
-/out/
-
-# production
-/build
-
-# misc
-.DS_Store
-*.pem
-
-# debug
-npm-debug.log*
-yarn-debug.log*
-yarn-error.log*
-
-# local env files
-.env*.local
-
-# vercel
-.vercel
-
-# typescript
-*.tsbuildinfo
-next-env.d.ts
diff --git a/docker-compose.yaml b/docker-compose.yaml
new file mode 100644
index 00000000..a7447299
--- /dev/null
+++ b/docker-compose.yaml
@@ -0,0 +1,65 @@
+version: "3.8"
+
+services:
+ langtrace-app:
+ container_name: langtrace
+ image: scale3labs/langtrace-client:latest
+ build:
+ context: .
+ dockerfile: Dockerfile
+ working_dir: /app
+ env_file:
+ - .env
+ command: /bin/sh -c "npm run create-tables && npm run dev"
+ ports:
+ - "3000:3000"
+ # Uncmment this for development
+ # volumes:
+ # - .:/app
+ depends_on:
+ postgres-db:
+ condition: service_started
+ required: true
+ clickhouse-init:
+ condition: service_completed_successfully
+ required: true
+
+ postgres-db:
+ container_name: langtrace-postgres
+ image: postgres:16.2-bookworm
+ env_file:
+ - .env
+ ports:
+ - "5432:5432"
+ volumes:
+ - postgres-data:/var/lib/postgresql/data
+
+ clickhouse-db:
+ container_name: langtrace-clickhouse
+ image: clickhouse/clickhouse-server:23.3.20.27-alpine
+ ports:
+ - "8123:8123"
+ - "9000:9000"
+ healthcheck:
+ test: wget --no-verbose --tries=1 --spider http://localhost:8123/ping || exit 1
+ retries: 3
+ start_period: 30s
+ start_interval: 5s
+ interval: 1m
+ volumes:
+ - clickhouse-data:/var/lib/clickhouse
+
+ clickhouse-init:
+ container_name: langtrace-clickhouse-init
+ image: clickhouse/clickhouse-server:23.3.20.27-alpine
+ env_file:
+ - .env
+ depends_on:
+ clickhouse-db:
+ condition: service_healthy
+ required: true
+ command: clickhouse-client --host langtrace-clickhouse --query 'CREATE DATABASE IF NOT EXISTS $CLICK_HOUSE_DATABASE_NAME;'
+
+volumes:
+ postgres-data:
+ clickhouse-data:
diff --git a/lib/constants.ts b/lib/constants.ts
index b2d1359f..7c3b8979 100644
--- a/lib/constants.ts
+++ b/lib/constants.ts
@@ -39,7 +39,7 @@ export type LangTraceAttributes = LLMSpanAttributes &
export type SpanStatusCode = "UNSET" | "OK" | "ERROR";
export const CLICK_HOUSE_CONSTANTS = {
- database: "langtrace_dev",
+ database: process.env.CLICK_HOUSE_DATABASE_NAME,
};
// cost per 1000 tokens
diff --git a/lib/services/trace_service.ts b/lib/services/trace_service.ts
index eb1c1534..a251d563 100644
--- a/lib/services/trace_service.ts
+++ b/lib/services/trace_service.ts
@@ -229,8 +229,7 @@ export class TraceService implements ITraceService {
throw Error("Page number is greater than total pages");
}
const query = sql.select(
- `* FROM ${project_id} WHERE attributes LIKE '%${attribute}%' ORDER BY 'start_time' DESC LIMIT ${pageSize} OFFSET ${
- (page - 1) * pageSize
+ `* FROM ${project_id} WHERE attributes LIKE '%${attribute}%' ORDER BY 'start_time' DESC LIMIT ${pageSize} OFFSET ${(page - 1) * pageSize
};`
);
let spans: Span[] = await this.client.find(query);
@@ -303,8 +302,7 @@ export class TraceService implements ITraceService {
throw Error("Page number is greater than total pages");
}
const query = sql.select(
- `* FROM ${project_id} ORDER BY 'createdAt' DESC LIMIT ${pageSize} OFFSET ${
- (page - 1) * pageSize
+ `* FROM ${project_id} ORDER BY 'createdAt' DESC LIMIT ${pageSize} OFFSET ${(page - 1) * pageSize
};`
);
@@ -344,8 +342,7 @@ export class TraceService implements ITraceService {
const md = { page, page_size: pageSize, total_pages: totalPages };
// get all spans grouped by trace_id and sort by start_time in descending order
const query = sql.select(
- `trace_id, MIN(start_time) AS earliest_start_time FROM ${project_id} GROUP BY trace_id ORDER BY earliest_start_time DESC LIMIT ${pageSize} OFFSET ${
- (page - 1) * pageSize
+ `trace_id, MIN(start_time) AS earliest_start_time FROM ${project_id} GROUP BY trace_id ORDER BY earliest_start_time DESC LIMIT ${pageSize} OFFSET ${(page - 1) * pageSize
};`
);
const spans: Span[] = await this.client.find(query);
@@ -485,16 +482,16 @@ export class TraceService implements ITraceService {
"input_tokens" in llmTokenCounts
? llmTokenCounts.input_tokens
: "prompt_tokens" in llmTokenCounts
- ? llmTokenCounts.prompt_tokens
- : 0;
+ ? llmTokenCounts.prompt_tokens
+ : 0;
inputTokens += input_token_count;
const output_token_count =
"output_tokens" in llmTokenCounts
? llmTokenCounts.output_tokens
: "completion_tokens" in llmTokenCounts
- ? llmTokenCounts.completion_tokens
- : 0;
+ ? llmTokenCounts.completion_tokens
+ : 0;
outputTokens += output_token_count;
});
return {
diff --git a/package.json b/package.json
index 5d78f6c2..9e9f6758 100644
--- a/package.json
+++ b/package.json
@@ -1,107 +1,109 @@
{
- "name": "langtrace",
- "version": "0.1.0",
- "private": true,
- "scripts": {
- "dev": "next dev",
- "build": "prisma generate && next build",
- "start": "next start",
- "lint": "next lint"
- },
- "dependencies": {
- "@azure/arm-resources": "^5.2.0",
- "@azure/identity": "^4.0.1",
- "@azure/openai": "^1.0.0-beta.11",
- "@azure/search-documents": "^12.0.0",
- "@azure/storage-blob": "^12.17.0",
- "@clickhouse/client": "^0.2.10",
- "@headlessui/react": "^1.7.18",
- "@headlessui/tailwindcss": "^0.2.0",
- "@hookform/resolvers": "^3.3.4",
- "@langchain/community": "^0.0.30",
- "@langtrase/trace-attributes": "^1.0.33",
- "@mui/icons-material": "^5.15.14",
- "@mui/material": "^5.15.14",
- "@mui/x-tree-view": "^6.17.0",
- "@next-auth/prisma-adapter": "^1.0.7",
- "@prisma/client": "^5.9.1",
- "@radix-ui/react-alert-dialog": "^1.0.5",
- "@radix-ui/react-checkbox": "^1.0.4",
- "@radix-ui/react-dialog": "^1.0.5",
- "@radix-ui/react-dropdown-menu": "^2.0.6",
- "@radix-ui/react-icons": "^1.3.0",
- "@radix-ui/react-label": "^2.0.2",
- "@radix-ui/react-popover": "^1.0.7",
- "@radix-ui/react-select": "^2.0.0",
- "@radix-ui/react-separator": "^1.0.3",
- "@radix-ui/react-slot": "^1.0.2",
- "@radix-ui/react-switch": "^1.0.3",
- "@remixicon/react": "^4.2.0",
- "@tanstack/react-query": "^5.17.10",
- "@tremor/react": "^3.14.1",
- "@vercel/analytics": "^1.2.2",
- "ai": "^2.2.35",
- "axios": "^1.6.7",
- "class-variance-authority": "^0.7.0",
- "clickhouse": "^2.6.0",
- "clsx": "^2.1.0",
- "cmdk": "^0.2.0",
- "crypto": "^1.0.1",
- "d3-dsv": "^2.0.0",
- "date-fns": "^3.3.1",
- "f": "^1.4.0",
- "framer-motion": "^11.0.5",
- "fs": "^0.0.1-security",
- "js-tiktoken": "^1.0.10",
- "langchain": "^0.1.20",
- "lucide-react": "^0.323.0",
- "mammoth": "^1.7.0",
- "markdown-it": "^14.0.0",
- "next": "14.1.0",
- "next-auth": "^4.24.5",
- "next-themes": "^0.2.1",
- "openai": "^4.26.0",
- "pdf-parse": "^1.1.1",
- "prism": "^4.1.2",
- "prismjs": "^1.29.0",
- "react": "^18",
- "react-copy-to-clipboard": "^5.1.0",
- "react-day-picker": "^8.10.0",
- "react-dom": "^18",
- "react-hook-form": "^7.49.3",
- "react-markdown": "^9.0.1",
- "react-query": "^3.39.3",
- "react-syntax-highlighter": "^15.5.0",
- "shiki-processor": "^0.1.3",
- "sonner": "^1.3.1",
- "sql-bricks": "^3.0.1",
- "stream-to-array": "^2.3.0",
- "tailwind-merge": "^2.2.1",
- "tailwindcss-animate": "^1.0.7",
- "zod": "^3.22.4"
- },
- "devDependencies": {
- "@radix-ui/react-radio-group": "^1.1.3",
- "@tailwindcss/forms": "^0.5.7",
- "@types/formidable": "^3.4.5",
- "@types/markdown-it": "^13.0.7",
- "@types/node": "^20.11.10",
- "@types/node-fetch": "^2.6.11",
- "@types/react": "^18",
- "@types/react-copy-to-clipboard": "^5.0.7",
- "@types/react-dom": "^18",
- "@types/react-syntax-highlighter": "^15.5.11",
- "@types/stream-to-array": "^2.3.3",
- "autoprefixer": "^10.4.17",
- "eslint": "^8",
- "eslint-config-next": "14.1.0",
- "postcss": "^8.4.33",
- "prisma": "^5.8.1",
- "tailwindcss": "^3.4.1",
- "ts-node": "^10.9.2",
- "typescript": "^5"
- },
- "browser": {
- "crypto": false
- }
+ "name": "langtrace",
+ "version": "0.1.0",
+ "private": true,
+ "scripts": {
+ "dev": "next dev",
+ "build": "prisma generate && next build",
+ "create-tables": "npx prisma db push",
+ "seed-db": "npx prisma db seed",
+ "start": "next start",
+ "lint": "next lint"
+ },
+ "dependencies": {
+ "@azure/arm-resources": "^5.2.0",
+ "@azure/identity": "^4.0.1",
+ "@azure/openai": "^1.0.0-beta.11",
+ "@azure/search-documents": "^12.0.0",
+ "@azure/storage-blob": "^12.17.0",
+ "@clickhouse/client": "^0.2.10",
+ "@headlessui/react": "^1.7.18",
+ "@headlessui/tailwindcss": "^0.2.0",
+ "@hookform/resolvers": "^3.3.4",
+ "@langchain/community": "^0.0.30",
+ "@langtrase/trace-attributes": "^1.0.33",
+ "@mui/icons-material": "^5.15.14",
+ "@mui/material": "^5.15.14",
+ "@mui/x-tree-view": "^6.17.0",
+ "@next-auth/prisma-adapter": "^1.0.7",
+ "@prisma/client": "^5.9.1",
+ "@radix-ui/react-alert-dialog": "^1.0.5",
+ "@radix-ui/react-checkbox": "^1.0.4",
+ "@radix-ui/react-dialog": "^1.0.5",
+ "@radix-ui/react-dropdown-menu": "^2.0.6",
+ "@radix-ui/react-icons": "^1.3.0",
+ "@radix-ui/react-label": "^2.0.2",
+ "@radix-ui/react-popover": "^1.0.7",
+ "@radix-ui/react-select": "^2.0.0",
+ "@radix-ui/react-separator": "^1.0.3",
+ "@radix-ui/react-slot": "^1.0.2",
+ "@radix-ui/react-switch": "^1.0.3",
+ "@remixicon/react": "^4.2.0",
+ "@tanstack/react-query": "^5.17.10",
+ "@tremor/react": "^3.14.1",
+ "@vercel/analytics": "^1.2.2",
+ "ai": "^2.2.35",
+ "axios": "^1.6.7",
+ "class-variance-authority": "^0.7.0",
+ "clickhouse": "^2.6.0",
+ "clsx": "^2.1.0",
+ "cmdk": "^0.2.0",
+ "crypto": "^1.0.1",
+ "d3-dsv": "^2.0.0",
+ "date-fns": "^3.3.1",
+ "f": "^1.4.0",
+ "framer-motion": "^11.0.5",
+ "fs": "^0.0.1-security",
+ "js-tiktoken": "^1.0.10",
+ "langchain": "^0.1.20",
+ "lucide-react": "^0.323.0",
+ "mammoth": "^1.7.0",
+ "markdown-it": "^14.0.0",
+ "next": "14.1.0",
+ "next-auth": "^4.24.5",
+ "next-themes": "^0.2.1",
+ "openai": "^4.26.0",
+ "pdf-parse": "^1.1.1",
+ "prism": "^4.1.2",
+ "prismjs": "^1.29.0",
+ "react": "^18",
+ "react-copy-to-clipboard": "^5.1.0",
+ "react-day-picker": "^8.10.0",
+ "react-dom": "^18",
+ "react-hook-form": "^7.49.3",
+ "react-markdown": "^9.0.1",
+ "react-query": "^3.39.3",
+ "react-syntax-highlighter": "^15.5.0",
+ "shiki-processor": "^0.1.3",
+ "sonner": "^1.3.1",
+ "sql-bricks": "^3.0.1",
+ "stream-to-array": "^2.3.0",
+ "tailwind-merge": "^2.2.1",
+ "tailwindcss-animate": "^1.0.7",
+ "zod": "^3.22.4"
+ },
+ "devDependencies": {
+ "@radix-ui/react-radio-group": "^1.1.3",
+ "@tailwindcss/forms": "^0.5.7",
+ "@types/formidable": "^3.4.5",
+ "@types/markdown-it": "^13.0.7",
+ "@types/node": "^20.11.10",
+ "@types/node-fetch": "^2.6.11",
+ "@types/react": "^18",
+ "@types/react-copy-to-clipboard": "^5.0.7",
+ "@types/react-dom": "^18",
+ "@types/react-syntax-highlighter": "^15.5.11",
+ "@types/stream-to-array": "^2.3.3",
+ "autoprefixer": "^10.4.17",
+ "eslint": "^8",
+ "eslint-config-next": "14.1.0",
+ "postcss": "^8.4.33",
+ "prisma": "^5.8.1",
+ "tailwindcss": "^3.4.1",
+ "ts-node": "^10.9.2",
+ "typescript": "^5"
+ },
+ "browser": {
+ "crypto": false
+ }
}