Skip to content

Commit

Permalink
Add AI summary data
Browse files Browse the repository at this point in the history
  • Loading branch information
mmahdigh committed Sep 28, 2024
1 parent cf21469 commit e2a8bef
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
/certs
/src/project-reading
# /src/rpgf5-data-import
/src/ai-summary

# Envs

Expand Down
2 changes: 2 additions & 0 deletions prisma/migrations/20240928110832_/migration.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
-- AlterTable
ALTER TABLE "Project" ADD COLUMN "ai_summary" TEXT;
3 changes: 2 additions & 1 deletion prisma/schema.prisma
Original file line number Diff line number Diff line change
Expand Up @@ -62,12 +62,13 @@ model Project {
pollId Int @map("poll_id")
url String?
description String
implicitCategory String? @map("implicit-category")
implicitCategory String? @map("implicit-category")
shortDescription String? @map("short_description")
RPGF5Id String? @map("rpgf4_id")
parentId Int? @map("parent_id")
image String?
metadata String
aiSummary String? @map("ai_summary")
createdAt DateTime @default(now()) @map("created_at")
parent Project? @relation("ParentRelation", fields: [parentId], references: [id])
children Project[] @relation("ParentRelation")
Expand Down
1 change: 1 addition & 0 deletions src/flow/flow.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -817,6 +817,7 @@ export class FlowService {
pair.map(async (project) => ({
...project,
metadata: JSON.parse(project.metadata),
aiSummary: JSON.parse(project.aiSummary!),
rating: await this.getProjectStars(project.id, userId),
})),
),
Expand Down

0 comments on commit e2a8bef

Please sign in to comment.