File tree Expand file tree Collapse file tree 3 files changed +5
-0
lines changed Expand file tree Collapse file tree 3 files changed +5
-0
lines changed Original file line number Diff line number Diff line change 1
1
import { collections } from "$lib/server/database" ;
2
2
import { authCondition } from "$lib/server/auth" ;
3
3
import { z } from "zod" ;
4
+ import { models } from "$lib/server/models" ;
4
5
import { ObjectId } from "mongodb" ;
5
6
6
7
export async function GET ( { locals, params } ) {
@@ -29,6 +30,7 @@ export async function GET({ locals, params }) {
29
30
webSearch : message . webSearch ,
30
31
files : message . files ,
31
32
} ) ) ,
33
+ modelTools : models . find ( ( m ) => m . id == conv . model ) ?. tools ?? false ,
32
34
} ;
33
35
return Response . json ( res ) ;
34
36
} else {
Original file line number Diff line number Diff line change 1
1
import { collections } from "$lib/server/database" ;
2
+ import { models } from "$lib/server/models" ;
2
3
import { authCondition } from "$lib/server/auth" ;
3
4
import type { Conversation } from "$lib/types/Conversation" ;
4
5
@@ -29,6 +30,7 @@ export async function GET({ locals, url }) {
29
30
updatedAt : conv . updatedAt ,
30
31
modelId : conv . model ,
31
32
assistantId : conv . assistantId ,
33
+ modelTools : models . find ( ( m ) => m . id == conv . model ) ?. tools ?? false ,
32
34
} ) ) ;
33
35
34
36
return Response . json ( res ) ;
Original file line number Diff line number Diff line change @@ -18,6 +18,7 @@ export async function GET() {
18
18
preprompt : model . preprompt ?? "" ,
19
19
multimodal : model . multimodal ?? false ,
20
20
unlisted : model . unlisted ?? false ,
21
+ tools : model . tools ?? false ,
21
22
} ) ) ;
22
23
return Response . json ( res ) ;
23
24
}
You can’t perform that action at this time.
0 commit comments