Skip to content

Commit

Permalink
feat: support conversation message feedbacks (#144)
Browse files Browse the repository at this point in the history
* feat: support record feedbacks

* revert dep

* fix

* add test api

* update

* fix

* fix staled
  • Loading branch information
634750802 committed May 29, 2024
1 parent 3f0a400 commit e1b4792
Show file tree
Hide file tree
Showing 16 changed files with 586 additions and 221 deletions.
16 changes: 16 additions & 0 deletions ddl/2-feedback.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
DROP TABLE knowledge_graph_feedback;

CREATE TABLE knowledge_graph_feedback
(
id INTEGER NOT NULL AUTO_INCREMENT,
trace_id BINARY(16) NOT NULL COMMENT 'Langfuse trace ID (UUID)',
detail JSON NOT NULL COMMENT 'Map, key is source URL, value is `like` or `dislike`.',
comment TEXT NOT NULL COMMENT 'Comments from user',
created_by VARCHAR(32) NOT NULL COMMENT 'User id',
created_at DATETIME NOT NULL COMMENT 'User submit feedback at',
reported_at DATETIME NULL COMMENT 'Reported to graph.tidb.ai',
report_error VARCHAR(512) NULL COMMENT 'Report failure reason if reporting failed.',
PRIMARY KEY (id),
UNIQUE INDEX (trace_id, created_by),
INDEX (created_at, reported_at)
);
8 changes: 5 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
"mime": "^4.0.1",
"mysql2": "^3.7.1",
"nanoid": "^5.0.4",
"next": "14.2.1",
"next": "14.2.3",
"next-auth": "5.0.0-beta.5",
"openai": "^4.25.0",
"path-to-regexp": "^6.2.2",
Expand Down Expand Up @@ -128,7 +128,7 @@
"autoprefixer": "^10.0.1",
"client-zip": "^2.4.4",
"eslint": "^8",
"eslint-config-next": "14.2.1",
"eslint-config-next": "14.2.3",
"is-hotkey": "^0.2.0",
"kysely-codegen": "^0.11.0",
"lodash": "^4.17.21",
Expand All @@ -144,7 +144,9 @@
"rehype-react": "^8.0.0",
"swr": "^2.2.4",
"tailwindcss": "^3.3.0",
"typescript": "^5"
"typescript": "^5",
"unist-util-is": "^6.0.0",
"unist-util-visit": "^5.0.0"
},
"packageManager": "[email protected]",
"pnpm": {
Expand Down
Loading

0 comments on commit e1b4792

Please sign in to comment.