|
5 | 5 |
|
6 | 6 | package ch.xxx.aidoclibchat.domain.client;
|
7 | 7 |
|
| 8 | +import java.util.Map; |
8 | 9 | import java.util.function.Function;
|
9 | 10 |
|
10 | 11 | import org.springframework.ai.tool.annotation.ToolParam;
|
|
14 | 15 | * @author sven
|
15 | 16 | */
|
16 | 17 | public interface TmdbClient extends Function<TmdbClient.Request, TmdbClient.Response> {
|
| 18 | + public static final Map<Integer, String> GENRE_MAP = Map.ofEntries( |
| 19 | + Map.entry(28, "Action"), |
| 20 | + Map.entry(12, "Adventure"), |
| 21 | + Map.entry(16, "Animation"), |
| 22 | + Map.entry(35, "Comedy"), |
| 23 | + Map.entry(80, "Crime"), |
| 24 | + Map.entry(99, "Documentary"), |
| 25 | + Map.entry(18, "Drama"), |
| 26 | + Map.entry(10751, "Family"), |
| 27 | + Map.entry(14, "Fantasy"), |
| 28 | + Map.entry(36, "History"), |
| 29 | + Map.entry(27, "Horror"), |
| 30 | + Map.entry(10402, "Music"), |
| 31 | + Map.entry(9648, "Mystery"), |
| 32 | + Map.entry(10749, "Romance"), |
| 33 | + Map.entry(878, "Science Fiction"), |
| 34 | + Map.entry(10770, "TV Movie"), |
| 35 | + Map.entry(53, "Thriller"), |
| 36 | + Map.entry(10752, "War"), |
| 37 | + Map.entry(37, "Western") |
| 38 | + ); |
17 | 39 |
|
18 | 40 | record Request(@ToolParam(description = "The movie title") String query) {
|
19 | 41 | }
|
20 | 42 |
|
21 |
| - record Response(String response) { |
22 |
| - } |
| 43 | + record Response(Integer page, Integer total_pages, Integer total_results, Movie[] results) { } |
| 44 | + |
| 45 | + record Movie(boolean adult, String backdrop_path, Integer[] genere_ids, Long id, String original_language, |
| 46 | + String original_title, String overview, Double popularity, String poster_path, String release_date, String title, |
| 47 | + boolean video, Double vote_average, Integer vote_count) { } |
23 | 48 | }
|
0 commit comments