diff --git a/docker-compose.full.local.yml b/docker-compose.full.local.yml index f1e025c..53b7ca7 100644 --- a/docker-compose.full.local.yml +++ b/docker-compose.full.local.yml @@ -3,17 +3,11 @@ services: langtrace-ui: build: dockerfile: Dockerfile.ui - args: - LANGTRACE_API_URL: http://langtrace-api:1994 - NEXTAUTH_ENABLED: true - NEXTAUTH_URL: http://langtrace-ui:3000 - NEXTAUTH_SECRET: secret - NEXTAUTH_GITHUB_ID: id - NEXTAUTH_GITHUB_SECRET: secret - NEXTAUTH_GITHUB_ORGANISATION: organisation image: langtrace-ui:local ports: - "3000:3000" + env_file: + - ./packages/ui/.env.docker depends_on: - langtrace-api diff --git a/packages/ingest/src/repositories/mongodb-repository.ts b/packages/ingest/src/repositories/mongodb-repository.ts index 8467efb..d284491 100644 --- a/packages/ingest/src/repositories/mongodb-repository.ts +++ b/packages/ingest/src/repositories/mongodb-repository.ts @@ -25,11 +25,11 @@ export class MongodbRepository { async updateTrace(langtraceId: string, updateData: TraceData): Promise { const collection = this.db.collection(this.collectionName); - return collection.updateOne({ run_id: { $eq: langtraceId } }, { $set: { updateData } }); + return collection.updateOne({ run_id: { $eq: langtraceId } }, { $set: { ...updateData } }); } async insertFeedbackOnTraceByRunId(feedback: CreateFeedback) { - const collection = this.db.collection('traces'); + const collection = this.db.collection(this.collectionName); await collection.updateOne({ run_id: { $eq: feedback.run_id } }, { $set: { feedback } }); } @@ -37,7 +37,7 @@ export class MongodbRepository { feedbackId: string, feedbackData: UpdateFeedback): Promise { - const collection = this.db.collection('traces'); + const collection = this.db.collection(this.collectionName); const setOperation: Record = {}; for (const [key, value] of Object.entries(feedbackData)) { diff --git a/packages/ui/package.json b/packages/ui/package.json index c7d8642..b57b7ee 100644 --- a/packages/ui/package.json +++ b/packages/ui/package.json @@ -4,7 +4,7 @@ "private": true, "license": "GPL-3.0", "scripts": { - "dev": "next dev", + "dev": "next dev --turbo", "build": "next build", "start": "next start", "lint": "next lint", diff --git a/packages/ui/src/services/projects-service.ts b/packages/ui/src/services/projects-service.ts index dea3944..b8cf214 100644 --- a/packages/ui/src/services/projects-service.ts +++ b/packages/ui/src/services/projects-service.ts @@ -6,6 +6,7 @@ export async function getProjects(): Promise { const response = await fetch(`${config.langtraceApiUrl}/langtrace/api/projects`); if (!response.ok) { + console.error(response); throw new Error('Network response was not ok'); } const data = await response.json();