Final commit
This commit is contained in:
parent
91fffb3294
commit
c35e0716af
372 changed files with 16591 additions and 1 deletions
15
backend/routes/get-new-suggest.ts
Normal file
15
backend/routes/get-new-suggest.ts
Normal file
|
@ -0,0 +1,15 @@
|
|||
import { searchSpotifyTracks } from "../spotify-api.ts";
|
||||
import { GetNewSuggestInput, GetNewSuggestOutput } from "../types/api.ts";
|
||||
import { generateVibes } from "../ai-suggestion.ts";
|
||||
|
||||
export async function getNewSuggestion(
|
||||
params: GetNewSuggestInput,
|
||||
): Promise<GetNewSuggestOutput> {
|
||||
const ai_suggestion = await generateVibes(params);
|
||||
|
||||
const suggestionResults = await searchSpotifyTracks(
|
||||
ai_suggestion.songs,
|
||||
);
|
||||
|
||||
return { songs: suggestionResults };
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue