File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed
backend/src/main/java/ch/xxx/aidoclibchat/adapter/config Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change 22
22
import org .springframework .context .annotation .Configuration ;
23
23
24
24
import ch .xxx .aidoclibchat .domain .client .OpenLibraryClient ;
25
+ import ch .xxx .aidoclibchat .domain .client .TmdbClient ;
25
26
26
27
@ Configuration
27
28
public class FunctionConfig {
28
29
private final OpenLibraryClient openLibraryClient ;
30
+ private final TmdbClient tmdbClient ;
29
31
public static final String OPEN_LIBRARY_CLIENT = "openLibraryClient" ;
32
+ public static final String THE_MOVIE_DATABASE_CLIENT = "theMovieDatabaseClient" ;
30
33
31
- public FunctionConfig (OpenLibraryClient openLibraryClient ) {
34
+ public FunctionConfig (OpenLibraryClient openLibraryClient , TmdbClient tmdbClient ) {
32
35
this .openLibraryClient = openLibraryClient ;
36
+ this .tmdbClient = tmdbClient ;
33
37
}
34
38
35
39
@ Bean (OPEN_LIBRARY_CLIENT )
36
40
@ Tool (description = "Search for books by author, title or subject." )
37
41
public Function <OpenLibraryClient .Request , OpenLibraryClient .Response > openLibraryClient () {
38
42
return this .openLibraryClient ::apply ;
39
43
}
44
+
45
+ @ Bean (THE_MOVIE_DATABASE_CLIENT )
46
+ @ Tool (description = "Search for movies by title." )
47
+ public Function <TmdbClient .Request , TmdbClient .Response > theMovieDatabaseClient () {
48
+ return this .tmdbClient ::apply ;
49
+ }
40
50
}
You can’t perform that action at this time.
0 commit comments