File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -8,21 +8,14 @@ import { ChatMessage } from '../models/chat.model';
88 * @returns Array of chat conversations
99 */
1010async function getChatDocument ( id : string ) {
11- try {
12- const res = await chatDB . get ( id ) as DbDoc ;
13- return {
14- 'conversations' : res . conversations ,
15- 'title' : res . title ,
16- 'createdDate' : res . createdDate ,
17- 'aiProvider' : res . aiProvider
18- } ;
19- // Should return user, team data as well particularly for the "/conversations" endpoint
20- } catch ( error ) {
21- return {
22- 'conversations' : [ ] ,
23- 'title' : ''
24- } ;
25- }
11+ const res = await chatDB . get ( id ) as DbDoc ;
12+ return {
13+ 'conversations' : res . conversations ,
14+ 'title' : res . title ,
15+ 'createdDate' : res . createdDate ,
16+ 'aiProvider' : res . aiProvider
17+ } ;
18+ // Should return user, team data as well particularly for the "/conversations" endpoint
2619}
2720
2821export async function retrieveChatHistory ( dbData : any , messages : ChatMessage [ ] ) {
You can’t perform that action at this time.
0 commit comments